fastClimb.lua [v1.0] - Just climb faster lol

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

FutureNyanCat
Eerie
Eerie
Posts: 764
Joined: Fri Dec 20, 2013 8:39 pm
Flair: Species: Felis robotus
Pronouns: He/Him
Contact:

fastClimb.lua [v1.0] - Just climb faster lol

Postby FutureNyanCat » Wed Nov 20, 2024 12:13 am

fastClimb.lua - Just climb faster lol
Random script I made where the player can press the RUN key (defaults to X on Windows) to climb on vines or fences faster. Nothing too fancy, but also relies on Redigit jank. Also works if ALTRUN is pressed.

Demo:
Spoiler: show
Image
Warnings:
  • This script is not multiplayer compatible. I currently can't figure out how to make this work, so if anyone's interested in making it multiplayer-compatible, be my guest.
  • This script is based on Redigit jank where vines (or any NPC with isvine set to true) will not move when setting speedX or speedY, but can push the player while climbing on them. This trick is also used for the Conveyor Vine NPCs in my NPC pack.
  • Please note that if a custom vine's script also sets their speedX and speedY per tick, they will override this script unless if the level is frozen with a green P-Switch or stopwatch.
  • This script will obviously not work on vines/BGOs set on a moving layer, unless if the layer's x-speed or y-speed is set to 0, for similar reasons to the aforementioned Redigit jank.
  • Lineguided ropes (npc-338) will not function with the properties of fastClimb. This is intentional, as changing the x and y speed can cause lineguided ropes to misalign with the engine they are attached to.
Instructions:
To install this, just put the script in your level folder, and simply add this to your luna.lua file to make it work:

Code: Select all

local fastClimb = require("fastClimb")
You can set two settings: one for adjusting the y-speed and x-speed used when fast-climbing:

Code: Select all

fastClimb.climbSpeedY = 1.4 -- speed when climbing up or down. (DEFAULT: 1.4)
fastClimb.climbSpeedX = 1.4 -- speed when climbing left or right. (DEFAULT: 1.4)
DOWNLOAD (v1.0)

Return to “LunaLua”

Who is online

Users browsing this forum: FutureNyanCat, Smashhacker and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari