2016-05-23 20:01:40 +00:00
|
|
|
_spawnChance = ((EPOCH_playerNuisance + EPOCH_playerSoiled)/2) max 1;
|
|
|
|
if (random EPOCH_droneRndChance < _spawnChance) then {
|
|
|
|
"I_UAV_01_F" call EPOCH_unitSpawnIncrease;
|
|
|
|
};
|
|
|
|
if (EPOCH_mod_Ryanzombies_Enabled) then {
|
|
|
|
if (random EPOCH_zombieRndChance < _spawnChance) then {
|
2016-06-18 17:57:45 +00:00
|
|
|
["EPOCH_RyanZombie_1",12] call EPOCH_unitSpawnIncrease;
|
2016-04-08 20:21:46 +00:00
|
|
|
};
|
|
|
|
};
|
2016-05-23 20:01:40 +00:00
|
|
|
if (random EPOCH_sapperRndChance < _spawnChance) then {
|
|
|
|
"Epoch_Sapper_F" call EPOCH_unitSpawnIncrease;
|
|
|
|
};
|
2016-06-15 00:58:22 +00:00
|
|
|
diag_log format["DEBUG: _spawnChance %1",_spawnChance];
|
2015-11-08 15:26:38 +00:00
|
|
|
|
2016-04-08 20:21:46 +00:00
|
|
|
_spawnUnits = [];
|
|
|
|
{
|
|
|
|
if (_x > 0) then{
|
|
|
|
_spawnUnits pushBack(EPOCH_spawnIndex select _forEachIndex);
|
|
|
|
};
|
|
|
|
} forEach EPOCH_playerSpawnArray;
|
2015-11-08 15:26:38 +00:00
|
|
|
|
2016-04-08 20:21:46 +00:00
|
|
|
// test spawning one antagonist every 10 minutes select one unit at random to spawn
|
|
|
|
if !(_spawnUnits isEqualTo[]) then{
|
|
|
|
(selectRandom _spawnUnits) call EPOCH_unitSpawn;
|
|
|
|
};
|