redburn 20 Posted April 19, 2019 Hello guys, written this:, { _x addEventHandler ["Fired", { if(side player == west) then { a1 setCaptive false; } else { a2 setCaptive false; } }]; } foreach allUnits; does nothing because I do not want all players to go from false to true when activating the event. How can I make a player pass to true, but not to others? Share this post Link to post Share on other sites
pierremgi 4886 Posted April 19, 2019 You should read the biki description and apply your code on the parameters. I'd rather use firedMan... on players instead of allUnits (if I'm right with your aim). Share this post Link to post Share on other sites
redburn 20 Posted April 19, 2019 37 minutes ago, pierremgi said: You should read the biki description and apply your code on the parameters. I'd rather use firedMan... on players instead of allUnits (if I'm right with your aim). yes, but in this case, what I would like to do is: make two groups of players, one of the groups shoots out of the enemies, the event is activated, but only to that group in particular, without the other group of players being affected and that's what I do not know how to do it. Share this post Link to post Share on other sites
pierremgi 4886 Posted April 20, 2019 In initPlayerLocal.sqf (add it in your mission folder if not yet present) if (group player == whateverGroup) then { Player addEventHandler ["FiredMan", { params ["_unit"]; _unit setCaptive false; }]; }; I'm not sure to understand the difficulty or.. what you want exactly. Share this post Link to post Share on other sites
redburn 20 Posted April 20, 2019 4 minutes ago, pierremgi said: In initPlayerLocal.sqf (add it in your mission folder if not yet present) if (group player == whateverGroup) then { Player addEventHandler ["FiredMan", { params ["_unit"]; _unit setCaptive false; }]; }; I'm not sure to understand the difficulty or.. what you want exactly. Well, look, I'm doing a mission where there will be two groups of players, Put it this way, one team of players will be group A1 and another team of players will be group A2, one of the two groups (who do not know which group they want to be) will go undercover to one base, while the other group will also go to another. What I do not want is that if the group of players A1 open fire against some enemy, that the group A2 does not receive fire from the enemy for that, if it did not open fire. Thanks man, I'll be testing and then I'll tell you! Share this post Link to post Share on other sites
pierremgi 4886 Posted April 20, 2019 Understood! in initPlayerLocal.sqf Player addEventHandler ["FiredMan", { params ["_badass"]; {[_x,false] remoteExec ["setCaptive",_x]} forEach units _badass; }]; Share this post Link to post Share on other sites
redburn 20 Posted April 20, 2019 3 minutes ago, pierremgi said: Understood! in initPlayerLocal.sqf Player addEventHandler ["FiredMan", { params ["_badass"]; {[_x,false] remoteExec ["setCaptive",_x]} forEach units _badass; }]; Thank you! I'll be testing it and then I'll tell you! Share this post Link to post Share on other sites