st3a1th 0 Posted April 30, 2011 Hello I am trying to Multiple add actions to set a task to complete. So far in the unit I have removeAllWeapons this; this disableai "MOVE"; this disableAI "ANIM"; this switchmove "CtsDoktor_Doktor_idleni1"; this setpos [getpos this select 0, getpos this select 1,3.6]; restrain2 = this addaction ["SECURE HOSTAGE","wolfpack2.sqf"]; I have 4 units named team1, team2, team3, team4 in the .sqf i have the following script _man = _this select 0; _man removeaction restrain2; _man removeaction restrain3; _man removeaction restrain4; _man removeaction restrain5; _man switchmove "ActsPercMstpSnonWunaDnon_sceneNikitinDisloyalty_Miles"; _man enableai "MOVE"; _man enableai "ANIM"; task9 = true; publicvariable "task9"; hint "Wolfpack Team Free"; MAG_tskObj9 setTaskState "SUCCEEDED"; I want to make it so all 4 add actions have to be activated before the task succeeds. Anyone know how to do this ? Share this post Link to post Share on other sites
demonized 16 Posted April 30, 2011 add a number variable to init.sqf, for example: Wolfpackmembers = 0; add this to the .sqf before the task lines: Wolfpackmembers = Wolfpackmembers + 1; replace task9 = true; publicvariable "task9"; hint "Wolfpack Team Free"; MAG_tskObj9 setTaskState "SUCCEEDED"; with: if (Wolfpackmembers == 4) then { task9 = true; publicvariable "task9"; hint "Wolfpack Team Free"; MAG_tskObj9 setTaskState "SUCCEEDED"; }; Share this post Link to post Share on other sites
st3a1th 0 Posted May 2, 2011 Thanks that worked great Share this post Link to post Share on other sites