Skip to content
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

Merged
merged 21 commits into from
Jul 25, 2015
Merged

Cut Parachute/Reserve parachute #1307

merged 21 commits into from
Jul 25, 2015

Conversation

jokoho48
Copy link
Member

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

* Public: No
*/
#include "script_component.hpp"
SETVAR(_unit,chuteIsCuted,false);
Copy link
Member

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";
Copy link
Contributor

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.

@nicolasbadano
Copy link
Contributor

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 playerInventoryChanged event could be used to detect that.

@jokoho48
Copy link
Member Author

ok i will try my best
best not Merge this i start working on this

<Key ID="STR_ACE_Parachute_CutParachute">
<English>Cut Parachute</English>
<German>Fallschirm abschneiden</German>
</Key>
Copy link
Contributor

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
@jokoho48
Copy link
Member Author

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 {
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Member Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing private

@jokoho48
Copy link
Member Author

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"]);
Copy link
Contributor

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.)

@jaynus jaynus added this to the 3.2.0 milestone May 21, 2015
@alganthe
Copy link
Contributor

Did some tests with it, couldn't break it !
You get a good point 😄
The feature is really interesting, and works very well good job.

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 {
Copy link
Contributor

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.

Copy link
Member Author

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

@jokoho48
Copy link
Member Author

@alganthe Thanks

@jokoho48
Copy link
Member Author

i think its is ready to go

@jonpas
Copy link
Member

jonpas commented Jul 1, 2015

@jokoho48 Fix merge conflicts (merge latest master into your branch, fix conflicts, commit).

jokoho48 added 3 commits July 1, 2015 02:49
…aster

Conflicts:
	AUTHORS.txt
	addons/parachute/CfgVehicles.hpp
Use CString Macro
@jokoho48
Copy link
Member Author

jokoho48 commented Jul 1, 2015

ok i think its now Done and it killed me Twice

@thojkooi thojkooi self-assigned this Jul 19, 2015
thojkooi added a commit that referenced this pull request Jul 25, 2015
Cut Parachute/Reserve parachute
@thojkooi thojkooi merged commit 9d7374c into acemod:master Jul 25, 2015
@jonpas jonpas added kind/feature Release Notes: **ADDED:** and removed status/needs-testing labels Aug 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Release Notes: **ADDED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants