Jump to content
Sign in to follow this  
WurschtBanane

Respawn in a random Jet

Recommended Posts

SO i have added the following to my init.sqf:

 

 
[] spawn {
 
    if (isServer && {isDedicated}) exitWith {};
 
waitUntil {!isNull player};
 
 
 
    private "_jet";
 
 
 
_xEHx = player addEventhandler ["respawn",
{
    _jet = createVehicle ["I_Plane_Fighter_03_AA_F", getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), [], random 10000, "FLY"];
 
(_this select 0) moveInDriver _jet;
 
}];
 
};
 
 
It makes a player respawn in a I_Plane_Fighter_03_AA_F (A-143 AA Buzzard). But i want a unit to respawn in a random jet. I want it to choose randomly between the AA buzzard, Neophron and 164 Wipeout on respawn.
Does anyone know what i can change here to make it choose randomly? Or can i even use a script that lets me respawn in a jet when i get shot down or crash?

Share this post


Link to post
Share on other sites

Simply replace your

"I_Plane_Fighter_03_AA_F"

with this:

selectRandom ["I_Plane_Fighter_03_AA_F", "I_Plane_Fighter_03_CAS_F", "O_Plane_CAS_02_F", "B_Plane_CAS_01_F"]
  • Like 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
Sign in to follow this  

×