Jump to content
Diaverso Carrasco

BIS_fnc_spawnGroup aircraft script?

Recommended Posts

Hi, I'm trying to create a script for a cinematic.

The cinematic consists of spawning a plane and making it advance through the airport without taking off.

This is the script I have at the moment:

_grp1 = [[4639.55,5413.66,0], civilian, ["C_Plane_Civil_01_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
_grp1 addWaypoint [[5145.62,5814.23,0], 0];
sleep 10;
_grp1 addWaypoint [[5077.51,5868.84,0], 0];

Currently the plane is spawning in the air instead of on the ground.

Share this post


Link to post
Share on other sites

The BIS_fnc_spawnGroup is using the BIS_fnc_spawnVehicle which detects if the "unit" is a kind of airplane (airplanex simulation, same of helicopter with helicopterx simulation).

So, you best bet is to write with:  createVehicle , then createVehicleCrew.  Especially for this kind of unique asset. You think there are more lines? the BIS functions are full of useless code for what you want to do.

 

What your code could be:

_plane = "C_Plane_Civil_01_F" createVehicle [4639.55,5413.66,0];
_plane setDir 180;
_grp1 = createVehicleCrew _plane;
_grp1 addWaypoint [[5145.62,5814.23,0], 0];

_grp1 addWaypoint [[5077.51,5868.84,0], 0];

 

You don't need to sleep between 2 waypoints.

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

×