Parachutes for BaseAttack AI

This commit is contained in:
IT07 2016-05-08 20:50:15 +02:00
parent 66c9934065
commit a0bfaa38ee

View File

@ -45,7 +45,7 @@ if (_this isEqualType []) then
if (_aiLaunchers isEqualTo 1) then if (_aiLaunchers isEqualTo 1) then
{ {
_launchers = _aiGear select 4; _launchers = _aiGear select 4;
_launcherChance = ([["DynamicLocationInvasion"],["hasLauncherChance"]] call VEMFr_fnc_getSetting) select 0; _launcherChance = ([[_missionName],["hasLauncherChance"]] call VEMFr_fnc_getSetting) select 0;
}; };
{ {
private ["_unit","_gear","_ammo"]; private ["_unit","_gear","_ammo"];
@ -77,9 +77,15 @@ if (_this isEqualType []) then
if (_aiLaunchers isEqualTo 1) then if (_aiLaunchers isEqualTo 1) then
{ {
if (_launcherChance isEqualTo 100 OR (ceil random (100 / _launcherChance) isEqualTo (ceil random (100 / _launcherChance)))) then if (_launcherChance isEqualTo 100 OR (ceil random (100 / _launcherChance) isEqualTo (ceil random (100 / _launcherChance)))) then
{
if not(_missionName isEqualTo "BaseAttack") then
{ {
_gear = selectRandom _backpacks; _gear = selectRandom _backpacks;
_unit addBackpack _gear; _unit addBackpack _gear;
} else
{
_unit addBackpack "B_Parachute";
};
private ["_ammo"]; private ["_ammo"];
_gear = selectRandom _launchers; _gear = selectRandom _launchers;
_unit addWeapon _gear; _unit addWeapon _gear;
@ -157,8 +163,15 @@ if (_this isEqualType []) then
_unit selectWeapon _rifle; _unit selectWeapon _rifle;
_pistol = selectRandom _pistols; _pistol = selectRandom _pistols;
_unit addWeapon _pistol; _unit addWeapon _pistol;
if not(_missionName isEqualTo "BaseAttack") then
{
_backpack = selectRandom _backpacks; _backpack = selectRandom _backpacks;
_unit addBackPack _backpack; _unit addBackPack _backpack;
} else
{
_unit addBackpack "B_Parachute";
};
// Give this guy some ammo // Give this guy some ammo
_givenAmmo = [_unit] call VEMFr_fnc_giveAmmo; _givenAmmo = [_unit] call VEMFr_fnc_giveAmmo;
@ -207,6 +220,11 @@ if (_this isEqualType []) then
_pistol = selectRandom _pistols; _pistol = selectRandom _pistols;
_unit addWeapon _pistol; _unit addWeapon _pistol;
if (_missionName isEqualTo "BaseAttack") then
{
_unit addBackpack "B_Parachute";
};
// Give this guy some ammo // Give this guy some ammo
_givenAmmo = [_unit] call VEMFr_fnc_giveAmmo; _givenAmmo = [_unit] call VEMFr_fnc_giveAmmo;
if not _givenAmmo then if not _givenAmmo then