Amazed 0 Posted February 19, 2013 (edited) Hey! I am trying to add "hit" EventHandlers to arbitrary objects to monitor for damage/hits received. What I tried: init line of object: this addEventHandler ["Hit", {_this execVM "hint.sqf"}] hint.sqf: hint "hit"; Works on pop-up targets but won't work on a barrel. What am I doing wrong? Thanks in advance! Edited February 20, 2013 by Amazed Share this post Link to post Share on other sites
tryteyker 28 Posted February 19, 2013 Some objects don't have a damage model (afaik no objects listed in Objects (Small) have any damage model whatsoever) so you will not be able to monitor damage on them. A regular or red barrel should be no issue however. Share this post Link to post Share on other sites
Amazed 0 Posted February 19, 2013 Yup red barrel works. init barrel: this addEventHandler ["HandleDamage", {_this execVM "hint.sqf"}]; hint.sqf: hint "damage"; sleep 2; hint ""; _this setDamage 0; But execution halts after I use "_this". So the same script written like this only works up the the "_this": hint "damage"; _this setDamage 0; sleep 2; hint ""; Why is that? Oh also what is the smallest object you know that has a hit model? :) Share this post Link to post Share on other sites
f2k sel 164 Posted February 20, 2013 Some objects don't have a damage model (afaik no objects listed in Objects (Small) have any damage model whatsoever) so you will not be able to monitor damage on them. A regular or red barrel should be no issue however. not quit right some small objects (skeet disk and evidence stuff) can have a hit eventhandler on them. I did think about attaching the skeet disk to the front of the speaker cone to detect damage. Skeet disk is the smallest I think. Share this post Link to post Share on other sites
Amazed 0 Posted February 20, 2013 Where can I find that skeet disk? Share this post Link to post Share on other sites
f2k sel 164 Posted February 20, 2013 (edited) small objects this is why it isn't working hint "damage"; sleep 1; hint str _this;// this shows you that it is an array of information. (_this select 0) setDamage 0; // this selects the correct item from the array sleep 2; hint ""; Edited February 20, 2013 by F2k Sel Share this post Link to post Share on other sites