Jump to content

vissarion1917

Spawn an air vehicle with a group of units inside

Recommended Posts

Hello!!

I am trying to spawn an air vehicle with its crew and with a group of soldiers inside (as a cargo) through scripting.

I perfectly know how to do it with land vehciles, but with air vehicles, it just doesn't work! Here is my code:

lax=3748;
lay=3748;
laz=140;
_laposition=[lax,lay,laz];

pierre=createVehicle ["CUP_B_AC47_Spooky_USA", [0,0,0], [], 0, "FLY"]; 
_grp=createVehicleCrew pierre;  
pierre setVelocityModelSpace [0,100,0];
pierre setPosATL _laposition;

grupit=createGroup west;
_soldier=grupit createUnit ["CUP_B_CDF_Militia_SNW", [0,0,0], [], 0, "CARGO"];
grupit createUnit ["CUP_B_CDF_Soldier_MG_FST", [0,0,0], [], 0, "CARGO"];
grupit createUnit ["CUP_B_CDF_Soldier_MG_FST", [0,0,0], [], 0, "CARGO"];

{_x moveInCargo pierre;} forEach units grupit;
selectPlayer _soldier;

 

Where am I wrong?

 

Thank you in advance!😄

Share this post


Link to post
Share on other sites

what does not work

don't the group spawn,

don't the heli spawn,

don't you not get a player in the group?

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

×