fnc_droidDispenserInit.sqf 831 B

1234567891011121314151617
  1. #include "function_macros.hpp"
  2. params ["_target"];
  3. if(!isServer) exitWith
  4. {
  5. LOG_ERROR("Not Server, Exiting PFH");
  6. };
  7. LOGF_1("Initialising spawner %1",_target);
  8. // 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
  9. _target setVariable [QGVAR(group), createGroup [opfor, true]]; // group that units will be spawned into
  10. _target setVariable [QGVAR(maxUnits),GVAR(droidDispenserMaxUnitsGlobal)]; // max units that can be alive at any time from this spawner
  11. _target setVariable [QGVAR(possibleUnits),GVAR(droidDispenserPossibleUnitsGlobal)];
  12. // Start PFH
  13. LOGF_1("Attempting to start PFH on %1",_target);
  14. _params= [_target];
  15. _handle = [FUNC(droidDispenserPFH), GVAR(spawnTime), _params] call CBA_fnc_addPerFrameHandler;