Forum Jump :

Author Message


Posts: 138
Rank:


Level: Member

Country: de
Location:
Occupation:
Age: 43
In-game name:

 
#1 Posted at 2010-06-16 18:42        
     
Hey,

i am deploying paratroopers on the battlefield with this script made by Mandoble.
It was working fine, BUT now i installed ACE and all the paratroopers die after
jumping out because they have no chutes anymore.

How to assaign or give or wathever a parachute to this soldiers???

Ideas welcome!

case "CALL_PARAS":
{
_group = createGroup (_side);

switch (_side) do
{
case west:
{
_utype = "ACE_SoldierGPilot";
};
case east:
{
_utype = "SoldierEPilot";
};
case resistance:
{
_utype = "SoldierGPilot";
};
case civilian:
{
_utype = "Civilian2";
};
};

if (mando_airsupport_type_pa isKindOf "Helicopter") then
{
_range = mando_airsupport_range_he;
}
else
{
_range = mando_airsupport_range;
};

_jump = mando_airsupport_jump;

_spawnpos = _startpos;

_plane = createVehicle [mando_airsupport_type_pa, _spawnpos, [], 0, "FLY"];
_speed = speed _plane;
_ang = ((_targetpos select 0)-(_spawnpos select 0)) atan2 ((_targetpos select 1)-(_spawnpos select 1));
_plane setPos [_spawnpos select 0,_spawnpos select 1, mando_airsupport_bomb_alt max 100];
_plane setDir _ang;
_plane setVelocity [sin(_ang)*_speed/3.6,cos(_ang)*_speed/3.6,0];


_driver = _group createUnit [_utype,[0,0,30], [], 0, "FORM"];
_driver setskill 0.5;
_driver setCombatMode "BLUE";
_driver setBehaviour "CARELESS";
_driver setRank "CORPORAL";
_group selectLeader _driver;
_driver moveInDriver _plane;
_plane flyinHeight mando_airsupport_bomb_alt max 100;

if (!isNil "mando_missile_init") then
{
_plane SetVehicleInit "res = [This] execVM ""ace_sys_missiles\units\mando_onlymandoones.sqf"" ";
[_plane, 800, 1, 5, false, 0]execVM"ace_sys_missiles\units\mando_missileecm.sqf ";
processInitCommands;
};

_wp = _group addWaypoint [_targetpos, 0];
[_group, 1] showWaypoint "NEVER";
[_group, 1] setWaypointSpeed "FULL";
[_group, 1] setWaypointType "MOVE";

_group_i = createGroup (_side);
_i = 0;
{
if (_i == 0) then
{
_unit = _group_i createUnit [_x,[0,0,30], [], 0, "NONE"];
_unit setCombatMode "RED";
_unit setBehaviour "AWARE";
_unit setRank "CORPORAL";
_group_i selectLeader _unit;
}
else
{
_unit = _group_i createUnit [_x,[0,0,30], [], 0, "NONE"];
_unit setCombatMode "RED";
_unit setBehaviour "AWARE";
_unit setRank "PRIVATE";
};

if (_side == civilian) then
{
_unit addMagazine "30Rnd_545x39_AK";
_unit addMagazine "30Rnd_545x39_AK";
_unit addMagazine "30Rnd_545x39_AK";
_unit addWeapon "AK74";
};
_unit setskill 0.5;
_unit moveInCargo _plane;
if (mando_airsupport_ab_switchable) then
{
addSwitchableUnit _unit;
};
_i = _i + 1;
} forEach mando_support_infantrytype;

_wp = _group_i addWaypoint [_targetpos, 0];
[_group_i, 1] showWaypoint "NEVER";
[_group_i, 1] setWaypointType "SAD";
_wp = _group_i addWaypoint [_targetpos, 0];
[_group_i, 2] showWaypoint "NEVER";
[_group_i, 2] setWaypointType "HOLD";

[_side, "HQ"] sideChat "Hold your position soldier ... RACS airborne units are on the way.";

[] exec "scripts\callpam.sqs";

Sleep 4;
waitUntil {((unitReady leader _group) && (alive leader _group)) || (!alive leader _group)};
/*
if (alive _plane) then
{
{
_x action ["EJECT", vehicle _x];
unassignVehicle _x;
Sleep 0.75;
} forEach units _group_i;
};
*/

if (_jump) then
{
if (alive _plane) then
{
{
if (alive _x) then
{
_x action ["EJECT", vehicle _x];
};
unassignVehicle _x;
Sleep 0.75;
} forEach units _group_i;
};
}
else
{
_plane flyinHeight 0;
_plane doMove _targetpos;
Sleep 3;
waitUntil {(((getPos _plane select 2) < 2) && (alive leader _group)) || (!alive leader _group)};
Sleep 2;
if (alive _plane) then
{
{
if (alive _x) then
{
_x action ["getOut", vehicle _x];
};
unassignVehicle _x;
Sleep 1;
} forEach units _group_i;
};
_plane flyinHeight mando_airsupport_bomb_alt max 100;
};

Sleep 2;
_group move _spawnpos;
Sleep 4;

waitUntil {((unitReady leader _group) && (alive leader _group)) || (!alive leader _group)};

{
if (alive vehicle _x) then
{
deleteVehicle vehicle _x;
};
} forEach units _group;

{
if (alive _x) then
{
deleteVehicle _x;
};
} forEach units _group;

deleteGroup _group;
};

I also tried to implement this _unit addMagazine "ParachuteWest";
into the script but it did not work ... hope you can help me, because i am a noob scripter.

Again i need to give the soldiers a parachute but i do not know how!

thx in advance

greetings Mark