play again option

Get help using Construct 2

Post » Thu Mar 13, 2014 7:19 pm

hi people

i have three layouts and an event sheet for every layout,

my layouts are Menu,Game,Game over.

can i add a function to my game over event sheet that allows me to put a play again option that sends the player back to the game loop from the begining?

thanks
B
4
S
1
Posts: 46
Reputation: 542

Post » Thu Mar 13, 2014 7:25 pm

If you put an option to play again and then tell it to load the Game layout it would restart the game loop for that layout. Basically restarting the game. Since you have it to go to a different layout for the GameOver' the 'Game' layout is unloaded. Loading it back in would restart it. Also if you don't want the global variables to carry over remember to tell it to reset them.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Thu Mar 13, 2014 7:33 pm

thanks for the reply :)
B
4
S
1
Posts: 46
Reputation: 542

Post » Thu Mar 13, 2014 11:04 pm

Your welcome
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Fri Mar 14, 2014 5:50 am

if you want it easily,add Button on Game over layout and Menu layout,then at event sheet,add event>choose Button > On clicked > then add Action >system > Go to layout/Go to layout(by name)
~Everyone can make GAMEs~
B
55
S
11
G
1
Posts: 414
Reputation: 5,786

Post » Fri Mar 14, 2014 10:24 am

If you want to save your high score, Use web storage.
Read the manual.
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306


Return to How do I....?

Who is online

Users browsing this forum: Anonnymitet, atmas, plinkie, tarek2 and 26 guests