How do I save the state of a layout?

Get help using Construct 2

Post » Thu Jun 19, 2014 3:17 pm

For instance, if I wanted to pause the game and create a menu on its own layout, how would I save the state of the first one (enemy positions, player position, variables, etc)? Thanks in advance.
Ruby Winds: a top-down adventure game inspired by the Oracle series of Zelda games.
Twitter - Devlog/Site
B
15
S
6
G
13
Posts: 55
Reputation: 7,530

Post » Thu Jun 19, 2014 4:37 pm

just use the save and load option option .
before you leave the game layout to go to the pause layout add a save and when you exit the pause layout and go the game layout again " on start of layout load that previous save". -this goes to the game layout-
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Thu Jun 19, 2014 4:49 pm

For pausing a game you can set timescale to 0

To create a pause menu, create a layout in a specific layer. Set the visibility of that layer to on, when the game is paused.
Image
B
32
S
7
Posts: 197
Reputation: 2,527

Post » Thu Jun 19, 2014 6:48 pm

Roccinio wrote:just use the save and load option option .
before you leave the game layout to go to the pause layout add a save and when you exit the pause layout and go the game layout again " on start of layout load that previous save". -this goes to the game layout-


I thought of this, but what if you alter some global variables while the game is paused (e.g. change some game settings)? Won't they be lost if you attempt to reload the save file?
Ruby Winds: a top-down adventure game inspired by the Oracle series of Zelda games.
Twitter - Devlog/Site
B
15
S
6
G
13
Posts: 55
Reputation: 7,530

Post » Thu Jun 19, 2014 7:29 pm

Then you should follow the minion's advice :)
B
15
S
6
G
4
Posts: 277
Reputation: 3,948


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests