Epoch/Sources/epoch_code/compile/setup/masterLoop/Event7.sqf
vbawol 40f2c98f0c 0.5 b684 pt1
[Added] Customizability of units spawned by UAV alert via CfgEpochClient
> uavAlertUnitSpawnTemplate. (Default: I_Soldier_EPOCH)
[Changed] Great White Sharks will now spawn if player is deep enough in
the ocean.
[Changed] Objects or Players that have been given "Crypto" variable can
be accessed via the dynamic menu (Space Bar) for a "Take Crypto" action.
changed zombieRndChance to zombieRngChance and added default entry into
CfgEpochClient
2017-02-28 10:34:24 -06:00

26 lines
817 B
Plaintext

_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_zombieRngChance < _spawnChance) then {
["EPOCH_RyanZombie_1",12] call EPOCH_unitSpawnIncrease;
};
};
if (random EPOCH_sapperRndChance < _spawnChance) then {
"Epoch_Sapper_F" call EPOCH_unitSpawnIncrease;
};
// diag_log format["DEBUG: _spawnChance %1",_spawnChance];
_spawnUnits = [];
{
if (_x > 0) then{
_spawnUnits pushBack(EPOCH_spawnIndex select _forEachIndex);
};
} forEach EPOCH_playerSpawnArray;
// test spawning one antagonist every 10 minutes select one unit at random to spawn
if !(_spawnUnits isEqualTo[]) then{
(selectRandom _spawnUnits) call EPOCH_unitSpawn;
};