ACE3/addons/captives/functions/fnc_canEscortCaptive.sqf
2015-02-06 22:24:27 -06:00

27 lines
554 B
Plaintext

/*
* Author: PabstMirror
* Tests if can escort target (attach)
*
* Arguments:
* 0: caller (player) <OBJECT>
* 1: target <OBJECT>
*
* Return Value:
* The return value <BOOL>
*
* Example:
* [player, bob] call ACE_captives_fnc_canEscortCaptive
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_2(_unit,_target);
//Alive, handcuffed, not being escored, and not unconscious
(_target getVariable [QGVAR(isHandcuffed), false]) &&
{isNull (attachedTo _target)} &&
{alive _target} &&
{!(_target getVariable ["ACE_isUnconscious", false])}