Announcement

Collapse
No announcement yet.

Random Respawn for Vanilla

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Random Respawn for Vanilla

    Set up a bunch of invisible H's & name them "west0", "west1" ect...

    In the init line of the units that will respawn add:
    this addMPEventHandler ["MPRespawn", {_this exec "respawn.sqf"}];
    respawn.sqf
    //store the name of the unit that activated the eventhandler
    _unit = _this select 0;

    //choose random spawn point
    _numb = round (random 24);

    // array of available spawn points marked with invisible H's
    _sp = [west0, west1, west2, west3, west4, west5, west6, west7, west8, west9, west10, west11, west12, west13, west14, west15, west16, west17, west18, west19, west20, west21, west22, west23, west23, west24];
    _undeadpos = (_sp select _numb);

    //for debugging
    //hint format ["_sp = %1",(_sp select _numb)];

    // move the repspawned unit to the selected invisible H
    _nul = _unit setPos (getPos _undeadpos);

    end;
    |TG-189th| Unkl
    ArmA 3 Game Officer
    Dean of Tactical Gamer University
    189th Infantry Brigade Member
    SUBMIT A RIBBON NOMINATION OR CONTACT AN ARMA ADMIN
    "We quickly advance in the opposite direction and take cover in a house on the SW side of town." - BadStache

  • #2
    Hmm nice.

    TGU Instructor TG Pathfinder

    Former TGU Dean Former ARMA Admin Former Irregulars Officer

    "Do not seek death. Death will find you. But seek the road which makes death a fulfillment." - Dag Hammarskjold

    Comment

    Connect

    Collapse

    TeamSpeak 3 Server

    Collapse

    Advertisement

    Collapse

    Twitter Feed

    Collapse

    Working...
    X