fnc_spawnerInit.sqf 895 B

123456789101112
  1. #include "function_macros.hpp"
  2. params ["_target"];
  3. if(!isServer) exitWith { systemChat "Not Server, Exiting PFH"; };
  4. systemChat format["Initialising spawner %1",_target];
  5. _target setVariable [QGVAR(group), createGroup [opfor, true]]; // group that units will be spawned into
  6. _target setVariable [QGVAR(boundUnits), []]; // units currently bound to this unit
  7. _target setVariable [QGVAR(maxUnits),20]; // max units that can be alive at any time from this spawner
  8. _target setVariable [QGVAR(possibleUnits),["RD501_opfor_unit_B2_droid_Standard","RD501_opfor_unit_b1_grenadier","RD501_opfor_unit_B2_droid_Standard","RD501_opfor_unit_B1_AA","RD501_opfor_unit_B1_AT_heavy","RD501_opfor_unit_B1","RD501_opfor_unit_B1_marksman"]];
  9. // Start PFH
  10. systemChat format["Starting PFH on %1",_target];
  11. _params= [_target];
  12. _handle = [FUNC(spawnDroidPFH), GVAR(spawnTime), _params] call CBA_fnc_addPerFrameHandler;