Jump to content
panicsferd

Is there a way to make a trigger activate when player leaves vehicle?

Recommended Posts

I currently know how to make it where a trigger will be triggered when a certain unit enters a certain vehicle, but now I am wondering is there a way to make it where the trigger wouldn't activate until the player/unit is out of the vehicle.

  • Like 1

Share this post


Link to post
Share on other sites

condition:

!([i]unitname[/i] in [i]vehiclename[/i])

In most cases you can set up one trigger and set it to repeat. use unitname in vehiclename (so without the "!") as a condition. OnActivation will be the code that runs when the unit boards the vehicle. OnDeact will be the code that runs when the unit exits the vehicle.

Edited by Mad_Cheese
  • Thanks 1

Share this post


Link to post
Share on other sites
condition:
!([b]unitname[/b] in [b]vehiclename[/b])

It worked and thanks a ton. I had a feeling I probably could have used the "!" to not it out, but I didn't know I needed the parenthesis in that command.

Share this post


Link to post
Share on other sites
Quote

make it where a trigger will be triggered when a certain unit enters a certain vehicle

 

how do I do this?

 

I would like an enemy group start to approach and attack a vehicle as soon as the player gets in to create a chase for my mission

 

Thanks in advance !!

Share this post


Link to post
Share on other sites
player addEventHandler ["GetInMan", { 
 hint "Player is in vehicle";
 player removeEventHandler ["GetInMan", _thisEventHandler]; 
}];

player

addEventHandler

"GetInMan"

removeEventHandler

_thisEventHandler -> "Since Arma 3 v.1.64 the Event Handler index is available as _thisEventHandler during Event Handler code execution"

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×