Add Cut Parachute

This commit is contained in:
Joko 2015-05-19 13:45:28 +02:00
parent d6946f6e8f
commit f06f38a107
8 changed files with 63 additions and 2 deletions

View File

@ -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";

Binary file not shown.

View File

@ -22,5 +22,6 @@ PREP(handleInfoDisplayChanged);
PREP(hideAltimeter);
PREP(onEachFrame);
PREP(showAltimeter);
PREP(checkCutParachute);
PREP(cutParachute);
ADDON = true;

View 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};

View 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);

View File

@ -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";

View File

@ -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>