mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
CH53 Fastroping and other fixes (#4713)
* CH53 Fastroping and Fixes Added fastrope points for CH53. The getOut EH is required to keep the doors open when a unit exits the vehicle and it uses the vehicle animation "doorHandler_R" or "doorHandler_L" as a placeholder to determine if the doors are open(1)/close(0). eg. In UH1Y (Unarmed), when the right door is opened using the useraction, "doorRB" and "doorHandler_R" will be set to 1. * Changed TAB to 4 spaces * Moved bracket to follow guidelines
This commit is contained in:
parent
ff212d5b3d
commit
cd852477c8
@ -184,12 +184,6 @@ class CfgVehicles {
|
||||
condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor));
|
||||
};
|
||||
};
|
||||
|
||||
class EventHandlers: EventHandlers {
|
||||
class RHSUSF_EventHandlers: RHSUSF_EventHandlers {
|
||||
getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Helicopter_Base_H: Helicopter_Base_F {
|
||||
@ -226,11 +220,6 @@ class CfgVehicles {
|
||||
condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor));
|
||||
};
|
||||
};
|
||||
class EventHandlers: EventHandlers {
|
||||
class RHSUSF_EventHandlers {
|
||||
getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors});
|
||||
};
|
||||
};
|
||||
|
||||
EQUIP_FRIES_ATTRIBUTE;
|
||||
};
|
||||
@ -266,6 +255,20 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class rhsusf_CH53E_USMC: Helicopter_Base_H {
|
||||
EGVAR(fastroping,enabled) = 1;
|
||||
EGVAR(fastroping,ropeOrigins)[] = {{0,-9.5,2.6}};
|
||||
EGVAR(fastroping,onCut) = QFUNC(onCut);
|
||||
EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
|
||||
|
||||
class UserActions {
|
||||
class RampOpen;
|
||||
class RampClose: RampOpen {
|
||||
condition = QUOTE([ARR_2(this,'ramp_bottom')] call FUNC(canCloseDoor));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Heli_Attack_01_base_F: Helicopter_Base_F {};
|
||||
|
||||
class RHS_AH1Z_base: Heli_Attack_01_base_F {
|
||||
|
@ -18,19 +18,21 @@
|
||||
#include "script_component.hpp"
|
||||
params ["_vehicle", "_door"];
|
||||
|
||||
(
|
||||
if (_vehicle isKindOf "RHS_CH_47F") then {
|
||||
(_vehicle animationSourcePhase _door) > 0
|
||||
} else {
|
||||
(_vehicle doorPhase _door) > 0
|
||||
}
|
||||
) &&
|
||||
{alive _vehicle} &&
|
||||
(alive _vehicle) &&
|
||||
{!(_vehicle getVariable [QEGVAR(fastroping,doorsLocked),false])} &&
|
||||
{
|
||||
if (_vehicle isKindOf "RHS_CH_47F") then {
|
||||
ACE_player in [driver _vehicle, _vehicle turretUnit [3], _vehicle turretUnit [4]]
|
||||
} else {
|
||||
ACE_player in _vehicle
|
||||
switch (true) do {
|
||||
case (_vehicle isKindOf "rhsusf_CH53E_USMC"): {
|
||||
((_vehicle animationPhase _door) > 0) &&
|
||||
{ACE_player == (driver _vehicle)}
|
||||
};
|
||||
case (_vehicle isKindOf "RHS_CH_47F"): {
|
||||
((_vehicle animationSourcePhase _door) > 0) &&
|
||||
{ACE_player in [driver _vehicle, _vehicle turretUnit [3], _vehicle turretUnit [4]]}
|
||||
};
|
||||
default {
|
||||
((_vehicle doorPhase _door) > 0) &&
|
||||
{ACE_player in _vehicle}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -26,11 +26,15 @@ if !(isNull _fries) then {
|
||||
[{
|
||||
_this animateDoor ["doorRB", 0];
|
||||
_this animateDoor ["doorLB", 0];
|
||||
_this animate ["doorHandler_R",0];
|
||||
_this animate ["doorHandler_L",0];
|
||||
}, _vehicle, 2] call CBA_fnc_waitAndExecute;
|
||||
|
||||
4
|
||||
} else {
|
||||
_vehicle animateDoor ["ramp_anim", 0];
|
||||
_vehicle animate ["ramp_bottom",0];
|
||||
_vehicle animate ["ramp_top",0];
|
||||
|
||||
2
|
||||
};
|
||||
|
@ -23,7 +23,11 @@ private _waitTime = 2;
|
||||
|
||||
_vehicle animateDoor ["doorRB", 1];
|
||||
_vehicle animateDoor ["doorLB", 1];
|
||||
_vehicle animate ["doorHandler_R",1];
|
||||
_vehicle animate ["doorHandler_L",1];
|
||||
_vehicle animateDoor ["ramp_anim", 1];
|
||||
_vehicle animate ["ramp_bottom",0.56];
|
||||
_vehicle animate ["ramp_top",1];
|
||||
|
||||
private _fries = _vehicle getVariable [QEGVAR(fastroping,FRIES), objNull];
|
||||
if !(isNull _fries) then {
|
||||
|
Loading…
Reference in New Issue
Block a user