Global onDie handler

Plop!

Is there a way to register a global onDie handler? So that as soon as anything dies, a custom function is called with the ID of the dead entity.

Would be nice so that I could stop debugging DeathHooks, which does what you’re asking for:

There have been a myriad of issues/edge cases with my implementation though, so it’s a bit of a mess. But if you want something quick and dirty, feel free to use it.

1 Like

Oh wow thanks but yeah that implementation is horrendous.

It is indeed pretty much exactly what I need. Thanks again!