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

Explosives - Add code handler for detonation #5115

Merged
merged 3 commits into from
May 10, 2017

Conversation

PabstMirror
Copy link
Contributor

Close #5101

Allows mission/addon makers to block detonations in the explosive system.
See example in addDetonateHandler.sqf

@PabstMirror PabstMirror added this to the 3.10.0 milestone Apr 30, 2017
@PabstMirror PabstMirror added kind/feature Release Notes: **ADDED:** kind/enhancement Release Notes: **IMPROVED:** labels Apr 30, 2017
@bux
Copy link
Member

bux commented Apr 30, 2017

Having the examples in the wiki would be splendid 😄

Copy link
Member

@CorruptedHeart CorruptedHeart left a comment

Choose a reason for hiding this comment

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

I noticed there is no way to remove a DetonateHandler, because it is using a simple array for storage. I don't know if we want to just communicate that in the wiki, that you cannot remove a DetonateHandler and must provide your own way of disabling it, if it's not required.

@CorruptedHeart
Copy link
Member

During testing it seems that cellphone triggers don't trigger the DetonateHandlers. Investigating further.

@CorruptedHeart
Copy link
Member

Okay, I found what the issue is. Timer based explosives and Cellphone explosives use -1 as range. The example code has a check for range initially and allows the explosion if range is < 0.

So I guess maybe just change the example code to have the cellphone check before the initial range check.

Copy link
Member

@CorruptedHeart CorruptedHeart left a comment

Choose a reason for hiding this comment

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

Looks good to me

@PabstMirror PabstMirror merged commit 08217f4 into master May 10, 2017
@PabstMirror PabstMirror deleted the explosives-detonationHandler branch May 10, 2017 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:** kind/feature Release Notes: **ADDED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants