Jump to content
Sign in to follow this  
tom.tucka

Re-spawn in a aircraft

Recommended Posts

Hello Gents

is there any way i can make a aircraft re-spawn with a player inside already flying it

e.g player shot down by flak and the player re-spawns at respawn_east in the same type of plane they where shot down in

Thanks

Withers

Share this post


Link to post
Share on other sites

Yes, you can use an eventhandler for it. Here's an example of how it could be done:

_EHRespawn = player addEventHandler ["Respawn", {Unitrespawning =_this select 0; _Createplane = "I_Plane_Fighter_03_CAS_F" createVehicle (getMarkerPos "respawn_east"); _initspeed=160;
_changeheight = (getpos _createplane); _changeheight =[_changeheight select 0,_changeheight select 1, (_changeheight select 2) + 100]; _createplane setpos _changeheight; _Createplane setvelocity [(sin _dir*_initspeed),(cos _dir*_initspeed),0]; _Createplane engineon true; _Unitrespawning action ["getInDriver", _Createplane];}]

Haven't tested it, but should work :)

Edited by Caiden

Share this post


Link to post
Share on other sites
Yes, you can use an eventhandler for it. Here's an example of how it could be done:

_EHRespawn = player addEventHandler ["Respawn", {Unitrespawning =_this select 0; _Createplane = "I_Plane_Fighter_03_CAS_F" createVehicle (getMarkerPos "respawn_east"); _initspeed=160;
_changeheight = (getpos _createplane); _changeheight =[_changeheight select 0,_changeheight select 1, (_changeheight select 2) + 100]; _createplane setpos _changeheight; _Createplane setvelocity [(sin _dir*_initspeed),(cos _dir*_initspeed),0]; _Createplane engineon true; _Unitrespawning action ["getInDriver", _Createplane];}]

Haven't tested it, but should work :)

#

would this go into the init of the plane????

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  

×