Mongoose26 10 Posted July 2, 2013 I would like to know what the condition for a trigger would have to be to set off the trigger when a Satchel Charge (SatchelCharge_Remote_Mag) is planted. Other threads have handled it with eventhandlers which I honestly would like to avoid. Info: Arma 3 Beta. Mission using VAS Script Share this post Link to post Share on other sites
kylania 567 Posted July 2, 2013 eventHandlers are how you'd handle that event. Trying to not use EH is kinda foolish really. :) Another option would be to constantly be checking nearest objects for a satchel charge, but if you wanna do that for anywhere on the map things might bog down. this addEventHandler ["fired", { if (_this select 2 == "DemoChargeMuzzle") then { hint "Placed a charge!" } }]; Not sure what SatchelCharge is though. :) Share this post Link to post Share on other sites
Mongoose26 10 Posted July 2, 2013 I put that code into the conditions in a trigger, and it gave me an error before the 'this' saying "Type Number,Nothing, Expected Bool" Which was common with code I used before I came to the forums... I honestly am stumped and the satchel charge is "SatchelCharge_Remote_Mag" which I changed from "DemoChargeMuzzle". It could be my fault but I still need help! Thanks! Share this post Link to post Share on other sites
f2k sel 164 Posted July 2, 2013 You don't place it in a trigger but in the units init line when the unit places the charge it will display the message, no triggers needed. Share this post Link to post Share on other sites
Mongoose26 10 Posted July 2, 2013 Thank you F2k Sel for clearing up the confusion! I'll let you know when I get it to work! Also is that all that is need? Or do I need to add a file to the mission. I don't believe so, but I want to get it right this time Share this post Link to post Share on other sites
f2k sel 164 Posted July 2, 2013 It is all you need as long as you have the right ammo type which is "PipeBombMuzzle" for SatchelCharge. there's an easy way to find out if your not sure this addEventHandler ["fired", { copyToClipboard str (_this select 2);hint str (_this select 2); }]; it will both tell you and the ammo type and send it to clipboard so you can paste in the script. so for satchel charge it would be this addEventHandler ["fired", { if (_this select 2 == "PipeBombMuzzle") then { hint "Placed a charge!" } }]; Share this post Link to post Share on other sites
cjust89 10 Posted July 22, 2013 It is all you need as long as you have the right ammo type which is "PipeBombMuzzle" for SatchelCharge.there's an easy way to find out if your not sure this addEventHandler ["fired", { copyToClipboard str (_this select 2);hint str (_this select 2); }]; it will both tell you and the ammo type and send it to clipboard so you can paste in the script. so for satchel charge it would be this addEventHandler ["fired", { if (_this select 2 == "PipeBombMuzzle") then { hint "Placed a charge!" } }]; I have a similar question. Basically I have x targets scattered across the map which have to be destroyed but, I don't want to detonate the charges until the end of the mission. (As to not alert the enemy of my presence). I have the triggers to destroy everything and this works great. However with my method you could technically bypass every object and just go to the end and detonate the targets. So I want to check that a satchel charge has been placed near each target. I'm not familiar with eventhandlers so what has been posted is beyond me. Thanks! Share this post Link to post Share on other sites