How does the bomb explode hook work?
4 replies



23.05.21 06:43:05 pm
I couldn't find enough information about it, but how does the
bombexplode hook work?
The player parameter to be precise, is what I'm asking.
What happens if the player that planted the bomb leaves the game?
Will it still send their ID, or will it not call it at all? Or perhaps, it will send
Thank you.

The player parameter to be precise, is what I'm asking.
What happens if the player that planted the bomb leaves the game?
Will it still send their ID, or will it not call it at all? Or perhaps, it will send
0
?Thank you.
Look at me standing, here on my own again
That's not hard to see it yourself. You can even test it via bots, I believe.
Shit your pants:
Outlast II Mod (29) | Create your UI faster: CS2D UI Framework


That hook is always called. Even if the bomb planter left and even if the bomb item on the map is removed (in the latter case x and y will be 0).
It looks like the player ID will still contain the ID of the player who planted the bomb. Even if that player already left / a new player joined and received the same ID.
The same value is also used for the scoring system. Therefore this special edge case can probably even lead to a bug (wrong player getting extra score for bomb planting without planting it at all).
It looks like the player ID will still contain the ID of the player who planted the bomb. Even if that player already left / a new player joined and received the same ID.
The same value is also used for the scoring system. Therefore this special edge case can probably even lead to a bug (wrong player getting extra score for bomb planting without planting it at all).
I see, I think that should be documented on the website.
Also, will that ever change, or should I override the game action with a Lua script of my own?
EDIT:
It appears that you get the score for planting the bomb even if the bomb doesn't end up exploding (returned 1 on the
bombexplode).
Also, will that ever change, or should I override the game action with a Lua script of my own?
EDIT:
It appears that you get the score for planting the bomb even if the bomb doesn't end up exploding (returned 1 on the

edited 4×, last 23.05.21 11:24:26 pm
Look at me standing, here on my own again
I guess it's a bug that the score is still affected when you return 1 in the hook. Can't tell you if this will be changed/fixed some day. Probably not.
Regarding range:
See
info_bombspot - it's in int[0]. You can use
entity to get that value.
The explosion damage value is 500 when you're exactly in the center of the explosion. The default range (when a range of 0 is specified) is 400.
Regarding range:
See


The explosion damage value is 500 when you're exactly in the center of the explosion. The default range (when a range of 0 is specified) is 400.



