mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add Cut Parachute
This commit is contained in:
parent
d6946f6e8f
commit
f06f38a107
@ -1,4 +1,5 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
@ -15,6 +16,20 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_CutParachute {
|
||||
displayName = "STR_ACE_Parachute_CutParachute";
|
||||
exceptions[] = {"isNotInside"};
|
||||
condition = QUOTE([_player] call FUNC(checkCutParachute));
|
||||
statement = QUOTE([_player] call FUNC(cutParachute));
|
||||
showDisabled = 0;
|
||||
priority = 2.9;
|
||||
icon = QUOTE(PATHTOF(UI\cut_ca.paa));
|
||||
hotkey = "C";
|
||||
};
|
||||
};
|
||||
};
|
||||
class B_Parachute;
|
||||
class ACE_NonSteerableParachute: B_Parachute {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
|
BIN
addons/parachute/UI/cut_ca.paa
Normal file
BIN
addons/parachute/UI/cut_ca.paa
Normal file
Binary file not shown.
@ -41,4 +41,4 @@ GVAR(PFH) = false;
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// don't show speed and height when in expert mode
|
||||
["infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call EFUNC(common,addEventHandler);
|
||||
["infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call EFUNC(common,addEventHandler);
|
@ -22,5 +22,6 @@ PREP(handleInfoDisplayChanged);
|
||||
PREP(hideAltimeter);
|
||||
PREP(onEachFrame);
|
||||
PREP(showAltimeter);
|
||||
|
||||
PREP(checkCutParachute);
|
||||
PREP(cutParachute);
|
||||
ADDON = true;
|
||||
|
18
addons/parachute/functions/fnc_checkCutParachute.sqf
Normal file
18
addons/parachute/functions/fnc_checkCutParachute.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
Name: check Cut Parachute
|
||||
|
||||
Author: joko // Jonas
|
||||
|
||||
Description:
|
||||
Check if Parachute can be Cuted
|
||||
|
||||
Parameters:
|
||||
0: Object
|
||||
|
||||
Returns:
|
||||
Boolean
|
||||
*/
|
||||
_unit = _this select 0;
|
||||
|
||||
if (animationState _unit == "para_pilot" && !(GETVAR(_unit,chuteIsCuted,false))) then {true} else {false};
|
22
addons/parachute/functions/fnc_cutParachute.sqf
Normal file
22
addons/parachute/functions/fnc_cutParachute.sqf
Normal file
@ -0,0 +1,22 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
Name: Cut Parachute
|
||||
|
||||
Author: joko // Jonas
|
||||
|
||||
Description:
|
||||
Cut Parachute and delete Old
|
||||
|
||||
Parameters:
|
||||
0: Object
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
*/
|
||||
private["_unit","_vehicle"];
|
||||
_unit = _this select 0;
|
||||
_vehicle = vehicle _unit;
|
||||
_unit action ["GetOut", vehicle _unit];
|
||||
deleteVehicle _vehicle;
|
||||
_unit addBackpack "B_Parachute";
|
||||
SETVAR(_unit,chuteIsCuted,true);
|
@ -18,6 +18,7 @@ private ["_unit"];
|
||||
_unit = _this select 0;
|
||||
GVAR(PFH) = false;
|
||||
[_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation);
|
||||
_unit setVariable[QGVAR(chuteIsCuted),true];
|
||||
[{
|
||||
if (time >= ((_this select 0) select 0) + 1) then {
|
||||
((_this select 0) select 1) playActionNow "Crouch";
|
||||
|
@ -49,5 +49,9 @@
|
||||
<Italian>Paracadute non manovrabile</Italian>
|
||||
<Portuguese>Para-querdas não controlável</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Parachute_CutParachute">
|
||||
<English>Cut Parachute</English>
|
||||
<German>Fallschirm abschneiden</German>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user