Jump to content
Sign in to follow this  
BigRon

Execute a script upon entering a certain vehicle?

Recommended Posts

hey, i need to execute a script when a player enters a specific vehicle.

i have a MV22 that is folded on the carrier, i have it set so when the engine turns on or you use an action the wings unfold. the only problem is, there isnt any delay between the engine starting and the wings unfolding. so it causes damage because the blades hit the ground if the engine is on.

i want the wings to unfold when a player enters the vehicle or make a 1 second delay before the engine starts when the wings unfold.

Share this post


Link to post
Share on other sites

name the chopper heli1 or whatever

have a trigger with condition: player in heli

on activation [] exec "script.sqf"

so that will run a script upon the player getting in the heli, as for the wings and engines, I don't know.

Share this post


Link to post
Share on other sites

Trigger condition: player==driver osprey

On act: animation command

Edited by Celery

Share this post


Link to post
Share on other sites

Okay thanks alot guys, for anyone curious on how to do this add this into the init on your osprey

 this setPosASL [getPosASL this select 0, getPosASL this select 1, 16]; veh = [this, 15, 120, 0, TRUE, FALSE, "_xtype = [this,1] execvm ""\ca\air2\mv22\scripts\pack.sqf"""] execVM "vehicle.sqf"; _xtype = [this,1] execvm "\ca\air2\mv22\scripts\pack.sqf" 

"MV22" is the name of the osprey, change if needed

then create a trigger and put this in the conditions (as mentioned above)

 player==driver mv22 

then put this in the activation

 _xtype = [mv22,0] execvm "\ca\air2\mv22\scripts\pack.sqf" 

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
Sign in to follow this  

×