mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
make AI spawn every 5 minutes instead of 10
This commit is contained in:
parent
9028cec8df
commit
a59fc4aee2
@ -1 +1,20 @@
|
|||||||
false call EPOCH_pushCustomVar;
|
false call EPOCH_pushCustomVar;
|
||||||
|
|
||||||
|
_spawnChance = ((EPOCH_playerNuisance + EPOCH_playerSoiled)/2) max 1;
|
||||||
|
// add more antagonist spawn chances
|
||||||
|
if (random _antagonistRndChance < _spawnChance) then {
|
||||||
|
(selectRandomWeighted _antagonistChances) 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;
|
||||||
|
};
|
||||||
|
@ -1,18 +1 @@
|
|||||||
_spawnChance = ((EPOCH_playerNuisance + EPOCH_playerSoiled)/2) max 1;
|
// runs every 10 minutes
|
||||||
// add more antagonist spawn chances
|
|
||||||
if (random _antagonistRndChance < _spawnChance) then {
|
|
||||||
(selectRandomWeighted _antagonistChances) 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;
|
|
||||||
};
|
|
||||||
|
Loading…
Reference in New Issue
Block a user