Chesty'sGhost 1 Posted November 16, 2021 I am looking for ways to use a trigger to notify the players when civilians have been killed. Right now, I have groups of civilians huddled in different spaces that aren't tied to anything in particular. My vision is to make one trigger that notifies the player whenever any civilian from any of these groups has been killed. Is this possible without having to name every single civilian and making a trigger for each one? I'm not super familiar with tools outside of the actual Arma mission editor, but am certainly willing to learn more if it makes this process easier. Thanks to all who respond! Share this post Link to post Share on other sites
froggyluv 2136 Posted November 16, 2021 What you're looking for is the Killed EventHandler https://community.bistudio.com/wiki/Arma_3:_Event_Handlers Share this post Link to post Share on other sites
Chesty'sGhost 1 Posted November 16, 2021 I'll take a gander. Thanks for the reply! Share this post Link to post Share on other sites
Chesty'sGhost 1 Posted November 17, 2021 Looked at that, still fairly unsure how that would be used to apply what my intent is. Again, not very experienced in the world of coding, just watched youtube mostly, so a barney-style break down would be helpful. Share this post Link to post Share on other sites
beno_83au 1369 Posted November 17, 2021 https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Killed So I guess the easiest way to use the event handler would be to put it in the init of each of the units (assuming you've placed them there in the editor, if they're being spawned in, it's a slightly different process). Just add some form of message to the EH and it should all work out: this addEventHandler ["Killed", { systemChat "A civ has been killed."; }]; There's more you could do, like different styles of message, say where the civy was or was near when they died, who killed them, etc, but it all depends on what you're doing. 1 Share this post Link to post Share on other sites
Chesty'sGhost 1 Posted November 17, 2021 Gotcha, I essentially did the following: a1 addEventHandler ["killed", { hint "A civilian has been killed! Be more careful Marines!"; }]; I built that for a1-48 (a bit painstaking) and it seems to have functioned. Thanks for the response! Any clue how to make the notification conditional upon adfor/blufor? Share this post Link to post Share on other sites
Cysiu 13 Posted November 17, 2021 serverside: Quote addMissionEventHandler ["EntityKilled", { params ["_unit"]; if !(_unit isKindOf "CAManBase") exitWith {}; private _side = side (group _unit); if (_side isEqualTo civilian) then { hint "A civilian has been killed! Be more careful Marines!"; }; }]; 2 Share this post Link to post Share on other sites
Chesty'sGhost 1 Posted November 17, 2021 Great, I'll take a look at that. Thanks again for the response! Share this post Link to post Share on other sites
icebreakr 3157 Posted November 18, 2021 Is there a way to set a variable with counter of how many civs have been eliminated? For example when 5 civs are down, 5 new rebels spawn at houses and go seek out the players? When counter reaches f.e. 10 an armored vehicle enters the sector with new rebel squad. Share this post Link to post Share on other sites
Cysiu 13 Posted November 19, 2021 GVAR(confirmedKills) = 0; addMissionEventHandler ["EntityKilled", { params ["_unit"]; if !(_unit isKindOf "CAManBase") exitWith {}; private _side = side (group _unit); if (_side isEqualTo civilian) then { GVAR(confirmedKills) = GVAR(confirmedKills) + 1; }; }]; In my case GVAR(confirmedKills) expands to Krzyc_confirmedKills, so it's possible to use it somewhere else. Share this post Link to post Share on other sites