Release Candidate

This commit is contained in:
eraser1 2016-04-14 21:20:26 -05:00
parent 1e301e8cb6
commit fd94fb0bcc
15 changed files with 115 additions and 103 deletions

View File

@ -4,7 +4,7 @@ class CfgPatches
{ {
units[] = {}; units[] = {};
weapons[] = {}; weapons[] = {};
a3_DMS_version = "March 31 2016 (TEST)"; a3_DMS_version = "April 14, 2016 (RC)";
requiredVersion = 1.36; requiredVersion = 1.36;
requiredAddons[] = {"exile_client","exile_server_config"}; requiredAddons[] = {"exile_client","exile_server_config"};
}; };

View File

@ -105,7 +105,7 @@ _crate = [_crateClassname, _pos] call DMS_fnc_SpawnCrate;
_veh = _veh =
[ [
[ [
_pos getPos [_pos,100,random 360], _pos getPos [100,random 360],
_pos _pos
], ],
_group, _group,

View File

@ -57,7 +57,7 @@
*/ */
private ["_added", "_pos", "_onEndingScripts", "_completionInfo", "_timeOutInfo", "_units", "_inputUnits", "_missionObjs", "_mines", "_difficulty", "_side", "_messages", "_markers", "_arr", "_timeStarted", "_timeUntilFail", "_buildings", "_vehs", "_crate_info_array", "_missionName", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_missionEvents", "_onSuccessScripts", "_onFailScripts"]; private ["_added", "_pos", "_onEndingScripts", "_completionInfo", "_timeOutInfo", "_units", "_missionObjs", "_mines", "_difficulty", "_side", "_messages", "_markers", "_arr", "_timeStarted", "_timeUntilFail", "_buildings", "_vehs", "_crate_info_array", "_missionName", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_missionEvents", "_onSuccessScripts", "_onFailScripts"];
_added = false; _added = false;
@ -68,7 +68,7 @@ if !(params
["_pos","",[[]],[2,3]], ["_pos","",[[]],[2,3]],
["_completionInfo","",[[]]], ["_completionInfo","",[[]]],
["_timeOutInfo","",[[]],[1,2]], ["_timeOutInfo","",[[]],[1,2]],
["_inputUnits","",[[]]], ["_units","",[[]]],
["_missionObjs","",[[]],[3,4]], ["_missionObjs","",[[]],[3,4]],
["_messages","",[[]],[3]], ["_messages","",[[]],[3]],
["_markers","",[[]],[DMS_MissionMarkerCount]], ["_markers","",[[]],[DMS_MissionMarkerCount]],
@ -103,9 +103,6 @@ try
["_timeUntilFail",DMS_MissionTimeOut call DMS_fnc_SelectRandomVal,[0]] ["_timeUntilFail",DMS_MissionTimeOut call DMS_fnc_SelectRandomVal,[0]]
]; ];
_units = _inputUnits call DMS_fnc_GetAllUnits;
if !(_missionObjs params if !(_missionObjs params
[ [
["_buildings","",[[]]], ["_buildings","",[[]]],

View File

@ -67,7 +67,7 @@
*/ */
private ["_added", "_pos", "_onEndingScripts", "_completionInfo", "_timeOutInfo", "_units", "_inputUnits", "_missionObjs", "_mines", "_difficulty", "_side", "_messages", "_markers", "_arr", "_timeStarted", "_timeUntilFail", "_buildings", "_vehs", "_crate_info_array", "_missionName", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_missionEvents", "_onSuccessScripts", "_onFailScripts"]; private ["_added", "_pos", "_onEndingScripts", "_completionInfo", "_timeOutInfo", "_units", "_missionObjs", "_mines", "_difficulty", "_side", "_messages", "_markers", "_arr", "_timeStarted", "_timeUntilFail", "_buildings", "_vehs", "_crate_info_array", "_missionName", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_missionEvents", "_onSuccessScripts", "_onFailScripts"];
_added = false; _added = false;
@ -78,7 +78,7 @@ if !(params
["_completionInfo","",[[]]], ["_completionInfo","",[[]]],
["_groupReinforcementsInfo","",[[]]], ["_groupReinforcementsInfo","",[[]]],
["_timeOutInfo","",[[]],[1,2]], ["_timeOutInfo","",[[]],[1,2]],
["_inputUnits","",[[]]], ["_units","",[[]]],
["_missionObjs","",[[]],[3,4]], ["_missionObjs","",[[]],[3,4]],
["_messages","",[[]],[3]], ["_messages","",[[]],[3]],
["_markers","",[[]],[DMS_MissionMarkerCount]], ["_markers","",[[]],[DMS_MissionMarkerCount]],
@ -166,7 +166,7 @@ try
_timeStarted, _timeStarted,
_timeUntilFail _timeUntilFail
], ],
_inputUnits, _units,
[ [
_buildings, _buildings,
_vehs, _vehs,
@ -195,7 +195,7 @@ try
if (DMS_MarkerText_ShowAICount) then if (DMS_MarkerText_ShowAICount) then
{ {
_markerDot = _markers select 0; _markerDot = _markers select 0;
_markerDot setMarkerText (format ["%1 (%2 %3 remaining)",markerText _markerDot,count (_inputUnits call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]); _markerDot setMarkerText (format ["%1 (%2 %3 remaining)",markerText _markerDot,count (_units call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]);
}; };
if (DMS_DEBUG) then if (DMS_DEBUG) then

View File

@ -17,7 +17,6 @@
A single object can also be used for (_this select 0) A single object can also be used for (_this select 0)
*/ */
if (DMS_CleanUpList isEqualTo []) exitWith {}; // Empty array, no objects to clean :)
{ {
if (DMS_DEBUG) then if (DMS_DEBUG) then

View File

@ -40,8 +40,8 @@ _units = [];
case "OBJECT": case "OBJECT":
{ {
[ [
[_parameter], [],
[] [_parameter]
] select (alive _parameter); ] select (alive _parameter);
}; };

View File

@ -96,9 +96,12 @@
_monitorParams = _monitorParams =
[ [
_AICount, // SCALAR: If the AI Group has fewer than "_AICount" living units, then the group will receive reinforcements. _AICount, // SCALAR: If the AI Group has fewer than "_AICount" living units, then the group will receive reinforcements.
_ejectFFVGunners, // BOOLEAN: Whether or not to eject the gunners that are FFV (firing from vehicle). _ejectFFVGunners, // BOOLEAN: Whether or not to eject Fire-From-Vehicle (FFV) gunners.
_remainAsGunship, // BOOLEAN: Whether or not the heli should remain in the area and function as a gunship or simply fly away and despawn. _maxJumpers, // SCALAR: Maximum number of AI to eject from the aircraft. Set to a really high # to ignore (like 999).
_vehClass // (OPTIONAL) STRING: The classname of the vehicle to spawn. Use "random" to select a random vehicle from "DMS_ArmedVehicles". Default: "random" _remainAsGunship, // BOOLEAN: Whether or not to keep the heli flying around as a gunship.
_dropPoint, // OBJECT or ARRAY (OPTIONAL - Position2D or 3D): The location to drop the reinforcements at. The drop point will default to the group leader.
_heliClass, // STRING (OPTIONAL): The classname of the heli to spawn.
_spawnPos // ARRAY (OPTIONAL - Position2D or 3D): The position for the heli to spawn at.
] ]
This reinforcement type will attempt to drop the AI off at the group leader's position. The heli will spawn in the air 500-5000 meters away from the leader's position and 1000 meters away from a player (default). This reinforcement type will attempt to drop the AI off at the group leader's position. The heli will spawn in the air 500-5000 meters away from the leader's position and 1000 meters away from a player (default).
@ -504,7 +507,8 @@ if (!_reinforcementsDepleted && {(diag_tickTime-_lastUpdated)>_updateDelay}) the
[ [
["_AICount",0,[0]], ["_AICount",0,[0]],
["_ejectFFVGunners",false,[false]], ["_ejectFFVGunners",false,[false]],
["_remainAsGunship",false,[false]] ["_maxJumpers",0,[0]],
["_remainAsGunship", 0, [false]]
]) ])
exitWith exitWith
{ {
@ -514,18 +518,28 @@ if (!_reinforcementsDepleted && {(diag_tickTime-_lastUpdated)>_updateDelay}) the
if (_remainingUnits<_AICount) then if (_remainingUnits<_AICount) then
{ {
private["_heli"]; private _dropPoint = if ((count _monitorParams)>4) then {_monitorParams param [4, getPosATL (leader _AIGroup), [objNull,[]], [2,3]]} else {getPosATL (leader _AIGroup)};
private _heliClass = if ((count _monitorParams)>5) then {_monitorParams param [5, "", [""]]} else {selectRandom DMS_ReinforcementHelis};
_heli = private _params =
[ [
_AIGroup, _AIGroup,
_class, _class,
_difficulty, _difficulty,
_side, _side,
getPosATL (leader _AIGroup), _dropPoint,
_ejectFFVGunners, _ejectFFVGunners,
_remainAsGunship _maxJumpers,
] call DMS_fnc_SpawnHeliReinforcement; _remainAsGunship,
_heliClass
];
if ((count _monitorParams)>6) then
{
_params pushBack (_monitorParams select 6);
};
private _heli = _params call DMS_fnc_SpawnHeliReinforcement;
// Every vehicle counts as one unit given, so the number of units given is equivalent to number of waves given. // Every vehicle counts as one unit given, so the number of units given is equivalent to number of waves given.
_reinforcementWavesGiven = _reinforcementWavesGiven + 1; _reinforcementWavesGiven = _reinforcementWavesGiven + 1;

View File

@ -2,16 +2,12 @@
DMS_fnc_HeliParatroopers_Monitor DMS_fnc_HeliParatroopers_Monitor
Created by eraser1 Created by eraser1
**********!!!!NOTE!!!!**********: THIS FUNCTION IS NOT FINAL, IT IS FOR TESTING PURPOSES ONLY! Changes are planned, and the function parameters will likely change.
In addition, this function is not behaving as expected.
Used in Exile's thread system. Used in Exile's thread system.
Every heli to be used as paratroopers has an index in "DMS_HeliParatrooper_Arr". Every heli to be used as paratroopers has an index in "DMS_HeliParatrooper_Arr".
Every index has the values: Every index has the values:
[ [
_heli, // OBJECT: The heli that holds the units. _heli, // OBJECT: The heli that holds the units.
_dropPoint, // ARRAY (POSITION2D or 3D): The position (or object) to which the troopers need to be dropped near. _dropPoint, // ARRAY (POSITION2D or 3D): The position (or object) to which the troopers need to be dropped near.
_ejectFFVGunners, // BOOLEAN: Whether or not to eject Fire-From-Vehicle (FFV) gunners.
_remainAsGunship // BOOLEAN: Whether or not to keep the heli flying around as a gunship. _remainAsGunship // BOOLEAN: Whether or not to keep the heli flying around as a gunship.
] ]
@ -46,14 +42,12 @@
} forEach DMS_HelisToClean; } forEach DMS_HelisToClean;
if (DMS_HeliParatrooper_Arr isEqualTo []) exitWith {};
{ {
if !(_x params if !(_x params
[ [
["_heli", objNull, [objNull]], ["_heli", objNull, [objNull]],
["_dropPoint", 0, [[], objNull], [2,3]], ["_dropPoint", 0, [[], objNull], [2,3]],
["_ejectFFVGunners", false, [false]],
["_remainAsGunship", false, [false]] ["_remainAsGunship", false, [false]]
]) ])
exitWith exitWith
@ -89,16 +83,9 @@ if (DMS_HeliParatrooper_Arr isEqualTo []) exitWith {};
}; };
{ {
_x params private _unit = _x;
[
"_unit",
"_role",
"_cargoIndex",
"_turretPath",
"_personTurret"
];
if ((alive _unit) && {(_role isEqualTo "cargo") || {_ejectFFVGunners && {_personTurret}}}) then if ((alive _unit) && {_unit getVariable ["DMS_Paratrooper", false]}) then
{ {
/* /*
moveOut _unit; moveOut _unit;
@ -114,7 +101,7 @@ if (DMS_HeliParatrooper_Arr isEqualTo []) exitWith {};
_unit setVariable ["DMS_AISpawnPos", _dropPoint]; _unit setVariable ["DMS_AISpawnPos", _dropPoint];
}; };
} forEach (fullCrew _heli); } forEach (crew _heli);
if (_remainAsGunship) then if (_remainAsGunship) then
{ {
@ -134,11 +121,21 @@ if (DMS_HeliParatrooper_Arr isEqualTo []) exitWith {};
else else
{ {
private _pilot = driver _heli; private _pilot = driver _heli;
private _pilotGrp = createGroup (side _pilot);
private _newPos = _dropPoint getPos [2 * worldSize, random 360];
[_pilot] joinSilent (createGroup (side _pilot)); [_pilot] joinSilent _pilotGrp;
_pilot setDestination [_dropPoint getPos [2 * worldSize, random 360], "VEHICLE PLANNED", true]; _pilot setDestination [_newPos, "VEHICLE PLANNED", true];
{_pilot disableAI _x} forEach ["FSM", "AUTOCOMBAT", "CHECKVISIBLE", "TARGET", "AUTOTARGET"];
for "_i" from count (waypoints _pilotGrp) to 1 step -1 do
{
deleteWaypoint ((waypoints _pilotGrp) select _i);
};
private _wp = _pilotGrp addWaypoint [_newPos,5];
_wp setWaypointType "MOVE";
//{_pilot disableAI _x} forEach ["FSM", "AUTOCOMBAT", "CHECKVISIBLE", "TARGET", "AUTOTARGET"];
DMS_HelisToClean pushBack _heli; DMS_HelisToClean pushBack _heli;

View File

@ -33,7 +33,6 @@
A semi-full breakdown can be found in fn_AddMissionToMonitor.sqf A semi-full breakdown can be found in fn_AddMissionToMonitor.sqf
*/ */
if (DMS_Mission_Arr isEqualTo []) exitWith {}; // Empty array, no missions running
private ["_pos", "_completionInfo", "_timeStarted", "_failTime", "_units", "_buildings", "_vehs", "_crate_info_array", "_mines", "_missionName", "_msgWIN", "_msgLose", "_markers", "_missionSide", "_arr", "_cleanupList"]; private ["_pos", "_completionInfo", "_timeStarted", "_failTime", "_units", "_buildings", "_vehs", "_crate_info_array", "_mines", "_missionName", "_msgWIN", "_msgLose", "_markers", "_missionSide", "_arr", "_cleanupList"];
@ -228,8 +227,6 @@ private ["_pos", "_completionInfo", "_timeStarted", "_failTime", "_units", "_bui
_dot setMarkerText (format ["%1 (%2 %3 remaining)",_text,count (_units call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]); _dot setMarkerText (format ["%1 (%2 %3 remaining)",_text,count (_units call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]);
}; };
if !(_missionEvents isEqualTo []) then
{
/* /*
Coming soon... Coming soon...
@ -237,7 +234,6 @@ private ["_pos", "_completionInfo", "_timeStarted", "_failTime", "_units", "_bui
_x call DMS_fnc_HandleMissionEvents; _x call DMS_fnc_HandleMissionEvents;
} forEach _missionEvents; } forEach _missionEvents;
*/ */
};
if !(_onMonitorEnd isEqualTo {}) then if !(_onMonitorEnd isEqualTo {}) then

View File

@ -39,7 +39,6 @@
A semi-full breakdown can be found in fn_AddStaticMissionToMonitor.sqf A semi-full breakdown can be found in fn_AddStaticMissionToMonitor.sqf
*/ */
if (DMS_StaticMission_Arr isEqualTo []) exitWith {}; // Empty array, no static missions running
{ {
@ -232,8 +231,6 @@ if (DMS_StaticMission_Arr isEqualTo []) exitWith {}; // Empty array, no stati
_dot setMarkerText (format ["%1 (%2 %3 remaining)",_text,count (_inputAIUnits call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]); _dot setMarkerText (format ["%1 (%2 %3 remaining)",_text,count (_inputAIUnits call DMS_fnc_GetAllUnits),DMS_MarkerText_AIName]);
}; };
if !(_missionEvents isEqualTo []) then
{
/* /*
Coming soon... Coming soon...
@ -241,7 +238,6 @@ if (DMS_StaticMission_Arr isEqualTo []) exitWith {}; // Empty array, no stati
_x call DMS_fnc_HandleMissionEvents; _x call DMS_fnc_HandleMissionEvents;
} forEach _missionEvents; } forEach _missionEvents;
*/ */
};
if (DMS_AllowStaticReinforcements) then if (DMS_AllowStaticReinforcements) then

View File

@ -117,22 +117,16 @@ if (!isNull _av) then
if (_memCount isEqualTo 0) then if (_memCount isEqualTo 0) then
{ {
/* /*
I know what you're probably thinking: This is some pretty funky code because this is about the fastest way to do the task.
What the hell is this? An "if-statement" evaluated for an "if-statement"?! What madness is this?! Does this guy know what he's doing? There has to be a better way! An "if-statement" inside another "if-statement" is almost as fast, but it isn't as slick ;)
To which I (eraser1) reply...
I know it looks funky, and there are prettier and slicker ways to do this (such as using "select") BUT I tested extensively and found out that this way is the fastest way, so... yeah...
*/ */
if if
( (
if (_av isKindOf "StaticWeapon") then call
{ [
DMS_AI_destroyStaticWeapon && {(random 100)<(_av getVariable ["DMS_DestructionChance",DMS_AI_destroyStaticWeapon_chance])} { (random 100)<(_av getVariable ["DMS_DestructionChance",DMS_AI_destroyVehicleChance]) },
} { DMS_AI_destroyStaticWeapon && {(random 100)<(_av getVariable ["DMS_DestructionChance",DMS_AI_destroyStaticWeapon_chance])} }
else ] select (_av isKindOf "StaticWeapon")
{
(random 100)<(_av getVariable ["DMS_DestructionChance",DMS_AI_destroyVehicleChance])
}
) then ) then
{ {
_av setDamage 1; _av setDamage 1;

View File

@ -156,6 +156,8 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U
(owner _playerObj) publicVariableClient "ExileClientPlayerScore"; (owner _playerObj) publicVariableClient "ExileClientPlayerScore";
ExileClientPlayerScore = nil; ExileClientPlayerScore = nil;
}; };
//DONKEYPUNCH CUSTOM KILL STAT ADD FOR AI KILL //DONKEYPUNCH CUSTOM KILL STAT ADD FOR AI KILL
if (DMS_Add_AIKill2DB) then if (DMS_Add_AIKill2DB) then
{ {
@ -167,6 +169,7 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U
(owner _playerObj) publicVariableClient "ExileClientPlayerKills"; (owner _playerObj) publicVariableClient "ExileClientPlayerKills";
ExileClientPlayerKills = nil; ExileClientPlayerKills = nil;
}; };
//DONKEYPUNCH CUSTOM KILL RANK CHANGE FOR AI KILL //DONKEYPUNCH CUSTOM KILL RANK CHANGE FOR AI KILL
if (DMS_Enable_RankChange) then if (DMS_Enable_RankChange) then
{ {
@ -180,6 +183,8 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U
ExileClientPlayerHumanity = nil; ExileClientPlayerHumanity = nil;
}; };
}; };
if (DMS_DEBUG) then if (DMS_DEBUG) then
{ {
format ["PlayerAwardOnAIKill :: %1 (%2) awarded %3 poptabs and %4 respect for killing %5. Player's money is now %6, and respect is now %7. Roadkill: %8", name _playerObj, _playerUID, _moneyChange, _repChange, _unit, _playerMoney, _playerRespect, _roadKilled] call DMS_fnc_DebugLog; format ["PlayerAwardOnAIKill :: %1 (%2) awarded %3 poptabs and %4 respect for killing %5. Player's money is now %6, and respect is now %7. Roadkill: %8", name _playerObj, _playerUID, _moneyChange, _repChange, _unit, _playerMoney, _playerRespect, _roadKilled] call DMS_fnc_DebugLog;

View File

@ -106,8 +106,6 @@ removeVest _unit;
removeBackpackGlobal _unit; removeBackpackGlobal _unit;
// Give default items // Give default items
if !(DMS_ai_default_items isEqualTo []) then
{
{ {
// "Why doesn't linkItem work with any of these? Because fuck you, that's why" - BIS // "Why doesn't linkItem work with any of these? Because fuck you, that's why" - BIS
if (_x in ["Binocular","Rangefinder","Laserdesignator","Laserdesignator_02","Laserdesignator_03"]) then if (_x in ["Binocular","Rangefinder","Laserdesignator","Laserdesignator_02","Laserdesignator_03"]) then
@ -119,7 +117,6 @@ if !(DMS_ai_default_items isEqualTo []) then
_unit linkItem _x; _unit linkItem _x;
}; };
} forEach DMS_ai_default_items; } forEach DMS_ai_default_items;
};
if (_class == "unarmed") then if (_class == "unarmed") then

View File

@ -2,8 +2,6 @@
DMS_fnc_SpawnHeliReinforcement DMS_fnc_SpawnHeliReinforcement
Created by eraser1 Created by eraser1
**********!!!!NOTE!!!!**********: THIS FUNCTION IS NOT FINAL, IT IS FOR TESTING PURPOSES ONLY! Changes are planned, and the function parameters will likely change.
This function will create a heli/aircraft within "DMS_RHeli_MinDistFromDrop" to "DMS_RHeli_MaxDistFromDrop" meters and drop units at "_dropPoint". This function will create a heli/aircraft within "DMS_RHeli_MinDistFromDrop" to "DMS_RHeli_MaxDistFromDrop" meters and drop units at "_dropPoint".
Usage: Usage:
@ -14,6 +12,7 @@
_side, // STRING: The "side" that the AI are on. _side, // STRING: The "side" that the AI are on.
_dropPoint, // OBJECT or ARRAY (Position2D or 3D): The location to drop the reinforcements at. _dropPoint, // OBJECT or ARRAY (Position2D or 3D): The location to drop the reinforcements at.
_ejectFFVGunners, // BOOLEAN: Whether or not to eject Fire-From-Vehicle (FFV) gunners. _ejectFFVGunners, // BOOLEAN: Whether or not to eject Fire-From-Vehicle (FFV) gunners.
_maxJumpers, // SCALAR: Maximum number of AI to eject from the aircraft. Set to a really high # to ignore (like 999).
_remainAsGunship, // BOOLEAN: Whether or not to keep the heli flying around as a gunship. _remainAsGunship, // BOOLEAN: Whether or not to keep the heli flying around as a gunship.
_heliClass, // STRING (OPTIONAL): The classname of the heli to spawn. _heliClass, // STRING (OPTIONAL): The classname of the heli to spawn.
_spawnPos // ARRAY (OPTIONAL - Position2D or 3D): The position for the heli to spawn at. _spawnPos // ARRAY (OPTIONAL - Position2D or 3D): The position for the heli to spawn at.
@ -33,6 +32,7 @@ if !(params
["_side", 0, [""]], ["_side", 0, [""]],
["_dropPoint", 0, [[],objNull], [2,3]], ["_dropPoint", 0, [[],objNull], [2,3]],
["_ejectFFVGunners", 0, [false]], ["_ejectFFVGunners", 0, [false]],
["_maxJumpers",0,[0]],
["_remainAsGunship", 0, [false]] ["_remainAsGunship", 0, [false]]
]) ])
exitWith exitWith
@ -47,7 +47,7 @@ if (isNull _AIGroup) exitWith
-1 -1
}; };
_heliClass = if ((count _this)>7) then {_this param [7, "", [""]]} else {selectRandom DMS_ReinforcementHelis}; _heliClass = if ((count _this)>8) then {_this param [8, "", [""]]} else {selectRandom DMS_ReinforcementHelis};
// Make the AI group local to add passengers. // Make the AI group local to add passengers.
if !(local _AIGroup) then if !(local _AIGroup) then
@ -58,9 +58,9 @@ if !(local _AIGroup) then
// Get the spawn position for the heli // Get the spawn position for the heli
_spawnPos = _spawnPos =
if ((count _this)>8) then if ((count _this)>9) then
{ {
_this param [8, "", [[]], [2,3]] _this param [9, [0,0,0], [[]], [2,3]]
} }
else else
{ {
@ -122,9 +122,11 @@ _crewCount =
case "gunner"; case "gunner";
case "turret": case "turret":
{ {
if (_ejectFFVGunners && {_personTurret}) then if (_ejectFFVGunners && {_personTurret} && {_paratrooperCount < _maxJumpers}) then
{ {
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Paratroopers"] call DMS_fnc_SpawnAISoldier; _unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Paratroopers"] call DMS_fnc_SpawnAISoldier;
_unit setVariable ["DMS_Paratrooper", true];
_paratrooperCount = _paratrooperCount + 1; _paratrooperCount = _paratrooperCount + 1;
} }
else else
@ -132,16 +134,22 @@ _crewCount =
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Vehicle"] call DMS_fnc_SpawnAISoldier; _unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Vehicle"] call DMS_fnc_SpawnAISoldier;
_unit setVariable ["DMS_AssignedVeh",_heli]; _unit setVariable ["DMS_AssignedVeh",_heli];
}; };
_unit moveInTurret [_heli, _x]; _unit moveInTurret [_heli, _x];
}; };
case "cargo": case "cargo":
{
if (_paratrooperCount < _maxJumpers) then
{ {
_unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Paratroopers"] call DMS_fnc_SpawnAISoldier; _unit = [_AIGroup,_spawnPos,_class,_difficulty,_side,"Paratroopers"] call DMS_fnc_SpawnAISoldier;
_unit moveInCargo [_heli, _cargoIndex]; _unit moveInCargo [_heli, _cargoIndex];
_unit setVariable ["DMS_Paratrooper", true];
_paratrooperCount = _paratrooperCount + 1; _paratrooperCount = _paratrooperCount + 1;
}; };
}; };
};
_units pushBack _unit; _units pushBack _unit;
true true
@ -167,4 +175,4 @@ if (DMS_DEBUG) then
}; };
// Add the necessary information to the monitor. // Add the necessary information to the monitor.
DMS_HeliParatrooper_Arr pushBack [_heli, _dropPoint, _ejectFFVGunners, _remainAsGunship]; DMS_HeliParatrooper_Arr pushBack [_heli, _dropPoint, _remainAsGunship];

View File

@ -117,7 +117,7 @@ ___
___ ___
# Changelog: # Changelog:
### Test Branch: ### Test Branch **!!RC Now Available!!**:
#### List Of new Config values: #### List Of new Config values:
DMS_SpawnMissions_Scheduled DMS_SpawnMissions_Scheduled
@ -130,6 +130,15 @@ ___
DMS_RareLootAmount DMS_RareLootAmount
DMS_ReinforcementHelis DMS_ReinforcementHelis
#### April 14, 2016 (9:20 PM CST-America, RC):
* Fix script error with saltflats.
* "DMS_fnc_AddMissionToMonitor" will no longer convert given AI parameters to a list of objects, so you can now add other units to the mission (within the same group) without much issue.
* Micro-optimizations here and there.
* Fixed an issue with DMS_fnc_GetAllUnits such that it would return an empty list if given a list of AI objects.
* You can now set the maximum limit of paratrooper reinforcements.
* The pilot of the reinforcement heli should now fly away properly if configured to do so.
* Updated group reinforcement manager for compatibility with latest syntax for paratrooper reinforcements (NOTE: UNTESTED).
#### March 31, 2016 (6:00 PM CST-America): #### 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. * 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.