BennetArms 1 Posted August 16, 2013 (edited) Hi everyone =) I started to make a Coop-Mission, where one of the targets is laying a little minefield in a sector. I can detect named mines, deactivated in a trigger like (MineDeactivated or !mineactive mine1, mine2, mine3 etc.). But my problem is the opposite now. When the Explosive Specialist in my group lays his mines at the target-area, I can´t get a Trigger to count the amount of layed mines, so I could fire the Trigger off to move on. Can anybody give me a hint on doing this? Thank you. Ben. Edited August 16, 2013 by BennetArms Share this post Link to post Share on other sites
kylania 568 Posted August 16, 2013 this addEventHandler ["fired", { if (_this select 2 == "DemoChargeMuzzle") then { hint "Placed a charge!" } }]; Change DemoChargeMuzzle for whichever type of mine you were wanting to check for. BoundingMineRangeMuzzle, DirectionalMineRangeMuzzle, MineMuzzle, PipeBombMuzzle and so on. Share this post Link to post Share on other sites
BennetArms 1 Posted August 16, 2013 (edited) Thank you for that quick reply and your help Kylania. It works on my Explosive specialist. Now I only need to know, how the trigger gets fired, if my Soldier lays 3 MineMuzzle. So that the Taskstatus, that is linked to the Trigger, where the mines are layed, change to success. I try something like "{_x in thisList} count "MineMuzzle" > 3" Please forgive me, if this don´t make any sense, as I am new to editing. I thought, Arma 3 would be a good start to get on with editing ;) Edited August 16, 2013 by BennetArms Share this post Link to post Share on other sites
kylania 568 Posted August 16, 2013 hmm. So you want to know when 3+ mines have been laid in a trigger? Does it really matter who puts them there? Trigger condition of: {["mine_", str(_x)] call BIS_fnc_inString} count (thisTrigger nearObjects 10) > 2 That'll detect 3 or more placed mines within 10 meters of the trigger regardless of who placed them. No need for the eventHandler from above. Share this post Link to post Share on other sites
BennetArms 1 Posted August 16, 2013 (edited) Thank you Kylania! My Trigger fired off right away, as i layed the third mine. You saved my Mission-Idea and propably my evening :D And your right, it doesnt really matter who is laying the mine, as long as the job is done ;) Edited August 16, 2013 by BennetArms Answer Share this post Link to post Share on other sites
Woodpeckersam 18 Posted August 16, 2013 Just wanna add my thanks for helping this guy out, I was looking for something like this. Cheers mates. Share this post Link to post Share on other sites
kylania 568 Posted August 16, 2013 To explain the solution, it looks like placed mine don't have classnames so isKindOf and typeOf wouldn't help us. They are just: 12314: mine_ap.p3d or something as their result in nearObjects. So I just took the near objects, turned each result into a string and compared to see if "mine_" was in it. If so chances are you have a mine! :) Share this post Link to post Share on other sites