A3XAI-Final/A3XAI/compile/A3XAI_create_UV_unit.sqf
Snark Industries c4a7084754 A3XAI Final Release (April 17, 2016 version)
Releasing previously unreleased version. Completely unsupported with no guarantee of functionality. Use at own risk.
2017-07-19 21:20:00 -04:00

16 lines
586 B
Plaintext

#include "\A3XAI\globaldefines.hpp"
private ["_unit", "_unitGroup", "_spawnPos", "_unitLevel", "_type"];
_unitGroup = _this select 0;
_unitLevel = _this select 1;
_spawnPos = _this select 2;
_unit = _unitGroup createUnit ["I_UAV_AI",_spawnPos,[],0,"FORM"];
[_unit] joinSilent _unitGroup;
0 = _unit call A3XAI_addUVUnitEH;
0 = [_unit, _unitLevel] call A3XAI_setSkills; // Set AI skill
A3XAI_monitoredObjects pushBack _unit;
if (A3XAI_debugLevel > 1) then {diag_log format["A3XAI Debug: Spawned UAV AI %1 with unitLevel %2 for group %3.",_unit,_unitLevel,_unitGroup];};
_unit