mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
Some more stuff
This commit is contained in:
parent
7dcf806cb3
commit
1e301e8cb6
@ -4,7 +4,7 @@ class CfgPatches
|
||||
{
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
a3_DMS_version = "March 25 2016 (TEST)";
|
||||
a3_DMS_version = "March 31 2016 (TEST)";
|
||||
requiredVersion = 1.36;
|
||||
requiredAddons[] = {"exile_client","exile_server_config"};
|
||||
};
|
||||
|
@ -127,11 +127,11 @@ if (!isNull _av) then
|
||||
(
|
||||
if (_av isKindOf "StaticWeapon") then
|
||||
{
|
||||
DMS_AI_destroyStaticWeapon && {(random 100)<DMS_AI_destroyStaticWeapon_chance}
|
||||
DMS_AI_destroyStaticWeapon && {(random 100)<(_av getVariable ["DMS_DestructionChance",DMS_AI_destroyStaticWeapon_chance])}
|
||||
}
|
||||
else
|
||||
{
|
||||
(random 100)<DMS_AI_destroyVehicleChance
|
||||
(random 100)<(_av getVariable ["DMS_DestructionChance",DMS_AI_destroyVehicleChance])
|
||||
}
|
||||
) then
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
||||
Returns the index of the paratrooper info in "DMS_HeliParatrooper_Arr", -1 on error.
|
||||
*/
|
||||
|
||||
private ["_heliClass", "_groupOwner", "_spawnPos", "_heli", "_pilot", "_units", "_crewCount", "_unit", "_cargoIndex"];
|
||||
private ["_heliClass", "_groupOwner", "_spawnPos", "_heli", "_pilot", "_units", "_crewCount", "_paratrooperCount", "_unit", "_cargoIndex"];
|
||||
|
||||
|
||||
if !(params
|
||||
@ -93,29 +93,11 @@ _heli lock 2;
|
||||
|
||||
_AIGroup addVehicle _heli;
|
||||
|
||||
// Spawn the heli crew
|
||||
_pilot = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||
_pilot moveInDriver _heli;
|
||||
_pilot setVariable ["DMS_AssignedVeh",_heli];
|
||||
|
||||
_units = [_pilot];
|
||||
|
||||
_crewCount =
|
||||
{
|
||||
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||
_unit moveInTurret [_heli, _x];
|
||||
_unit setVariable ["DMS_AssignedVeh",_heli];
|
||||
_units pushBack _unit;
|
||||
true
|
||||
} count (allTurrets [_heli, true]);
|
||||
|
||||
|
||||
// Set the heli pilot's behavior.
|
||||
_pilot setDestination [_dropPoint, "VEHICLE PLANNED", true];
|
||||
_heli flyInHeight DMS_RHeli_Height;
|
||||
|
||||
|
||||
// Spawn the AI paratroopers
|
||||
_units = [];
|
||||
_paratrooperCount = 0;
|
||||
_crewCount =
|
||||
{
|
||||
_x params
|
||||
[
|
||||
@ -126,12 +108,50 @@ _heli flyInHeight DMS_RHeli_Height;
|
||||
"_personTurret"
|
||||
];
|
||||
|
||||
if (isNull _unit) then
|
||||
switch (_role) do
|
||||
{
|
||||
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Paratroopers"] call DMS_fnc_SpawnAISoldier;
|
||||
_unit moveInCargo [_heli, _cargoIndex];
|
||||
case "driver":
|
||||
{
|
||||
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||
_unit moveInDriver _heli;
|
||||
_unit setVariable ["DMS_AssignedVeh",_heli];
|
||||
_pilot = _unit;
|
||||
};
|
||||
|
||||
case "commander";
|
||||
case "gunner";
|
||||
case "turret":
|
||||
{
|
||||
if (_ejectFFVGunners && {_personTurret}) then
|
||||
{
|
||||
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Paratroopers"] call DMS_fnc_SpawnAISoldier;
|
||||
_paratrooperCount = _paratrooperCount + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Vehicle"] call DMS_fnc_SpawnAISoldier;
|
||||
_unit setVariable ["DMS_AssignedVeh",_heli];
|
||||
};
|
||||
_unit moveInTurret [_heli, _x];
|
||||
};
|
||||
|
||||
case "cargo":
|
||||
{
|
||||
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Paratroopers"] call DMS_fnc_SpawnAISoldier;
|
||||
_unit moveInCargo [_heli, _cargoIndex];
|
||||
_paratrooperCount = _paratrooperCount + 1;
|
||||
};
|
||||
};
|
||||
} forEach (fullCrew [_heli, "", true]);
|
||||
_units pushBack _unit;
|
||||
|
||||
true
|
||||
} count (fullCrew [_heli, "", true]);
|
||||
|
||||
|
||||
// Set the heli pilot's behavior.
|
||||
_pilot setDestination [_dropPoint, "VEHICLE PLANNED", true];
|
||||
_heli flyInHeight DMS_RHeli_Height;
|
||||
|
||||
|
||||
_units joinSilent _AIGroup;
|
||||
|
||||
|
@ -131,6 +131,11 @@ ___
|
||||
DMS_ReinforcementHelis
|
||||
|
||||
|
||||
#### March 31, 2016 (6:00 PM CST-America):
|
||||
* You can now use "setVariable" to define individually on an AI vehicle its "DMS_DestructionChance". EG: ```_vehicle setVariable ["DMS_DestructionChance",100];``` to always destroy a vehicle when its crew is dead.
|
||||
* "DMS_DestructionChance" values are defaulted to "DMS_AI_destroyStaticWeapon_chance" or "DMS_AI_destroyVehicleChance" for static or regular vehicles, respectively.
|
||||
* Optimization + code cleanup for "DMS_fnc_SpawnHeliReinforcement".
|
||||
|
||||
#### March 25, 2016 (6:00 PM CST-America):
|
||||
* **NEW CONFIG VALUES:**
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user