Quick Respawn Key

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

Moderator: Userbase Moderators

LooKiCH
Blooper
Blooper
Posts: 159
Joined: Tue Jun 13, 2017 11:28 am
Pronouns: he/him
Contact:

Quick Respawn Key

Postby LooKiCH » Wed Jun 01, 2022 4:42 pm

Are you tired of waiting for the world map to load after the file, then the level to load? I wrote a script that allows you to quickly restart the level by simply pressing the F8 key

screenshots: show
With reset powerups
Image
Without reset powerups
Image
how to use: show

Code: Select all

local quickrestart = require("quickrestart")
copy this code and paste it into the luna.lua file

P. S. You can apply the script to all episodes by dropping the quickrespawn.lua file into the "scripts" folder
And then paste the code into the lunabase.lua file (at the end of the file) (in "scripts/base/game")
settings: show

Code: Select all

quickrestart.resetpowers = true -- Reset powerups to the state it was at the start of the level (if at least one player is alive)
quickrestart.losepowerups = true -- Lose power-ups if all players have died
quickrestart.loselives = true -- Lose 1-UPs if all players have died
quickrestart.restartkey = VK_F8 -- Quick restart key, you may change a key
Keycodes List

DOWNLOAD v1.1
Test Level

changelog: show
v1.1:
• Saving powerups works even if it's a deprecated checkpoint
• Fixed bug of saving lives
Last edited by LooKiCH on Tue Feb 06, 2024 3:35 pm, edited 4 times in total.

Blake Izayoi
Volcano Lotus
Volcano Lotus
Posts: 598
Joined: Sun Feb 23, 2014 1:55 pm
Flair: Sakuya's Husband
Pronouns: He / Him
Contact:

Re: Quick Respawn Key

Postby Blake Izayoi » Sun Jun 12, 2022 1:23 am

This seems like it could really be useful for speedrunning, but I feel as though if someone is training to speedrun a level that they'd just use the level editor instead.
Nonetheless, cool script!

LooKiCH
Blooper
Blooper
Posts: 159
Joined: Tue Jun 13, 2017 11:28 am
Pronouns: he/him
Contact:

Update: Quick Respawn Key v1.1

Postby LooKiCH » Wed Jun 22, 2022 3:59 pm

• Saving powerups works even if it's a deprecated checkpoint
• Fixed bug of saving lives
DOWNLOAD v1.1
Test Level


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari