mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
More work
This commit is contained in:
parent
4c727fbff5
commit
24ab11a1e2
@ -52,11 +52,11 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
/*
|
||||
player playMove "ACE_AmovPercMstpScapWnonDnon";
|
||||
player switchMove "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon";
|
||||
*/
|
||||
*/
|
||||
|
||||
/*class CfgMovesBasic;
|
||||
class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
class States {
|
||||
class States {
|
||||
class CutSceneAnimationBase;
|
||||
class AmovPercMstpSnonWnonDnon_EaseIn: CutSceneAnimationBase {
|
||||
head = "headDefault";
|
||||
@ -85,6 +85,6 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
class AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
||||
InterpolateTo[] = {"Unconscious",0.01,"AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon",0.1};
|
||||
};
|
||||
};
|
||||
};
|
||||
};*/
|
||||
|
||||
|
@ -5,8 +5,8 @@ class CfgVehicles {
|
||||
class ACE_SetCaptive {
|
||||
displayName = "$STR_ACE_Captives_SetCaptive";
|
||||
distance = 4;
|
||||
condition = QUOTE(('ACE_CableTie' in (items _player)) && {alive _target} && {!(_target getVariable ['ACE_isCaptive', false])});
|
||||
statement = QUOTE(_player removeItem 'ACE_CableTie'; [ARR_3(QGVAR(SetCaptive), [_target], [ARR_2(_target, true)])] call EFUNC(common,targetEvent););
|
||||
condition = QUOTE(('ACE_CableTie' in (items _player)) && {alive _target} && {!(_target getVariable [ARR_2('ACE_isCaptive', false)])});
|
||||
statement = QUOTE(_player removeItem 'ACE_CableTie'; [ARR_3('SetCaptive', [_target], [ARR_2(_target, true)])] call EFUNC(common,targetEvent););
|
||||
showDisabled = 0;
|
||||
priority = 2.4;
|
||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||
@ -15,8 +15,8 @@ class CfgVehicles {
|
||||
class ACE_ReleaseCaptive {
|
||||
displayName = "$STR_ACE_Captives_ReleaseCaptive";
|
||||
distance = 4;
|
||||
condition = QUOTE(_target getVariable ['ACE_isCaptive', false] && {isNull (attachedTo _target)});
|
||||
statement = QUOTE([ARR_2(_target, false)] call FUNC(setCaptive));
|
||||
condition = QUOTE(_target getVariable [ARR_2('ACE_isCaptive', false)] && {isNull (attachedTo _target)});
|
||||
statement = QUOTE([ARR_3('SetCaptive', [_target], [ARR_2(_target, false)])] call EFUNC(common,targetEvent););
|
||||
exceptions[] = {"ACE_Interaction_isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
priority = 2.4;
|
||||
@ -26,7 +26,7 @@ class CfgVehicles {
|
||||
class ACE_EscortCaptive {
|
||||
displayName = "$STR_ACE_Captives_EscortCaptive";
|
||||
distance = 4;
|
||||
condition = QUOTE((_target getVariable ['ACE_isCaptive', false]) && {isNull (attachedTo _target)} && {alive _target} && {!(_target getVariable ['ACE_isUnconscious', false])});
|
||||
condition = QUOTE((_target getVariable [ARR_2('ACE_isCaptive', false)]) && {isNull (attachedTo _target)} && {alive _target} && {!(_target getVariable [ARR_2('ACE_isUnconscious', false)])});
|
||||
statement = QUOTE([ARR_2(_target, true)] call FUNC(escortCaptive));
|
||||
exceptions[] = {"ACE_Interaction_isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
@ -37,7 +37,7 @@ class CfgVehicles {
|
||||
class ACE_StopEscorting {
|
||||
displayName = "$STR_ACE_Captives_StopEscorting";
|
||||
distance = 4;
|
||||
condition = QUOTE((_target getVariable ['ACE_isCaptive', false]) && {_target in (attachedObjects _player)});
|
||||
condition = QUOTE((_target getVariable [ARR_2('ACE_isCaptive', false)]) && {_target in (attachedObjects _player)});
|
||||
statement = QUOTE([ARR_2(_target, false)] call FUNC(escortCaptive));
|
||||
exceptions[] = {"ACE_Interaction_isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
@ -71,8 +71,8 @@ class CfgVehicles {
|
||||
class ACE_SelfActions {
|
||||
class ACE_StopEscortingSelf {
|
||||
displayName = "$STR_ACE_Captives_StopEscorting";
|
||||
condition = QUOTE(((_player getVariable ['ACE_escortedUnit', objNull]) getVariable ['ACE_isCaptive', false]) && {(_player getVariable ['ACE_escortedUnit', objNull]) in attachedObjects _player});
|
||||
statement = QUOTE([ARR_2((_player getVariable ['ACE_escortedUnit', objNull]), false)] call FUNC(_escortCaptive););
|
||||
condition = QUOTE(((_player getVariable [ARR_2('ACE_escortedUnit', objNull)]) getVariable ['ACE_isCaptive', false]) && {(_player getVariable [ARR_2('ACE_escortedUnit', objNull)]) in attachedObjects _player});
|
||||
statement = QUOTE([ARR_2((_player getVariable [ARR_2('ACE_escortedUnit', objNull)]), false)] call FUNC(_escortCaptive););
|
||||
exceptions[] = {"ACE_Interaction_isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
priority = 2.3;
|
||||
|
14
addons/captives/README.md
Normal file
14
addons/captives/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
ace_captives
|
||||
============
|
||||
|
||||
Allows taking people captive/handcuffed
|
||||
|
||||
####Items:
|
||||
`ACE_CableTie` - adds ability to take someone captive
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [PabstMirror](https://github.com/PabstMirror)
|
@ -1,9 +1,19 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
[missionNamespace, "playerChanged", {_this call ACE_Captives_fnc_handlePlayerChanged}] call ACE_Core_fnc_addCustomEventhandler;
|
||||
|
||||
|
||||
|
||||
[QGVAR(MoveIn), {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
||||
[QGVAR(MoveOut), {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
||||
[QGVAR(SetCaptive), {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
||||
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
||||
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
||||
["SetCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
//TODO: Medical Integration Events???
|
||||
|
||||
// [_unit, "knockedOut", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleKnockedOut};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
||||
|
||||
// [_unit, "wokeUp", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleWokeUp};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
||||
|
@ -17,5 +17,7 @@ PREP(openFriskMenu);
|
||||
PREP(setCaptive);
|
||||
PREP(surrender);
|
||||
PREP(unloadCaptive);
|
||||
PREP(vehicleCaptiveMoveIn);
|
||||
PREP(vehicleCaptiveMoveOut);
|
||||
|
||||
ADDON = true;
|
||||
|
@ -17,13 +17,6 @@
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
[_unit, "knockedOut", {
|
||||
if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleKnockedOut};
|
||||
}] call ACE_Core_fnc_addCustomEventhandler;
|
||||
|
||||
[_unit, "wokeUp", {
|
||||
if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleWokeUp};
|
||||
}] call ACE_Core_fnc_addCustomEventhandler;
|
||||
|
||||
// prevent players from throwing grenades
|
||||
[_unit, "Throw", {(_this select 1) getVariable ["ACE_isCaptive", false]}, {}] call ACE_Core_fnc_addActionEventhandler;
|
||||
[_unit, "Throw", {(_this select 1) getVariable ["ACE_isCaptive", false]}, {}] call EFUNC(common,addActionEventhandler);
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit,_target,_vehicle);
|
||||
PARAMS_3(_unit,_target,_vehicle);
|
||||
|
||||
if (isNull _target) then {
|
||||
_objects = attachedObjects _unit;
|
||||
@ -32,5 +32,5 @@ if (isNull _vehicle) then {
|
||||
|
||||
if ((!isNil "_target") && {!isNil "_vehicle"}) then {
|
||||
_unit setVariable ["ACE_isEscorting", false];
|
||||
[QGVAR(MoveIn), [_target], [_target, _vehicle]] call EFUNC(common,targetEvent);
|
||||
["MoveInCaptive", [_target], [_target, _vehicle]] call EFUNC(common,targetEvent);
|
||||
};
|
||||
|
@ -60,4 +60,4 @@ if (_state) then {
|
||||
/*
|
||||
player playMove "AmovPercMstpSsurWnonDnon"
|
||||
player switchMove "AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon"
|
||||
*/
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ _cargo = [_cargo, {_this getVariable ["ACE_isCaptive", false]}] call EFUNC(commo
|
||||
|
||||
if ((count _cargo) > 0) then {
|
||||
_target = _cargo select 0;
|
||||
[QGVAR(MoveOut), [_target], [_target]] call EFUNC(common,targetEvent);
|
||||
["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);
|
||||
} else {
|
||||
ERROR("No captive to unload");
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user