mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
QGVAR captives, interaction
This commit is contained in:
parent
5d36f84eb1
commit
4f515ec4e1
@ -25,11 +25,11 @@ if (isServer) then {
|
||||
};
|
||||
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_moveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call CBA_fnc_addEventHandler;
|
||||
["ace_moveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(moveInCaptive), {_this call FUNC(vehicleCaptiveMoveIn)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(moveOutCaptive), {_this call FUNC(vehicleCaptiveMoveOut)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ace_setHandcuffed", {_this call FUNC(setHandcuffed)}] call CBA_fnc_addEventHandler;
|
||||
["ace_setSurrendered", {_this call FUNC(setSurrendered)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(setHandcuffed), {_this call FUNC(setHandcuffed)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(setSurrendered), {_this call FUNC(setSurrendered)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
//Medical Integration Events
|
||||
["ace_medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call CBA_fnc_addEventHandler;
|
||||
|
@ -18,13 +18,14 @@ class CfgPatches {
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgEden.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
SettingsInitialized = "ace_settingsInitialized";
|
||||
medical_onUnconscious = "ace_medical_onUnconscious";
|
||||
SetSurrendered = "ace_setSurrendered";
|
||||
SetHandcuffed = "ace_setHandcuffed";
|
||||
MoveOutCaptive = "ace_moveOutCaptive";
|
||||
MoveInCaptive = "ace_moveInCaptive";
|
||||
SetSurrendered = QGVAR(setSurrendered);
|
||||
SetHandcuffed = QGVAR(setHandcuffed);
|
||||
MoveOutCaptive = QGVAR(moveOutCaptive);
|
||||
MoveInCaptive = QGVAR(moveInCaptive);
|
||||
playerChanged = "ace_playerChanged";
|
||||
CaptiveStatusChanged = "ace_captiveStatusChanged";
|
||||
};
|
||||
|
@ -21,6 +21,6 @@ params ["_unit", "_target"];
|
||||
|
||||
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
|
||||
|
||||
["ace_setHandcuffed", [_target, true], [_target]] call CBA_fnc_targetEvent;
|
||||
[QGVAR(setHandcuffed), [_target, true], [_target]] call CBA_fnc_targetEvent;
|
||||
|
||||
_unit removeItem "ACE_CableTie";
|
||||
|
@ -47,4 +47,4 @@ if (isNull _vehicle) then {
|
||||
if (isNull _vehicle) exitWith {ERROR("");};
|
||||
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
["ace_moveInCaptive", [_target, _vehicle], [_target]] call CBA_fnc_targetEvent;
|
||||
[QGVAR(moveInCaptive), [_target, _vehicle], [_target]] call CBA_fnc_targetEvent;
|
||||
|
@ -17,4 +17,4 @@
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
["ace_setHandcuffed", [_target, false], [_target]] call CBA_fnc_targetEvent;
|
||||
[QGVAR(setHandcuffed), [_target, false], [_target]] call CBA_fnc_targetEvent;
|
||||
|
@ -18,4 +18,4 @@
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
["ace_moveOutCaptive", [_target], [_target]] call CBA_fnc_targetEvent;
|
||||
[QGVAR(moveOutCaptive), [_target], [_target]] call CBA_fnc_targetEvent;
|
||||
|
@ -30,7 +30,7 @@ if (!isServer) exitWith {};
|
||||
params ["_units"];
|
||||
{
|
||||
TRACE_2("event",_x,local _x);
|
||||
["ace_setHandcuffed", [_x, true], [_x]] call CBA_fnc_targetEvent;
|
||||
[QGVAR(setHandcuffed), [_x, true], [_x]] call CBA_fnc_targetEvent;
|
||||
} forEach _units;
|
||||
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
|
||||
|
||||
|
@ -30,7 +30,7 @@ if (!isServer) exitWith {};
|
||||
params ["_units"];
|
||||
{
|
||||
TRACE_2("event",_x,local _x);
|
||||
["ace_setSurrendered", [_x, true], [_x]] call CBA_fnc_targetEvent;
|
||||
[QGVAR(setSurrendered), [_x, true], [_x]] call CBA_fnc_targetEvent;
|
||||
} forEach _units;
|
||||
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
|
||||
|
||||
|
@ -3,27 +3,27 @@
|
||||
|
||||
ACE_Modifier = 0;
|
||||
|
||||
["ace_pardon", {(_this select 0) addRating -rating (_this select 0)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(pardon), {(_this select 0) addRating -rating (_this select 0)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ace_getDown", {
|
||||
[QGVAR(getDown), {
|
||||
params ["_target"];
|
||||
|
||||
_target setUnitPos "DOWN";
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["sendAway", {
|
||||
[QGVAR(sendAway), {
|
||||
params ["_unit", "_position"];
|
||||
|
||||
_unit setUnitPos "AUTO";
|
||||
_unit doMove _position;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["lampTurnOn", {
|
||||
[QGVAR(lampTurnOn), {
|
||||
params ["_lamp", "_hitPointsDamage", "_disabledLampDMG"];
|
||||
{if((_x select 1) == _disabledLampDMG) then {_lamp setHit [_x select 0, 0];};nil} count _hitPointsDamage;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["lampTurnOff", {
|
||||
[QGVAR(lampTurnOff), {
|
||||
params ["_lamp", "_hitPointsDamage", "_disabledLampDMG"];
|
||||
{_lamp setHit [_x select 0, (_x select 1) max _disabledLampDMG];nil} count _hitPointsDamage;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
@ -32,7 +32,7 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
GVAR(isOpeningDoor) = false;
|
||||
|
||||
["tapShoulder", {
|
||||
[QGVAR(tapShoulder), {
|
||||
params ["_unit", "_shoulderNum"];
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
|
@ -19,12 +19,14 @@ class CfgPatches {
|
||||
#include "ACE_ZeusActions.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
getDown = "ace_getDown";
|
||||
pardon = "ace_pardon";
|
||||
tapShoulder = "ace_tapShoulder";
|
||||
sendAway = "ace_sendAway";
|
||||
getDown = QGVAR(getDown);
|
||||
pardon = QGVAR(pardon);
|
||||
tapShoulder = QGVAR(tapShoulder);
|
||||
sendAway = QGVAR(sendAway);
|
||||
setVelocity = "ace_setVelocity";
|
||||
displayTextStructured = "ace_displayTextStructured";
|
||||
CBA_teamColorChanged = "ace_CBA_teamColorChanged";
|
||||
selectLeader = "ace_selectLeader";
|
||||
lampTurnOff = QGVAR(lampTurnOff);
|
||||
lampTurnOn = QGVAR(lampTurnOn);
|
||||
};
|
||||
|
@ -27,7 +27,7 @@ _chance = [0.5, 0.8] select (count weapons _unit > 0);
|
||||
|
||||
{
|
||||
if (count weapons _x == 0 && {random 1 < _chance}) then {
|
||||
["ace_getDown", [_x], [_x]] call CBA_fnc_targetEvent;
|
||||
[QGVAR(getDown), [_x], [_x]] call CBA_fnc_targetEvent;
|
||||
};
|
||||
false
|
||||
} count (_target nearEntities ["Civilian", SEND_RADIUS]);
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_unit", "_team"];
|
||||
|
||||
["ace_CBA_teamColorChanged", [_unit, _team]] call CBA_fnc_globalEvent;
|
||||
["CBA_teamColorChanged", [_unit, _team]] call CBA_fnc_globalEvent;
|
||||
|
||||
// display message
|
||||
if (_unit == ACE_player) then {
|
||||
|
@ -15,4 +15,4 @@
|
||||
|
||||
params ["", "_target"];
|
||||
|
||||
["ace_pardon", [_target], [_target]] call CBA_fnc_targetEvent;
|
||||
[QGVAR(pardon), [_target], [_target]] call CBA_fnc_targetEvent;
|
||||
|
@ -31,7 +31,7 @@ _chance = [0.5, 0.8] select (count weapons _unit > 0);
|
||||
_position = getPosASL _unit vectorAdd (eyeDirection _unit vectorMultiply SEND_DISTANCE);
|
||||
_position set [2, 0];
|
||||
|
||||
["ace_sendAway", [_x, _position], [_x]] call CBA_fnc_targetEvent;
|
||||
[QGVAR(sendAway), [_x, _position], [_x]] call CBA_fnc_targetEvent;
|
||||
};
|
||||
false
|
||||
} count (_unit nearEntities ["Civilian", SEND_RADIUS]);
|
||||
|
@ -29,10 +29,7 @@ private _hitPointsDamage = [];
|
||||
} count _reflectors;
|
||||
|
||||
//if lamp is on turn it off
|
||||
private _eventName = ["lampTurnOn", "lampTurnOff"] select _isOn;
|
||||
if(local _lamp) then {
|
||||
[_eventName, [_lamp, _hitPointsDamage, DISABLED_LAMP_DMG]] call CBA_fnc_localEvent;
|
||||
} else {
|
||||
[_eventName, [_lamp, _hitPointsDamage, DISABLED_LAMP_DMG], [_lamp]] call CBA_fnc_targetEvent;
|
||||
};
|
||||
private _eventName = [QGVAR(lampTurnOn), QGVAR(lampTurnOff)] select _isOn;
|
||||
[_eventName, [_lamp, _hitPointsDamage, DISABLED_LAMP_DMG], [_lamp]] call CBA_fnc_targetEvent;
|
||||
|
||||
_lamp setVariable ["ACE_lampOn", !_isOn, true];
|
||||
|
@ -25,4 +25,4 @@ if (_unit == ACE_player) then {
|
||||
|
||||
_unit playActionNow "PutDown";
|
||||
|
||||
["ace_tapShoulder", [_target, _shoulderNum], [_target]] call CBA_fnc_targetEvent;
|
||||
[QGVAR(tapShoulder), [_target, _shoulderNum], [_target]] call CBA_fnc_targetEvent;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
// fixes laser when being captured. Needed, because the selectionPosition of the right hand is used
|
||||
["ace_setHandcuffed", {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call CBA_fnc_addEventHandler;
|
||||
[QEGVAR(captives,setHandcuffed), {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call CBA_fnc_addEventHandler;
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
|
@ -20,5 +20,5 @@ class CfgPatches {
|
||||
|
||||
class ACE_newEvents {
|
||||
SettingsInitialized = "ace_settingsInitialized";
|
||||
SetHandcuffed = "ace_setHandcuffed";
|
||||
SetHandcuffed = QEGVAR(captives,setHandcuffed);
|
||||
};
|
@ -14,5 +14,5 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// Handle interruptions
|
||||
["ace_medical_onUnconscious", {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler;
|
||||
["ace_setHandcuffed", {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler;
|
||||
[QEGVAR(captives,setHandcuffed), {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
@ -19,6 +19,6 @@ class CfgPatches {
|
||||
|
||||
class ACE_newEvents {
|
||||
SettingsInitialized = "ace_settingsInitialized";
|
||||
SetHandcuffed = "ace_setHandcuffed";
|
||||
SetHandcuffed = QEGVAR(captives,setHandcuffed);
|
||||
medical_onUnconscious = "ace_medical_onUnconscious";
|
||||
};
|
@ -45,7 +45,7 @@ class ACE_Curator {
|
||||
|
||||
class ACE_newEvents {
|
||||
zeusUnitAssigned = QGVAR(zeusUnitAssigned);
|
||||
SetSurrendered = "ace_setSurrendered";
|
||||
SetHandcuffed = "ace_setHandcuffed";
|
||||
SetSurrendered = QEGVAR(captives,setSurrendered);
|
||||
SetHandcuffed = QEGVAR(captives,setHandcuffed);
|
||||
AddCargoByClass = "ace_addCargoByClass";
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ if (isNil QEFUNC(captives,setHandcuffed)) then {
|
||||
} else {
|
||||
_captive = GETVAR(_unit,EGVAR(captives,isHandcuffed),false);
|
||||
// Event initalized by ACE_Captives
|
||||
["ace_setHandcuffed", [_unit, !_captive], _unit] call CBA_fnc_targetEvent;
|
||||
[QEGVAR(captives,setHandcuffed), [_unit, !_captive], _unit] call CBA_fnc_targetEvent;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -41,7 +41,7 @@ if (isNil QEFUNC(captives,setSurrendered)) then {
|
||||
} else {
|
||||
_surrendering = GETVAR(_unit,EGVAR(captives,isSurrendering),false);
|
||||
// Event initalized by ACE_Captives
|
||||
["ace_setSurrendered", [_unit, !_surrendering], _unit] call CBA_fnc_targetEvent;
|
||||
[QEGVAR(captives,setSurrendered), [_unit, !_surrendering], _unit] call CBA_fnc_targetEvent;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user