diff --git a/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf b/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf index d17b1d61..d32ce322 100644 --- a/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf +++ b/Sources/epoch_code/compile/EPOCH_unitSpawn.sqf @@ -19,10 +19,6 @@ params ["_unitClass",["_trgt",player],["_doVariable",false],["_extraData",[]]]; _bomb = objNull; // diag_log format["DEBUG: Antagonist %1 Spawning on %2. Do variable: %3.", _unitClass, _trgt, _doVariable]; - -if(random 100 < 6)then{ - [] execFSM "\x\addons\a3_epoch_code\System\Event_Air_Drop.fsm"; -}; if(_doVariable)then{_unitClass call EPOCH_unitSpawnIncrease;};//Assumes Antagonist is required. _index = EPOCH_spawnIndex find _unitClass; diff --git a/Sources/epoch_server_settings/EpochEvents/AirDrop.sqf b/Sources/epoch_server_settings/EpochEvents/AirDrop.sqf new file mode 100644 index 00000000..11108ffb --- /dev/null +++ b/Sources/epoch_server_settings/EpochEvents/AirDrop.sqf @@ -0,0 +1,29 @@ +/* + Trigger Air drop client side via randomly selected player. + by Aaron Clark - EpochMod.com + + Improvements and or bugfixes and other contributions are welcome via the github: + https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/AirDrop.sqf +*/ +// 50% chance every 45 minutes by default +_chance = 50; +if (random 100 < _chance) then { + + // get all alive players + _players = []; + { + if (alive _x) then {_players pushBack _x}; + } forEach allPlayers; + + // continue if players found alive + if !(_players isEqualTo []) then { + + // select random player + _player = selectRandom _players; + + // Trigger air drop via player + ["B_Heli_Transport_01_F", _player, true] remoteExec ['EPOCH_unitSpawn',_player]; + + diag_log format["Epoch: Air Drop Triggered on %1", _player]; + }; +};