-
Notifications
You must be signed in to change notification settings - Fork 84
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
base: master
Are you sure you want to change the base?
Conversation
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
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. |
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. |
Ok I will take a look at adding a click release action but no promises. |
Check out AGM_Core_fnc_addActionEventHandler. Also check out the bottom of the setupExplosive script for how it is currently handled. |
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 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? |
Less Jank
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; |
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.
Would this not need to be uncommented?
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.
enableSimulationGlobal false disables EpeContactStart
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.
EpeContactStart
only needs to be activated when the left clicking for the first time.
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'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.
@CorruptedHeart @am195 Is this ready for merging? |
Ready on my end... I think it's in a ok state to merge if CorruptedHeart is good with it! |
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]; |
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.
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.
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. |
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