
MAKE HOSTAGE SYSTEM
To make hostage system, follow this procedure :
​
​
​
STEP 1 : In your mission folder, make rescuePows.sqf file and past this inside :
​
​
_per = _this select 0; // Person who had the addAction
_ldr = _this select 1; // Person who used the addAction
_act = _this select 2; // ID of the addAction
// Group given in the arguments section (ie: [POWS]
_grp = _this select 3 select 0;
// Remove the rescue option
_per removeAction _act;
// Join preselected units (POWS) to callers group, silently.
{[_x] joinSilent _ldr} forEach _grp;
​
​
​
​
​
STEP 2 : Go to the editor and on your mission place your soldier and write in his INIT box :
​
​
POWS = [p1,p2,p3,p4]
​
​
​
​
​
STEP 3 :Now place on your mission 4 civilians and name each other like this :
​
​
p1 (for the first civilian)
p2 (for the second civilian)
p3 (for the third civilian)
p4 (for the fourth civilian)
​​
Inside p1 INIT box, past this :
​
​
this addAction ["Rescue POWs","rescuePows.sqf",[POWS],1,false,true,"","(_target distance _this) < 3"];
​
​
​
​
​
STEP 4 : Now, make a trigger to make mission victory somewhere. Place your trigger (20x20 size for exemple) and follow this configuration :
​
Type : End n°1
Activation : Anyone
Activation type : Present
​
In condition, past this :
​
p1 in thislist;
​
When unit p1 will come inside this trigger, mission victory will appear
​
​
​
​
​
STEP 5 : make a trigger to make mission lost. Place trigger somewhere (0x0 size, its just situation trigger) and follow this configuration :
​
Type : Lose
Activation : Anyone
Activation type : Present
​
In condition, past this :
​
!alive p1
​
When unit p1 will die, mission lost will appear
​
​
​
​