ACE3/addons/common/functions/fnc_canInteract.sqf

14 lines
437 B
Plaintext
Raw Normal View History

2015-01-16 23:21:47 +00:00
/**
* fn_canInteract.sqf
* @Descr: Check if unit can interact with enviroment. Unit has to be awake and not be in arrested state.
* @Author: Glowbal
*
* @Arguments: [unit OBJECT]
* @Return: BOOL True if unit can interact with enviroment.
* @PublicAPI: true
*/
#include "script_component.hpp"
2015-05-14 18:02:42 +00:00
PARAMS_1(_unit);
2015-01-16 23:21:47 +00:00
(((_unit getvariable [QGVAR(canInteract),0]) < 1) && ([_unit] call FUNC(isAwake)) && !([_unit] call FUNC(isArrested)))