HELP! Episode PROGRESS!

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

Moderator: Userbase Moderators

SuperSmashbroFanX
Banned
Posts: 83
Joined: Sun Jan 26, 2020 6:33 am

HELP! Episode PROGRESS!

Postby SuperSmashbroFanX » Wed Jan 29, 2020 4:09 pm

Is there a way to have progress in a level? For example when you beat a certain level in an episode the hub level will have new areas unlocked and things changed

Added in 2 minutes 53 seconds:
Also more help! Why Isnt there option to choose a bowser game or megaman game when I start? And also if that ever gets brought into smbx2 is there a way for them to automatically start in a specific area in the game instead of Mario?

Murphmario
2025 Egg Hunter
2025 Egg Hunter
Posts: 2389
Joined: Fri Dec 20, 2013 7:07 pm
Pronouns: he/him

Re: HELP! Episode PROGRESS!

Postby Murphmario » Wed Jan 29, 2020 9:14 pm

Maybe you could have a global variable that activates once you collect the goal item. If the variable is set to one, then an event happens where the area changes.

SuperSmashbroFanX
Banned
Posts: 83
Joined: Sun Jan 26, 2020 6:33 am

Re: HELP! Episode PROGRESS!

Postby SuperSmashbroFanX » Wed Jan 29, 2020 10:41 pm

Murphmario wrote:
Wed Jan 29, 2020 9:14 pm
Maybe you could have a global variable that activates once you collect the goal item. If the variable is set to one, then an event happens where the area changes.
How do I do it!!? :cry:

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9865
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: HELP! Episode PROGRESS!

Postby Emral » Thu Jan 30, 2020 1:15 am

SMBX has something like this built in with star exits. Any warp in the game can have a minimum required amount of stars to enter.

Wiimeiser
Snifit
Snifit
Posts: 215
Joined: Mon Jun 24, 2019 4:36 am
Flair: What?

Re: HELP! Episode PROGRESS!

Postby Wiimeiser » Thu Jan 30, 2020 6:42 am

I'm pretty sure you could code custom LUA to show and hide specific layers.

SuperSmashbroFanX
Banned
Posts: 83
Joined: Sun Jan 26, 2020 6:33 am

Re: HELP! Episode PROGRESS!

Postby SuperSmashbroFanX » Thu Jan 30, 2020 6:51 pm

I’m not using stars in my episode though. What’s a global variable???

IAmPlayer
Volcano Lotus
Volcano Lotus
Posts: 560
Joined: Sun May 21, 2017 3:36 am
Flair: I'm a hellspawn.
Pronouns: he/him
Contact:

Re: HELP! Episode PROGRESS!

Postby IAmPlayer » Thu Jan 30, 2020 10:55 pm

SuperSmashbroFanX wrote:
Thu Jan 30, 2020 6:51 pm
I’m not using stars in my episode though. What’s a global variable???
SaveData table and GameData table is a table that can be filled with variables that are saved between levels (aka global variables). The difference between SaveData and GameData is that GameData got discarded after a game session ends (example: when the player exit to main menu), while SaveData doesn't get discarded after a game session ends, which is more useful for progression.

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9865
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: HELP! Episode PROGRESS!

Postby Emral » Sat Feb 01, 2020 4:22 am

1AmPlayer wrote:
Thu Jan 30, 2020 10:55 pm
SuperSmashbroFanX wrote:
Thu Jan 30, 2020 6:51 pm
I’m not using stars in my episode though. What’s a global variable???
SaveData table and GameData table is a table that can be filled with variables that are saved between levels (aka global variables).
To clarify:
Global variables are something different, technically. A variable is global when not prefixed with local. All this means is that global variables are accessible outside of the script they're defined in. SaveData and GameData are special global variables, because basegame runs code over them to ensure that their contents carry through between levels.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari