DeadWeight85 1 Posted February 3, 2016 I am wanting to capture when a unit is killed, and display it sort of as a rudimentary kill tracker. I have added the event handler, with an output to but it seems to not see when the object I have is destroyed. I am sure I am missing something, but I cannot figure it out. I have placed the event handler in script that is called when the addaction is used: addMissionEventHandler ["EntityKilled", {hint format ["%1 was killed",name (_this select 0)];}]; Share this post Link to post Share on other sites
Guest Posted February 3, 2016 I think it's just "Killed" but you can use "DamageHandler" Share this post Link to post Share on other sites
DeadWeight85 1 Posted February 4, 2016 Tried this tonight but throws an error Error in expression <r + 1; Error position: <damage _skeet) > 0.1) then Error damage: Type String, expected Object _skeet = "Skeet_Clay_F"; counter = 0; fnc_showHits = { hintSilent format ["You've hit %1",counter]; }; fnc_trackHits = { counter = counter + 1; publicVariable "Hits"; }; if ((damage _skeet) > 0.1) then { _skeet addEventHandler ["killed", fnc_trackHits]; } else { "Hits" addPublicVariableEventHandler {call fnc_showHits}; }; Share this post Link to post Share on other sites
Lala14 135 Posted February 4, 2016 simply because _skeet = "Skeet_Clay_F"; which is a string, you need to actually match it up with an object that is in game, so like _skeet = "Skeet_Clay_F" createVehicle getPos _skeetMachine; this will make an actually in game object. Also if this is for single you have added in a lot of stuff for mp that will fail because it's in single. Share this post Link to post Share on other sites
DeadWeight85 1 Posted February 4, 2016 Will try tonight TY. Share this post Link to post Share on other sites