callbackOnTakeDamage
Posted: Sat Nov 22, 2014 11:37 pm
If you return {dam=0, stopped=true} for example from the callback, DamageType.defaultProjector returns true.
Should you be blocking fire or cold or similar damage, this causes lua errors due to the game then comparing the returned value with 0.
eg.
I'll stop using the stopped flag for now, but it doesn't seem to be working as intended?
Should you be blocking fire or cold or similar damage, this causes lua errors due to the game then comparing the returned value with 0.
eg.
Code: Select all
local realdam = DamageType.defaultProjector(src, x, y, type, dam)
if realdam > 0 then