mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
a0e9ec0153
-use the second set of GVARs to track adding and removing attributes. -Epoch_player* vars moved to local vars only accessible inside the master loop. -TODO: finish digest system with a config entry to control digest limits. Some extra logic is needed. Basically, when you consume some food, it will not increase your hunger level immediately but raise over time. Each of these should have limits on how much you can store in the digest and how much each tick the digest var can affect the local player var in the master loop.
20 lines
647 B
Plaintext
20 lines
647 B
Plaintext
_spawnChance = ((_playerNuisance + _playerSoiled)/2) max 1;
|
|
// add more antagonist spawn chances
|
|
if (random _antagonistRndChance < _spawnChance) then {
|
|
// selectRandomWeighted arma 1.76 or higher
|
|
(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;
|
|
};
|