----- Freefalling.lua v1.0 -----
It's a thing that was cooking up for a while now, but now I finally got around to release
freefalling.lua!
Great for setpieces, hub levels and extreme verticality in general!
While you fall slower on default,
hold down to dive down faster!! You can even break through blocks if you are fast enough!
You can also perform a fancy
spin manouver by pressing run/altRun which gives you a little bit more time to dodge, speeds you up when diving and even defends you from enemies!
Start freefalling by touching an (invisble)
freefall starter and stop by landing or touching an (invisible)
freefall canceller.
Use
Target Zones and
Warning Zones to indicate where you should aim for and what you should avoid!
It also comes with a nice little npc, the
Soarhatter (id:789)! Acts just like a springhatter but when you use it's spring, you start freefalling!
Here you can see some fancy freefalling!
Falling was never as fancy as now!
You can even bounce off of enemies and springs!
Do the Barrel Roll! Avoid dodgy situations
Spinning can even defeat enemies!
What using your head looks like:
Cool dodge manouvers, helped by the Target and Warning Areas!
Editor options:
When placing a freefall starter (invisible ingame), you can configure how the freefalling works:
Starting Speed: the speed the player needs to accelerate to until they start freefalling. If 0, you will start freefalling as soon as you leave the ground
Keep Active: If ticked, the player can start freefalling after stopping the freefall again. If not, the player only starts freefalling once.
Fall Damage: the speed the player has to have to take damage when landing on the ground. If 0, there is no fall damage.
When placing a freefall canceller (invisible ingame), you can configurate one option:
Stop for good: If ticked, the player will not be able to get into freefalling afterwards. If not, the player can reenter freefalling when not in this zone
stuff you can use on your own to change how freefalling works:
freefalling.freefall = false, -- makes the player start/stop freefalling
freefalling.falldamage = 0, -- the vertical speed the player needs to be damaged on landing (0 if you don't want that)
freefalling.keepactive = false, -- if the player is able to start freefalling again after landing (without having to find another freefall starter)
freefalling.touched = false, -- if the player touched a freefall starter; when touched, it keeps on true until the player starts freefalling
freefalling.startspeed = 0, -- the speed the player needs to start freefalling. If set to 0, you are always in freefalling mode when in air
freefalling.cancelled = false, -- whether the player touched a freefalling canceller. If true, cancels the freefalling by doing a flip
freefalling.dynamicCam = true, -- Whether the Camera zooms in and out dynamically. You can set it to false to have the camera be static
Can be performed with all (vanilla) characters, though the current spritesheet only has graphics for Mario, Luigi and Toad in the SMW style.
This library uses
customCamera.lua by MDA. If you don't want customCamera support (for... some reason), rename the raw version of freefalling.lua into freefalling.lua and do whatever you think is right with the objectively better version.
Do the same for the Target and Warning Areas.
The tileset used in the level was made by
UnderFlo.
Be cool and
credit me if you use this library, thanks in advance!
How to use:
Copy freefalling.lua and the files for block-800 to block-803 into your episode/level folder. Enter freefalling = require("freefalling") in your luna.lua file and place down a freefalling starter. If you touch it now, you'll start freefalling!
(blocks 802 and 803 as well as npc-789 are optional, but a cool thing to have)
Interested? Here's the download!
https://www.dropbox.com/sh/xuzjmwh7hf1g ... UKp8a?dl=0