#Critical hit
1 messages · Page 1 of 1 (latest)
Sure. When your unit uses a modifier which triggers a critical hit, call a function that stores it on the caster, with other properties such as triggering modifier, current dota time etc.
Then you can make another function that can fetch critical hits based on stats such as time difference or damage, etc.
i dont quite understand, approximately what should this look like?
the hacky solution is usually to register a crit property, set its getcritdamage to 1 and then listen for a roll in the property itself
if it isn't triggered, you crit
its rolled on attackrecord, so you can then listen to onattack and say "it didn't trigger, therefore this is a crit"
but if all your shit is custom you can just tell your code you crit
add a flag to the unit or whatever