Restart layout issues?

Just started using Construct 2? Post your questions here

Post » Fri May 13, 2016 11:07 pm

"Restart layout" seems pretty obvious but when I start the command in game, the game doesn't reset as if it was the first time it started. What can screw this up? Shouldn't everything reset, including globals/locals and the position of the sprites? It's kind of screwing everything up.
B
13
S
4
G
1
Posts: 54
Reputation: 1,440

Post » Fri May 13, 2016 11:22 pm

If you use the same layout for levels, then you need to set your globals and Restart, which then makes any alterations based on your settings.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Fri May 13, 2016 11:47 pm

Each level has it's own layout and event sheet. @blackhornet
B
13
S
4
G
1
Posts: 54
Reputation: 1,440

Post » Sat May 14, 2016 12:24 am

My example was just that - an example of why you wouldn't want that behaviour.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Wed May 25, 2016 4:25 am

I am facing same problem as restarting layout wasn't able to reset the game .............

Our game is just a top down racing game but somehow after restarting the layout using "Restart Layout" isn't working as it should .............

So what is the solution for that ???
Image
B
36
S
13
G
1
Posts: 99
Reputation: 3,051

Post » Wed May 25, 2016 5:11 am

You can try resetting globals, or alternatively, Browser.Reload. One of those should work.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Wed May 25, 2016 12:45 pm

Close the game in the browser 1st , then restart layout.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 682
Reputation: 16,615

Post » Sun May 29, 2016 8:44 pm

Do any of your objects have the "persist" behavior? If so, add "system -> reset persisted objects" to your event that restarts the layout.
Eh, Steve!
B
115
S
54
G
13
Posts: 112
Reputation: 16,150


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests