kocrachon 2 Posted September 18, 2017 Hey All, Super simple I am hoping, I am trying to make it so that all units on side EAST are captive and passive. Once an event triggers, they go not captive and COMBAT. But my string does not seem to work. {if (side _x == EAST) then {_x setcaptive true; (group _x) setBehaviour "CARELESS"}} foreach allunits I get no errors, but if I walk infront of a redfor, they shoot at me. So not sure where I am wrong on this. I assume its somewhere around the group part but I havent been able to resolve it so far. Share this post Link to post Share on other sites
pierremgi 4862 Posted September 18, 2017 setBehaviour Share this post Link to post Share on other sites
kocrachon 2 Posted September 18, 2017 2 hours ago, pierremgi said: setBehaviour So my original version had it spelled right, and corrected it, but issue persists. {if (side _x == EAST) then {_x setcaptive true; (group _x) setBehaviour "CARELESS"}} foreach allunits EDIT: If I do just this, it works for all units, so the if part of the statement might not be working right? Am I not declaring side properly? {_x setcaptive true; (group _x) setBehaviour "CARELESS"} foreach allunits Share this post Link to post Share on other sites
pierremgi 4862 Posted September 19, 2017 No, your code is OK. Careless units are still throwing hand grenades on enemies but it's a known problem for ages. Check if this code is updated when you need this code. Spawned units could be not concerned by this line. 1 Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted September 19, 2017 Adding setCombatMode "BLUE" could resolve this, so they simply won't fire. Cheers 1 Share this post Link to post Share on other sites