Epoch/Sources/epoch_code/compile/EPOCH_unitSpawnIncrease.sqf
vbawol fc3ba3b3fb customHeader test
moved debug monitor to master loop
dropped digest idea for now
removed file check on masterloop and keydown
2017-09-26 14:31:39 -05:00

25 lines
895 B
Plaintext

/*
Author: Aaron Clark - EpochMod.com
Contributors:
Description:
Antagonist spawn chance increase function
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_unitSpawnIncrease.sqf
*/
//[[[cog import generate_private_arrays ]]]
private ["_index","_playerSpawnArray","_playerSpawnArrayKey"];
//[[[end]]]
params ["_spawnName", ["_increase",1]];
_index = EPOCH_spawnIndex find _spawnName;
if (_index != -1) then{
if (isNil "_playerSpawnArrayKey") then {_playerSpawnArrayKey = "EPOCH_playerSpawnArray"};
_playerSpawnArray = missionNamespace getVariable [_playerSpawnArrayKey,[]];
_playerSpawnArray set[_index, ((_playerSpawnArray select _index) + _increase) min (EPOCH_spawnLimits select _index)];
};