ACE3/addons/common/functions/fnc_disableAI_f.sqf

23 lines
517 B
Plaintext
Raw Normal View History

2015-01-16 23:21:47 +00:00
/**
* fn_disableAI_f.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
private ["_unit","_disable"];
_unit = [_this, 0,ObjNull,[ObjNull]] call BIS_fnc_Param;
_disable = [_this, 1,false,[false]] call BIS_fnc_Param;
if (local _unit && !(IsPlayer _unit)) then {
2015-01-18 19:09:19 +00:00
if (_disable) then {
_unit disableAI "Move";
_unit disableAI "TARGET";
} else {
_unit enableAI "Move";
_unit enableAI "TARGET";
};
2015-01-16 23:21:47 +00:00
};