Introducing
deathAnimations.lua v1.0
Instead of dying the ordinary way with the ordinary (and boring) death effect, let the player react to their demise in unique ways!
This library overrides the normal death animation and lets you register your own instead.
You'll need some lua knowledge to register your own death animations!
To register a death animation, you'll need three functions:
- checkFunc(p): return true when the player has died to the desired source. You might need do some trickery with this
- tickFunc(p,data): onTick() equivalent. Use it to set values in the data table, which you can use to draw the death animation in
- drawFunc(p,data): onDraw() equivalent. Draw the death animation here, using values from the data table
(Note: data.deathTimer is reserved and counts up every frame, starting with 1. Don't forget to end an animation with deathAnimations.endAnimation(p))
Here are some examples (gone wrong):
Don't be as cruel as I am and credit me if you use this library.
interested? Then here's the download!
deathAnimations.lua v1.0