-
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
Explosives - Add code handler for detonation #5115
Conversation
Having the examples in the wiki would be splendid 😄 |
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 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.
During testing it seems that cellphone triggers don't trigger the DetonateHandlers. Investigating further. |
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. |
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.
Looks good to me
Close #5101
Allows mission/addon makers to block detonations in the explosive system.
See example in addDetonateHandler.sqf