How do I change layout at certain score?

Just started using Construct 2? Post your questions here

Post » Tue Apr 22, 2014 5:36 pm

Hello I've just made my first game using a score system. I want to make so if you reach a score higher than 50 when you finish the game I want a different layout to appear than the normal I use. Would really appreciate help how to make the layout atleast change when it reaches a certain score.
B
2
Posts: 5
Reputation: 212

Post » Tue Apr 22, 2014 6:00 pm

Yoi can create an event like below:
System > Compare variable (score = 100) -- System > Go to Layout (whatever layout).

Hope that helps.
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Tue Apr 22, 2014 6:02 pm

https://www.scirra.com/manual/125/system-actions
Go to layout
Go to layout (by name)
Switch to another layout in the project. Note that global variables keep their current value - they are not reset. To reset them use the system action Reset global variables.

Make an event that checks if the variable that holds your score is greater or equal to 50 then add action from above .
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Tue Apr 22, 2014 6:05 pm

just create a global variable "score" and store there the score of the game.
then create another one that when you finish the game you give it a number. (gb "finished_game "=1)
then on your event sheet say
"score"=50 ----- ---------------------go to layout "new"
"finished_game"=1
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Tue Apr 22, 2014 6:26 pm

Thanks, helped! :)
B
2
Posts: 5
Reputation: 212

Post » Tue Apr 22, 2014 6:41 pm

I wonder if someone could explain a little easier how to make the layout appear when score is above 50 but making the game endless. Want to be able to add a leaderboard after :)
B
2
Posts: 5
Reputation: 212


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests