-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cut Parachute/Reserve parachute #1307
Conversation
* Public: No | ||
*/ | ||
#include "script_component.hpp" | ||
SETVAR(_unit,chuteIsCuted,false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"cut", not "cuted".
_vehicle = vehicle _unit; | ||
_unit action ["GetOut", vehicle _unit]; | ||
deleteVehicle _vehicle; | ||
_unit addBackpack "B_Parachute"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are more than one type of parachutes in the game through mods (ACE adds the ACE_NonSteerableParachute
variant besides B_Parachute
).
The parachute added should be of the same class of that the unit originally had, which we probably need to store.
Is it possible to add the backup parachute as soon as the main one is opened? Currently you loose the backpack when you open the first one, but then get it back when you cut it, which is less than ideal. The |
ok i will try my best |
<Key ID="STR_ACE_Parachute_CutParachute"> | ||
<English>Cut Parachute</English> | ||
<German>Fallschirm abschneiden</German> | ||
</Key> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tabs
Fix Adding anytime B_Parachute Fix Reserve Parachute Added if Normal Parachute Open
so hop this is now done |
if ((vehicle _unit) isKindOf "ParachuteBase" || (backpack _unit == "")) then { | ||
_unit addbackpack (_unit getVariable[QGVAR(backpackClass),""]); | ||
} else { | ||
if (getText(configfile >> "CfgVehicles" >> _backpack >> "ParachuteClass") in ["NonSteerable_Parachute_F","B_Parachute_02_F","O_Parachute_02_F","I_Parachute_02_F","Steerable_Parachute_F"]) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does anyone have a better idea on a way to make this dynamic? Currently we are hard coding to only these Parachutes. Could you check inheritence instead, so this would be expanded with modded parachutes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only way to do this is to remove this complet and did it for every backpack but this is not that what i want to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could add a Config entry for Mod maker to say this is a Parachute and there we can add the a kindof what is the Reserve Parachute because normaly it was not the same normaly its a NonSteerable
* Public: No | ||
*/ | ||
|
||
_unit = _this select 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing private
I need here to do something more? or is everything fine |
_unit = _this select 0; | ||
_backpack = (_this select 1) select 6 ; | ||
if ((vehicle _unit) isKindOf "ParachuteBase" || (backpack _unit == "")) then { | ||
_unit addBackpack (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jokoho48, the condition above is incomplete. This would add a non steerable parachute every time e.g. you reload your weapon without a packpack.
(playerInventoryChanged
fires every time the inventory of the unit changes for whatever reason, including loading magazines on the gun, dropping things from the ground, etc.)
add New Config Parameter has Reserve Parachute
Did some tests with it, couldn't break it ! |
private ["_unit","_backpack"]; | ||
_unit = _this select 0; | ||
_backpack = (_this select 1) select 6 ; | ||
if ((vehicle _unit) isKindOf "ParachuteBase" && backpack player == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false])) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use ACE_player
instead of player.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think _unit is better
@alganthe Thanks |
Conflicts: addons/parachute/functions/fnc_storeParachute.sqf
i think its is ready to go |
@jokoho48 Fix merge conflicts (merge latest master into your branch, fix conflicts, commit). |
…aster Conflicts: AUTHORS.txt addons/parachute/CfgVehicles.hpp
Use CString Macro
ok i think its now Done and it killed me Twice |
Cut Parachute/Reserve parachute
this is a small module that bring the Reserve parachute back out of ACE2(One of the Importent Features out of there I think)
Hop every thing is Correct, if not tell me i try to fix it