morthon 152 Posted March 31, 2015 So I'm trying to make a script where a single switch switches a unit from Civ to East and vice versa. I want to use this as part of a script that dynamically checks certain parameters to determine on what side the unit should be on depending on its actions (for example murdering a civilian). What I did was make two triggers on repeatedly with the following code PLAYER_RED and PLAYER_BLUE as conditions, respectively. First trigger: Condition: PLAYER_RED On. Act.: hostile1 = createGroup east; [bob] joinSilent hostile1; PLAYER_BLUE=false; Second trigger: Condition: PLAYER_BLUE On. Act.: neutral1 = createGroup civ; [bob] joinSilent neutral1; PLAYER_RED=false; In the init.sqf PLAYER_BLUE = false; And I added an addaction to the player calling a .sqf with the following code: if (side player == civ) then {PLAYER_RED = true;} else {PLAYER_BLUE = true;}; But alas, no big. I am really a scripting novice and I have trouble keeping information apart in my head. I don't see why this doesn't work. Could anyone please give me some advice? Share this post Link to post Share on other sites
jshock 512 Posted March 31, 2015 Hmm.. could be that CIV isn't working, try CIVILIAN. Share this post Link to post Share on other sites
morthon 152 Posted March 31, 2015 That's not it, I'm afraid, as it works fine when I trigger everything using Radio Alpha/Bravo. Share this post Link to post Share on other sites
jshock 512 Posted March 31, 2015 That's not it, I'm afraid, as it works fine when I trigger everything using Radio Alpha/Bravo. Hmm, may be a locality issue try the following: if (side player == civ) then {PLAYER_RED = true; publicVariable "PLAYER_RED";} else {PLAYER_BLUE = true; publicVariable "PLAYER_BLUE";}; Share this post Link to post Share on other sites