How do I make a global layer remember its state?

Get help using Construct 2

Post » Mon Oct 26, 2015 7:42 am

Hi!,

So, I have a global layer (which is the menu of the game). When I buy an item, I make its sprite spawn in the menu. When I move to another layout, the item is not longer there, the global layer has reseted! :|

Yes, the global layers are named the same, and are at the same position on every layout.

Thanks for the help.
B
25
S
8
Posts: 84
Reputation: 1,697

Post » Mon Oct 26, 2015 8:00 am

From the manual:

"If a layer's Global property is set to Yes, then every layer in the project with the same name is overridden by that layer. The initial objects, as well as its properties, are used instead of the other layer's own content and properties."

to have objects on the layer keep their values etcetera, you have many choices..
Global variables, Global objects and saving to local storage, are the most used..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Oct 26, 2015 10:42 pm

LittleStain wrote:From the manual:

"If a layer's Global property is set to Yes, then every layer in the project with the same name is overridden by that layer. The initial objects, as well as its properties, are used instead of the other layer's own content and properties."

to have objects on the layer keep their values etcetera, you have many choices..
Global variables, Global objects and saving to local storage, are the most used..


I see, thanks for the reply! I'll try one of those options.
B
25
S
8
Posts: 84
Reputation: 1,697


Return to How do I....?

Who is online

Users browsing this forum: leena222, mindragon73, tatogame and 22 guests