-
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
Dragging - Add hookable events #10304
Conversation
Set box velocity to unit velocity
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.
can't see why this wouldn't work, lgtm
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
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'm opposed to this.
From a physics point of view it makes sense, but I don't like this - it feels whack.
I feel this will allow for more Arma'ing, without providing an actual benefit: All carried items are invulnerable for 2 seconds after being released, as to avoid then taking unjustified damage (placing a carried item shouldn't destroy your box). With this PR, one could make a carried item into a guided and invulnerable projectile. The only thing that's preventing that is that, in most scenarios, is that players can't carry stuff whilst going faster than walking speed - which makes this change unnecessary for most gameplay scenarios anyway.
If you want to implement something like this, what would be better imo is to make public events for the dragging component. That way, 3rd party mods can edit some of the dragging mechanics as they please.
Before anyone undertakes any changes, can I get thoughts from the other ACE devs?
Sounds good to me (though the inspiration for this was in fact to turn it into a projectile, lol) I'll shift it over to a local event shortly, which should allow any mod that wants to turn it into a projectile to do so. |
Do we think dragging should also have an event while we're at it? |
Yes. |
named in keeping with the func names
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.
Imo the events should be raised at the very end. It means that ACE couldn't overwrite anything you'd set: e.g. if you set the position of a dragged person in the event, it will be overwritten by ACE's behaviour (see line 67-70).
Any objections from others?
If you think you need a hookable event earlier for some reason, we can always add a second one (a pre
and a post
event).
EDIT: I've made a branch with the changes I had mind, see https://github.com/acemod/ACE3/tree/dragging-add-hookable-events.
@@ -46,6 +46,7 @@ if (_tryLoad && {!(_target isKindOf "CAManBase")} && {["ace_cargo"] call EFUNC(c | |||
} else { | |||
// Release object | |||
detach _target; | |||
[QGVAR(objectDroppedCarry), [_unit, _target]] call CBA_fnc_localEvent; |
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 would place this inside the main scope and pass _loadCargo
, so that 3rd party mods can intervene even if the item will be loaded into cargo.
@johnb432 |
merged in |
Set box velocity to unit velocityWhen merged this pull request will:
Allow dropped objects to inherit the velocity of the unit carrying them. For instance, running and dropping a box while running will make the box continue forward.IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.