Help for Bonus Levels System

Description: Subforum dedicated to SMBX-38A - a fan-made remake of the original SMBX Engine, made by 5438A38A.
Forum rules: This is official Europan/American community for the SMBX-38A. Suggested to don't post stuff for this engine outside this subforum.
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

delete this account
Topic author
delete this account
Topic author

Post #1by delete this account » 4 Dec 2016, 22:27

I want to make Bonus levels with a system of waiting for the player to complete 3 simple levels AND after he do that, the player unlocked these Bonus levels, if he complete one of them, the Bonus levels got locked and he have to complete 3 more simple level. (It can be the same as last time)

I wonder if someone can help me... :cry:

Alvespires M
Count
Count
Avatar
Alvespires M
Count
Count
Age: 19
Reputation: 17
Posts: 227
Joined: 20 Aug 2016
Location: Koopa Troopa Beach

Post #2by Alvespires » 4 Dec 2016, 22:55

OK,so now you make a wall in the bonus level blocking it's entrace with a layer.I'll call "Wall" as an example,and an event that hides it.

You also create a Global Variable in world.I'll call it "Bonus" as an example.

On ALL of the levels,on it's ending,you make it call a Event.Example:After I pick up the SSW ending,his "Death" event will call the event that calls an script and then create another event that calls another Script.On the 1st Event,Inside the Script it calls,write:

Spoiler
If gval(nameofvariableyoucreatedhere) < 4
Then Call TCreate(nameofthe2nd event here,0)
End If

Then,on the Script that the 2nd event calls:

Spoiler
gval(nameofthevariable)=gval(nameofthevariable)+1


Now,on the level Bonus,create a Event that will happen right after player enter on the level (Level-Start),and that Event will call a script.On it,write:
Spoiler
If gval(nameofthevariable) = 3 Then
Call TCreate(name of the event that hides the wall,0)
gval(nameofthevariable)=gval(nameofthevariable)-3
End if

That Should Work.Hope it helps you!
"This giant fish is a mouth breeder, so it spits babies out of its mouth at Mario." - Nintendo Power Strategy Guide for Super Mario Bros. 3

I didn't left this forum. I still come here every in a while but I don't really have anything to say.

I think I also probably lost it.

I'm supporting:

Spoiler

Image

delete this account
Topic author
delete this account
Topic author

Post #3by delete this account » 4 Dec 2016, 23:42

Sorry but, he didn't work... :bads:

Spoiler
I'm so bad with scripts, I wonder if is possible to make this system with like these functions:
Capture.PNG
Capture.PNG (8.5 KiB) Viewed 339 times

Alvespires M
Count
Count
Avatar
Alvespires M
Count
Count
Age: 19
Reputation: 17
Posts: 227
Joined: 20 Aug 2016
Location: Koopa Troopa Beach

Post #4by Alvespires » 5 Dec 2016, 0:03

Global Variables can only be tested on Game.Not Level Editor.This Might be the problem.
"This giant fish is a mouth breeder, so it spits babies out of its mouth at Mario." - Nintendo Power Strategy Guide for Super Mario Bros. 3

I didn't left this forum. I still come here every in a while but I don't really have anything to say.

I think I also probably lost it.

I'm supporting:

Spoiler

Image


Return to “Super Mario Bros. X by 38A (SMBX-38A)”

Who is online (over the past 5 minutes)

Users browsing this forum: 3 guests