anfo 118 Posted September 29, 2016 Hi guys I promise I've Google'd til the cows came home, but the results are not proving workable. The best I can explain is that blufor will start a mission as setcaptive true, in order to infiltrate an opfor held area. This is the trigger I use to get it started: Activation None Condition: time > 1 On Act: {if (side _x == west) then {_x setCaptive true;};} forEach allUnits; This way I presume I can have all blufor in the desired state with minimum fuss. However getting blufor to transpose from their setcaptive true state to false is proving a challenge. I understand that once a unit is setcaptive true, triggers do not activate for its original faction since they are now civilian. Could anybody please offer code that may work in a new trigger to bring all the setcaptive blufor back to false? Share this post Link to post Share on other sites
theend3r 83 Posted September 29, 2016 Hi guys I promise I've Google'd til the cows came home, but the results are not proving workable. The best I can explain is that blufor will start a mission as setcaptive true, in order to infiltrate an opfor held area. This is the trigger I use to get it started: Activation None Condition: time > 1 On Act: {if (side _x == west) then {_x setCaptive true;};} forEach allUnits; This way I presume I can have all blufor in the desired state with minimum fuss. However getting blufor to transpose from their setcaptive true state to false is proving a challenge. I understand that once a unit is setcaptive true, triggers do not activate for its original faction since they are now civilian. Could anybody please offer code that may work in a new trigger to bring all the setcaptive blufor back to false? Create an array of blufor units and work with it from then on blufors = allUnits select {side _x == west}; {_x setCaptive true} forEach blufors; //on {_x setCaptive false} forEach blufors; //off Share this post Link to post Share on other sites
anfo 118 Posted September 30, 2016 Create an array of blufor units and work with it from then on blufors = allUnits select {side _x == west}; {_x setCaptive true} forEach blufors; //on {_x setCaptive false} forEach blufors; //off Oh ok, I see what you mean, define all in west faction as "blufor" and regardless of what they become, they will always be known as blufor. So where do I define the first line of code? init.sqf? Share this post Link to post Share on other sites
theend3r 83 Posted September 30, 2016 Oh ok, I see what you mean, define all in west faction as "blufor" and regardless of what they become, they will always be known as blufor. So where do I define the first line of code? init.sqf? Anywhere that's not run repeatedly, but yes, preferably as soon as possible in some init file. And you do not define the units, you define an array (list) of units. Share this post Link to post Share on other sites