musclebust 3 Posted April 14, 2019 How do i make my trigger activate from me disarming a IED. I want there to be 2 IEDs dug into the road whilst the third is on the side of the road visible. If the team spots the 3rd IED they can disarm it and that would also disarm the 2 on the road (That explode from a trigger) So i have one trigger that will detonate the 2 IEDs on the road. And i have one trigger to delete the first trigger. Now i just need to know what to put in the second trigger so that it will work when i disarm the IED. Share this post Link to post Share on other sites
pierremgi 4906 Posted April 14, 2019 !mineActive your3rdIEDNameHere See also allMines detectedMines .... 2 Share this post Link to post Share on other sites
musclebust 3 Posted April 14, 2019 Thanks Pierremgi! Works perfectly. Share this post Link to post Share on other sites
Spatsiba 89 Posted April 14, 2019 Keep in mind !mineActive will return true if the mine is blown up, too. There is no way to detect if a mine was disarmed only referencing the mine AFAIK. Share this post Link to post Share on other sites
Nemanjic 71 Posted July 10, 2021 Is there a way to activate same mine once it was disarmed? I tried: mine1 mineActive = true; /and "mine1" mineActive = true /and but without results, mine just stay disarmed. It is a training ground mission for repeatable courses so I need same mine to be activated every time new unit start course. Share this post Link to post Share on other sites
sarogahtyp 1109 Posted July 10, 2021 1 hour ago, Nemanjic said: Is there a way to activate same mine once it was disarmed? I tried: mine1 mineActive = true; /and "mine1" mineActive = true /and but without results, mine just stay disarmed. It is a training ground mission for repeatable courses so I need same mine to be activated every time new unit start course. There is no command for activating and deactivating mines by script or let's say almost no command 😉 If you deactivate the mine by disabeling its simulation then you can simple reactivate it by enabeling simulation. TBH not my idea but KK's: 1 Share this post Link to post Share on other sites
Nemanjic 71 Posted July 10, 2021 (edited) 26 minutes ago, sarogahtyp said: If you deactivate the mine by disabeling its simulation then you can simple reactivate it by enabeling simulation. TBH not my idea but KK's: Tested, not working. I have naval mine called mine1 placed in Eden; during mission, I run command: mine1 enableSimulation false; but still I was eble to deactivate it with defuse kit, same otherwise: mine1 enableSimulation true; no changes at all.. So if I understand you well, there is no command to change state of mine once it is disarmed "normally" (defuse kit)? Also, I tried to understand this posts you point at but there is command with enabling simulation too.. Edited July 10, 2021 by Nemanjic Share this post Link to post Share on other sites
sarogahtyp 1109 Posted July 10, 2021 1 minute ago, Nemanjic said: Tested, not working. You did not test. I wrote IF you deactivate it BY disabeling the simulation THEN you can activate it BY enabeling simulation. This means not that it is defused or rearmed by that command. It is just a workaround because there is no command for it. 1 Share this post Link to post Share on other sites
Nemanjic 71 Posted July 10, 2021 @sarogahtypUnderstood but still can't make it working, I do something wrong obviously. mine1 enableSimulation false; still returns "true" after line: mineActive mine1 instead "false" due to fact I disabled it via simulation command before.. Any idea? Thank you anyway for helping me friend Share this post Link to post Share on other sites
sarogahtyp 1109 Posted July 10, 2021 enableSimulation should not change the state of mineActive because its not thought for disabeling/enabeling mines but to disable the simulation for an object. If simulation is disabled for a mine then it will not explode because no simulation calculations will be done for this object. It can not trigger nor explode but its not defused it is just a not working mine as long as simulation is disabled. 1 Share this post Link to post Share on other sites
pierremgi 4906 Posted July 10, 2021 a workaround is to delete them, recreate them by createMine. 3 Share this post Link to post Share on other sites
Nemanjic 71 Posted July 10, 2021 19 minutes ago, pierremgi said: a workaround is to delete them, recreate them by createMine Understood. Trigger condition will detect if mine is active, once when it is deactivated, trigger will delete old one and create another one. Now, because I have script to random place that mine with x,y,z in specific area I am not sure how to implement this code + createMine together in onAct.. I use this code for random placement: this setPos [random [15400, 15475, 15550] , random [11350, 11425, 11500], random [-355-175,-15]]; in initField of mine. So I need it for multiuse purposes because there is minimum five divers on training and it is crucial that mine is placed randomly inside square each time recruit or diver start a course. Additionally, trigger must known when the mine is disarmed so I need to give mine a name and I learn it few days ago you teach me in other thread. Share this post Link to post Share on other sites
pierremgi 4906 Posted July 11, 2021 To begin: What are the parameters for your minefield(s)/mine(s)? how are you creating mine(s)? 1 Share this post Link to post Share on other sites
Nemanjic 71 Posted July 11, 2021 Yes, this is how: naval mine placed in Eden and in init field of mine: this setPos [random [15400, 15475, 15550] , random [11350, 11425, 11500], random [-155,-88,-45]]; Now, due to I can't activate it again once disarmed I need to follow some of instructions from yesterday you and Sarogahtyp advices. First I try last advice with deleting mine after disarm and create again with command: _mrk = "any_marker_because_it_will_reposition_mine_again_with_last_line_in_this_code"; _area = markerSize _mrk; _nul = _area pushBack markerDir _mrk; _nul = _area pushBack ( markerShape _mrk isEqualTo "Circle" ); _pos = [ _mrk, _area ] call BIS_fnc_randomPosTrigger; _randPos = [_pos , 0, 100, 50, 0, 10, 0] call BIS_fnc_findSafePos; mine1= createVehicle ["UnderwaterMine", _randPos, [], 0, "NONE"]; sleep 3; mine1 setPos [random [15400, 15475, 15550] , random [11350, 11425, 11500], random [-355,-175,-15]]; This works nice amd place mine in random position from last line in code but mine is inactive!? I run this code and get to mine (player setPos getPos mine1) but neither mine detector or defuse kit not recognizing mine. It have fuse horns on it like it is active but it is not. Also I check: mineActive mine1; but it returns "false" First mine called mine1 placed with Eden is normally active and can be disarmed but every next placed with script can not. After that I tried to add one more line even if it looks nonsense just to try make mine active: createVehicleCrew mine1; still not results.. What else I can try? Thanks on your time friend Share this post Link to post Share on other sites
sarogahtyp 1109 Posted July 11, 2021 I guess this happens because you did use createVehicle instead of createMine as @pierremgi mentioned. https://community.bistudio.com/wiki/createMine 1 Share this post Link to post Share on other sites
Nemanjic 71 Posted July 11, 2021 38 minutes ago, sarogahtyp said: I guess this happens because you did use createVehicle instead of createMine as @pierremgi mentioned. Yes exactly! Now it works thank you mate! I just see that is from CfgVehicles class and that makes me to not even pay attention to difference in code which I was just copy from old one. Thank you both guys very much! 🍹🍺 Share this post Link to post Share on other sites