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

Better Explosive Attachment #1515

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Better Explosive Attachment #1515

wants to merge 2 commits into from

Conversation

am195
Copy link

@am195 am195 commented Nov 7, 2014

Allows for better explosive attachment on the undersides of vehicles
3 seconds where the placement will happen on first collision
after three seconds default behavior

Allows for better explosive attachment on the undersides of  vehicles
3 seconds where the placement will happen on first collision
after three seconds default behavior
@am195
Copy link
Author

am195 commented Nov 8, 2014

This is kinda janky but it get the workaround/fix/idea across.

I probably can clean this up pretty fast. I'm just looking for input. was thinking that it should be click to activate collision attach and click again to drop.

@CorruptedHeart
Copy link
Contributor

That could work, it would be nice to have the collision while the mouse button is held down but that is not possible with our current method of handling it.

@am195
Copy link
Author

am195 commented Nov 9, 2014

Ok I will take a look at adding a click release action but no promises.

@CorruptedHeart
Copy link
Contributor

Check out AGM_Core_fnc_addActionEventHandler. Also check out the bottom of the setupExplosive script for how it is currently handled.

@am195
Copy link
Author

am195 commented Nov 10, 2014

AGM_Core_fnc_addActionEventHandler will not work. You need to use the display action events. The same way that the scroll wheel is handled. I was not happy with the way it was working was kinda being wonky in terms of when it was triggering, don't think it's worth sweating over.
It's click to place and then click to plant. And still testing the collision disable so that you can't push objects with the setup explosive. Should be done tonight.

It might be worth while to go back and rework it at some point menuback does not always trigger on the first press, nor does it trigger on several presses of backspace. Is this worth opening a bug on/the rewrite?

@am195
Copy link
Author

am195 commented Nov 11, 2014

Done! Not tested in MP tho

@@ -35,13 +36,14 @@ _this spawn {

AGM_Explosives_Setup = getText(ConfigFile >> "CfgMagazines" >> _class >> "AGM_SetupObject") createVehicleLocal [0,0,-10000];

AGM_Explosives_Setup enableSimulationGlobal false;
//AGM_Explosives_Setup enableSimulationGlobal false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this not need to be uncommented?

Copy link
Author

Choose a reason for hiding this comment

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

enableSimulationGlobal false disables EpeContactStart

Copy link
Contributor

Choose a reason for hiding this comment

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

EpeContactStart only needs to be activated when the left clicking for the first time.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather have this set to false here because anything could happen in a MP environment and I'd rather avoid weird issues related to collisions.

@KoffeinFlummi
Copy link
Owner

@CorruptedHeart @am195 Is this ready for merging?

@am195
Copy link
Author

am195 commented Dec 4, 2014

Ready on my end... I think it's in a ok state to merge if CorruptedHeart is good with it!

@am195
Copy link
Author

am195 commented Dec 4, 2014

String table might need to updated tho

_unit setVariable ["AGM_Explosive_Place", [_unit, "DefaultAction", {AGM_Explosives_pfeh_running AND !isNull (AGM_Explosives_setup)}, {call AGM_Explosives_fnc_Place_Approve;}] call AGM_Core_fnc_AddActionEventHandler];
_unit setVariable ["AGM_Explosive_Place", [_unit, "DefaultAction", {AGM_Explosives_pfeh_running AND !isNull (AGM_Explosives_setup)}, {
_unit = call AGM_Core_fnc_player;
AGM_Explosives_Setup setVariable ["AGM_Enable_Place", 1];
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this extra variable. It won't be needed. You can simply set AGM_Explosives_Setup enableSimulationGlobal true; to enable EPEContact related events and everything should work fine.

@CorruptedHeart
Copy link
Contributor

I have commented on the various issues or niggly points that I can see within this pull request, once those are fixed it can be merged. Or even merged and then fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants