Is character blocking until something happens a thing?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

mariobrigade2018
Eerie
Eerie
Posts: 719
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Is character blocking until something happens a thing?

Postby mariobrigade2018 » Sat Jun 10, 2023 12:58 pm

Is there a way to prevent a player from using a character UNTIL a level has been beaten or an event happens using LunaLua? This was an idea that came in my head a while ago, but I'm not sure if this is possible.

Gaming-Dojo
Tweeter
Tweeter
Posts: 143
Joined: Mon Jan 25, 2016 9:20 am
Pronouns: he/him
Contact:

Re: Is character blocking until something happens a thing?

Postby Gaming-Dojo » Fri Aug 08, 2025 8:07 am

You could place some character blocks preventing the character from passing and put them on their own layer.
Then, you create an SMBX event which hides that layer and trigger it when the condition is met. However, this can compromise the visuals a lot, especially if many characters should be blocked. An alternative should be changing navigation in the char select menu on the overworld so the unwanted characters are skipped. Really removing the characters from the overworld's char select menu should be really difficult if at all possible. Another possibility might be avoiding the built-in overworld char select menu from being accessed at all and replacing it with a custom char select menu. With a custom char select menu, it's easy to configure, which character can be selected depending on whether or not certain conditions are met.

Gaming-Dojo
Tweeter
Tweeter
Posts: 143
Joined: Mon Jan 25, 2016 9:20 am
Pronouns: he/him
Contact:

Re: Is character blocking until something happens a thing?

Postby Gaming-Dojo » Sun Aug 10, 2025 11:36 am

hello mariobrigade,

I know have looked into the character block thing some more and also inspired by another post here in the help forums, decided to write a script for a character select screen. With that script, you can also specify that characters are locked at the beginning as well as when they should be unlocked.
You can view the script here: viewtopic.php?t=30351


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 10 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari