Save/Load between Layouts

Discussion and feedback on Construct 2

Post » Fri Jan 17, 2014 2:11 am

I have two layouts (1 and 2). The idea is to go from one layout to another at any time.
I'm using SAVE / LOAD for it.

example:

(LAYOUT1)
keyboard Z ------- system > Save game to slot "1"
------------------ go to LAYOUT2

Start Layout ----- system > LOAD game from slot "1"

(LAYOUT2)
keyboard X ----- system > Save game to slot "2"
------------------ go to LAYOUT2

Start Layout ----- system > LOAD game from slot "2"

___

When I go from one layout to another I get back to the correct position, ok.

But for example, I caught a Layout 2 any object (I used a global variable), but when I go back to Layout 1 I can not see the object that caught the Layout2 because he goes back to where it was saved, and does not understand the new object variable.

could anyone help with this?, or maybe I'm doing completely wrong and maybe change logic
B
11
S
4
G
3
Posts: 120
Reputation: 4,058

Post » Fri Jan 17, 2014 2:45 am

You need to give your objects the Persist behavior, then you wont have to worry about saving between layouts (unless you want to be able to quit the game and start it up later at that spot).
B
99
S
35
G
20
Posts: 438
Reputation: 17,930

Post » Thu Jan 23, 2014 8:59 pm

@AllanR: thanks man, the Persist Behavior works perfect!
B
11
S
4
G
3
Posts: 120
Reputation: 4,058


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests