The lack of inertia in SMBX bothered me at least, so here's a little library that fixes that!
inertia.lua v1.1
With this library you keep your momentum on moving npcs, making it a lot easier to stay on a moving platform.
Additionally, your jump height is effected by the vertical speed of the platform! You can get quite a lot of distance with that.
v1.1 fixes two issues:
- Fixed an oversight where jumping to the left capped your speed at your runspeed
- NPC's layer movement now also affects you
You can customize how it works with these:
Code: Select all
local inertia = require("inertia") -- loads the library
inertia.keepSpeed = 1 -- how much speed you keep when leaving the platform
inertia.maxJumpSpeed = -16 -- the highest vertical speed you can get when jumping off a moving platform
inertia.minJumpSpeed = -3 -- the lowest vertical speed you get when jumping off a moving platform.
inertia.maxSpeedX = 6 -- highest horizontal speed. If > 6, you can get faster than your normal running speed, it reverts back to normal when landing
credit if used yadda yadda you know the drill
Here's the download:
https://www.dropbox.com/scl/fo/4in7q8fj ... zn5pp&dl=0