Author Topic: Detecting When A Player Explodes [Solved]  (Read 1420 times)

How can I detect when a player is hit by an explosion that does no damage?
« Last Edit: February 14, 2013, 05:40:37 PM by jes00 »

Could you parent damage, and check if you're receiving explosion damage?
Code: [Select]
function ProjectileData::radiusDamage(%this, %obj, %col, %distanceFactor, %pos, %damageAmt)
« Last Edit: February 14, 2013, 08:45:07 AM by Honorabl3 »

Could you parent damage, and check if you're receiving explosion damage?
Code: [Select]
function ProjectileData::radiusDamage(%this, %obj, %col, %distanceFactor, %pos, %damageAmt)
an explosion that does no damage
That function is not called if the explosion's radius damage is set to 0.

EDIT: I suppose I could set radius damage to 1 and than change %damageAmt to 0 in the function.

DOUBLE EDIT: I still get damaged 0.179 for some reason :/
« Last Edit: February 14, 2013, 09:54:48 AM by jes00 »

Use trace and see if any other functions are being called when the explosion happens. Or instead try setting the damage to -1, or try to return the function instead of redefining a variable?
« Last Edit: February 14, 2013, 11:06:26 AM by Honorabl3 »

Can't you use %damageType in gameConnection::onDeath(%client,%killer,%killerclient,%damageType,%body), or was %damageType something different?

Can't you use %damageType in gameConnection::onDeath(%client,%killer,%killerclient,%damageType,%body), or was %damageType something different?
How can I detect when a player is hit by an explosion that does no damage?