deathAnimations.lua - make Mario's day worse!
Posted: Mon Jul 15, 2024 1:50 pm
Hello there, I've been torturing Mario for a while and now it's time to release this library so you can join in on the fun
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):
By the way, this library is multiplayer compatible! If you use respawnRooms.lua, you'll have to disable quick respawn though to get these animations.
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
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):
Spoiler: show
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