Try
// vehicleinchute.sqf
// Example: res = [heli1, 5, 30, "HMMWV50", 0.5]execVM"vehicleinchute.sqf"
private["_vehicle", "_num_chutes", "_radius", "_type", "_delay", "_delta", "_pos", "_mycar", "_mychute"];
_vehicle = _this select 0;
_num_chutes = _this select 1;
_radius = _this select 2;
_type = _this select 3;
_delay = _this select 4;
if (!isServer) exitWith{};
_delta = 360 / _num_chutes;
for [{_i = 0},{_i < _num_chutes},{_i = _i + 1}] do
{
_pos = [(getPos _vehicle select 0)+sin(_delta * _i)*_radius,(getPos _vehicle select 1)+cos(_delta * _i)*_radius,getPos
_vehicle select 2];
_mycar = _type createVehicle _pos;
_mycar setPos _pos;
_mycar setVectorDir (vectorDir _vehicle);
_mycar setVectorUp (vectorUp _vehicle);
_mycar setVelocity (velocity _vehicle);
_mychute = "ParachuteWest" createVehicle _pos;
_mychute setPos _pos;
_mychute setVectorDir (vectorDir _vehicle);
_mychute setVectorUp (vectorUp _vehicle);
_mychute setVelocity (velocity _vehicle);
[_mycar, _mychute] spawn
{
_mycar = _this select 0;
_mychute = _this select 1;
while {(getPos _mycar select 2) > 0} do
{
_mycar setPos (_mychute modelToWorld [0,0,-3]);
_mycar SetVectorUp (vectorUp _mychute);
sleep 0.01;
};
};
Sleep _delay;
};