1
0

fnc_droidDispenserInit.sqf 865 B

1234567891011121314151617
  1. #include "function_macros.hpp"
  2. params ["_target"];
  3. if(!isServer) exitWith
  4. {
  5. LOG("Not Server, Exiting Dispenser Init");
  6. };
  7. LOG("Server, continuing on");
  8. LOGF_1("Initialising spawner %1",_target);
  9. // TODO: Read these vars from config, maybe CfgVehicles to allow placement of vehicles, although may be better to use static object with HP and destroyed mesh rather
  10. _target setVariable [QGVAR(group), createGroup [opfor, true]]; // group that units will be spawned into
  11. _target setVariable [QGVAR(maxUnits),GVAR(droidDispenserMaxUnitsGlobal)]; // max units that can be alive at any time from this spawner
  12. _target setVariable [QGVAR(possibleUnits),GVAR(droidDispenserPossibleUnitsGlobal)];
  13. // Start PFH
  14. LOGF_1("Attempting to start PFH on %1",_target);
  15. _params= [_target];
  16. _handle = [FUNC(droidDispenserPFH), GVAR(spawnTime), _params] call CBA_fnc_addPerFrameHandler;