2015-12-07 16:24:52 +00:00
|
|
|
/*
|
|
|
|
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:
|
2016-06-13 16:54:19 +00:00
|
|
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_unitSpawnIncrease.sqf
|
2015-12-07 16:24:52 +00:00
|
|
|
*/
|
2016-09-01 00:29:08 +00:00
|
|
|
//[[[cog import generate_private_arrays ]]]
|
2017-09-26 19:31:39 +00:00
|
|
|
private ["_index","_playerSpawnArray","_playerSpawnArrayKey"];
|
2016-09-01 00:29:08 +00:00
|
|
|
//[[[end]]]
|
2016-06-18 17:57:45 +00:00
|
|
|
params ["_spawnName", ["_increase",1]];
|
|
|
|
_index = EPOCH_spawnIndex find _spawnName;
|
2015-09-14 20:55:36 +00:00
|
|
|
if (_index != -1) then{
|
2017-09-26 19:31:39 +00:00
|
|
|
if (isNil "_playerSpawnArrayKey") then {_playerSpawnArrayKey = "EPOCH_playerSpawnArray"};
|
|
|
|
_playerSpawnArray = missionNamespace getVariable [_playerSpawnArrayKey,[]];
|
|
|
|
_playerSpawnArray set[_index, ((_playerSpawnArray select _index) + _increase) min (EPOCH_spawnLimits select _index)];
|
2015-09-14 20:55:36 +00:00
|
|
|
};
|