How do I make the layout not restart

Get help using Construct 2

Post » Mon Jun 15, 2015 8:11 pm

to get started pardon my English the google traslate.

I wonder if it is possible, that the return to a layout, flies to be as I leave before going to another layout.

game example:

layout 1 - there are planets and my ship, then I go to the planet and entered the layout 2

Layout 2 - I am inside the world that can break as you want and then exit the planet and get to layout 1

layout 1 - you re-enter the layout 2

Layout 2 - and everything is as you left it the last time you

image example:

Image

save and load the system works.
but to move things in my inventory. the layout 2. does not work with save and load

help ! XD
Image
B
59
S
21
G
9
Posts: 29
Reputation: 8,979

Post » Mon Jun 15, 2015 10:12 pm

Wouldn't the persist behaviour work?

Anything that has it keeps its state when leaving and returning to its layout.
B
12
S
3
Posts: 33
Reputation: 897

Post » Tue Jun 16, 2015 4:01 am

That's a really good question :0
I liked the way you think my friend.

Well depending on what you want to do, you might want to use the persist behavior just like VonFirflirch said.

Or you can use the web/local storage to save only particular values.

There are several tutorial about this that can teach you a lot. Give them a try and come back here to tell us how the game is coming up :D
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Tue Jun 16, 2015 12:30 pm

Yeah persist is good for your problem
B
113
S
29
G
48
Posts: 1,883
Reputation: 36,580

Post » Wed Jun 17, 2015 4:06 pm

Thanks to everyone!

Are right. Behaviour persist. It works perfect! :D
Image
B
59
S
21
G
9
Posts: 29
Reputation: 8,979

Post » Thu Jun 18, 2015 1:56 am

In my project, for some reasons, this behavior can't work. Then, in cases like the my own, is possible using Local Storage plugin, saving the object's position and instance variables' values, and reading from Local Storage value's on start of layout.
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
28
S
9
G
4
Posts: 359
Reputation: 4,246


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests