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

add event for placing units in body bags #3022

Merged
merged 1 commit into from
Jan 5, 2016
Merged

add event for placing units in body bags #3022

merged 1 commit into from
Jan 5, 2016

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Dec 12, 2015

ref: #3021

["placedInBodyBag", {systemChat str _this}] call ace_common_fnc_addEventhandler

0: dead body
1: body bag object

executed on all machines

@commy2 commy2 added the kind/feature Release Notes: **ADDED:** label Dec 12, 2015
@commy2 commy2 added this to the 3.5.0 milestone Dec 12, 2015
@jonpas
Copy link
Member

jonpas commented Dec 12, 2015

Does the dead body retain information about what gear was on it as well?

@thojkooi
Copy link
Contributor

A global event won't work. The target is already removed before the event gets triggered. MAYBE a local event works. Depends on the implementation - I am not certain if the event gets called right away or next frame?

@commy2
Copy link
Contributor Author

commy2 commented Dec 12, 2015

The target is already removed before the event gets triggered. MAYBE a local event works. Depends on the implementation

Definitely needs some testing. Localy the event does work (I tested it). I don't think the deleteObject is transfered faster than the publicVar, so the chances are good.

Does the dead body retain information about what gear was on it as well?

Yes. Except for the primary weapon of course.

@jonpas
Copy link
Member

jonpas commented Dec 12, 2015

Yes. Except for the primary weapon of course.

Awesome, primary weapon gets dropped right? So it doesn't get deleted with the dead body either?

@commy2
Copy link
Contributor Author

commy2 commented Dec 12, 2015

Yes.

@jonpas
Copy link
Member

jonpas commented Dec 12, 2015

Thanks!

@commy2
Copy link
Contributor Author

commy2 commented Dec 12, 2015

Works in local hosted multiplayer. The event triggers with the object reference before it is deleted.

@thojkooi
Copy link
Contributor

What about on a dedicated server, where another player puts a body into a bodybag?

@commy2
Copy link
Contributor Author

commy2 commented Dec 14, 2015

Can't test that, but I see no reason why it would be different there.

An alternative to this would be to make this an event that only triggers on the machine where the dead body is local and the same event does the deleting with execNextFrame.
Does that sound more reliable?

commy2 added a commit that referenced this pull request Jan 5, 2016
add event for placing units in body bags
@commy2 commy2 merged commit 7eaa55f into master Jan 5, 2016
@commy2 commy2 deleted the bodybagevent branch January 5, 2016 20:59
@PabstMirror PabstMirror modified the milestones: 3.4.2, 3.5.0 Jan 5, 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.

4 participants