druminator 10 Posted February 2, 2015 So I have this mission where one part is to slingload a vehicle to a specific destination. So first I want to "Create Task" and when the vehicle is unhooked at the destination/trigger I want "Set Task State" to be succeeded. Is there a way to set a trigger to be activated only when the vehicle has been unhooked from the Heli? Any help/suggestions would be much appreciated! Share this post Link to post Share on other sites
jshock 513 Posted February 2, 2015 Make sure to only have the trigger run when you want it to: isNull (getSlingLoad helicoptersName) *May not work Share this post Link to post Share on other sites
druminator 10 Posted February 3, 2015 (edited) Awesome, will try it out! Btw thanks for moving the topic, realised after that it was on the wrong section. Edited February 3, 2015 by Druminator Share this post Link to post Share on other sites
druminator 10 Posted February 3, 2015 Hmm were do I put the code? In the trigger or init.sqf or maybe description.ext? I tried to put this: isNull (getSlingLoad Heli1); in the condition on the trigger but it didn't work. Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted February 4, 2015 Firstly, you need to make sure the trigger doesn't fire BEFORE the vehicle is hooked, because that's what will happen if you start your mission without the vehicle being hooked already. There are various (some "quick'n'dirrdy") ways to accomplish that. My preferred solution would be to create the trigger dynamically after the vehicle has been hooked. If you prefer the ingame editor tho, you could setVariable to the trigger which is checked in its condition: myFancyTrigger setVariable ["isHooked", true]; //in the trigger condition: thisTrigger getVariable ["isHooked", false] && {isNull (getSlingLoad Heli1)} (untested) So that way, the isNull-check will only be executed when the "isHooked" variable in the trigger is true. You could also simply define a global variable, but as for clean coding purposes, you should avoid global variables where you can and if you have to use them, make their name unique to avoid accidently overwriting one. Regards, Johnny Share this post Link to post Share on other sites
killzone_kid 1332 Posted February 4, 2015 Use "RopeBreak" event handler attached to heli https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#ropeBreak Share this post Link to post Share on other sites
jshock 513 Posted February 4, 2015 Use "RopeBreak" event handler attached to heli https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#ropeBreak Note that EH will fire for each rope attached, so ensure that you throw in a check on the task state before setting it. Share this post Link to post Share on other sites
killzone_kid 1332 Posted February 4, 2015 Note that EH will fire for each rope attached, so ensure that you throw in a check on the task state before setting it. Good point, added note to BIKI already. Share this post Link to post Share on other sites
druminator 10 Posted February 5, 2015 Awesome, thx guys, will try it out as soon as possible! :) Share this post Link to post Share on other sites