diff --git a/addons/captives/functions/fnc_doEscortCaptive.sqf b/addons/captives/functions/fnc_doEscortCaptive.sqf index 1d94b30b87..817745ece3 100644 --- a/addons/captives/functions/fnc_doEscortCaptive.sqf +++ b/addons/captives/functions/fnc_doEscortCaptive.sqf @@ -50,9 +50,14 @@ if (_state) then { detach _target; _unit removeAction _actionID; _unit setVariable [QGVAR(escortedUnit), objNull, true]; + + // Public event + [QGVAR(escortingCaptive), [_target, false, _unit]] call CBA_fnc_localEvent; }; }, 0, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler; + // Public event + [QGVAR(escortingCaptive), [_target, true, _unit]] call CBA_fnc_localEvent; } else { _unit setVariable [QGVAR(isEscorting), false, true]; _unit setVariable [QGVAR(escortedUnit), objNull, true]; diff --git a/docs/wiki/framework/events-framework.md b/docs/wiki/framework/events-framework.md index 7244271520..c29f271719 100644 --- a/docs/wiki/framework/events-framework.md +++ b/docs/wiki/framework/events-framework.md @@ -67,6 +67,7 @@ MenuType: 0 = Interaction, 1 = Self Interaction |`ace_captiveStatusChanged` | [_unit, _state(BOOL), _reason ("SetHandcuffed" or "SetSurrendered"), _caller] | Global | Listen | Unit's captivity state changed |`ace_captives_setSurrendered` | [_unit, _state(BOOL)] | Target | Callable | Sets a unit to either start or stop surrendering |`ace_captives_setHandcuffed` | [_unit, _state(BOOL)] | Target | Callable | Sets a unit to either start or stop being handcuffed +|`ace_captives_escortingCaptive` | [_unit, _state(BOOL), _caller] | Local | Listen | Caller starting or stopping escort of unit ### 2.6 Settings (`ace_common`)