2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-02-04 19:16:19 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
|
|
|
* Tests if can escort target (attach)
|
|
|
|
*
|
|
|
|
* Arguments:
|
2023-09-24 21:45:43 +00:00
|
|
|
* 0: Caller (player) <OBJECT>
|
|
|
|
* 1: Target <OBJECT>
|
2015-02-04 19:16:19 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2023-09-24 21:45:43 +00:00
|
|
|
* Can escort <BOOL>
|
2015-02-04 19:16:19 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2015-02-06 23:03:56 +00:00
|
|
|
* [player, bob] call ACE_captives_fnc_canEscortCaptive
|
2015-02-04 19:16:19 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2015-08-04 23:15:20 +00:00
|
|
|
params ["_unit", "_target"];
|
2023-09-24 21:45:43 +00:00
|
|
|
// Alive, handcuffed, not being escorted, and not unconscious
|
2015-02-06 05:11:28 +00:00
|
|
|
|
2015-02-06 09:38:27 +00:00
|
|
|
(_target getVariable [QGVAR(isHandcuffed), false]) &&
|
|
|
|
{isNull (attachedTo _target)} &&
|
2024-07-02 19:38:14 +00:00
|
|
|
{_target call EFUNC(common,isAwake)} &&
|
2015-06-11 03:44:54 +00:00
|
|
|
{(vehicle _unit) == _unit} &&
|
|
|
|
{(vehicle _target) == _target}
|