Page 1 of 1

Help for Bonus Levels System

Posted: 4 Dec 2016, 22:27
by delete this account
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:

Posted: 4 Dec 2016, 22:55
by Alvespires
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!

Posted: 4 Dec 2016, 23:42
by delete this account
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 407 times

Posted: 5 Dec 2016, 0:03
by Alvespires
Global Variables can only be tested on Game.Not Level Editor.This Might be the problem.