Sarge-AI/ModName.MapName/scripts/UPSMON/COMMON/unit/fnc/UPSMON_dowatch.sqf
Teh Dango 65e4453908 2.4.0
Major Update. Now supporting DesolationRedux, Epoch and Exile.
2017-12-31 03:16:37 -05:00

33 lines
698 B
Plaintext

/****************************************************************
File: UPSMON_dowatch.sqf
Author: MONSADA
Description:
Función para mirar en una dirección
Parameter(s):
<--- Unit
<--- Position to watch
Returns:
****************************************************************/
private["_target","_npc","_height"];
_npc = _this select 0;
_target = _this select 1;
_height = 1;
If (count _this > 2) then {_height = _this select 2};
If (typename _target == "ARRAY") then
{
_target = [(_this select 1) select 0,(_this select 1) select 1,_height];
}
else
{
_target = getposATL _target;
_target set [2,_height];
};
if (!alive _npc) exitwith{};
_npc doWatch ObjNull;
_npc doWatch _target;