Variables persist through layouts?

0 favourites
  • 4 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • I couldn't seem to find a tutorial or a bit in the manual to help with this.

    Basically I have an item that I want the player to be able to pick up and place in his inventory.

    However I have different levels in different layouts currently.

    Is there a way for the variable that's attached to the item to persist through to other layouts the player may travel to, or is there some other way to do that?

    Thanks in advance!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hexxiss - i think someone in another thread mentioned that global variables will persist in different layouts that that event sheet is attached too.

    as long as you don't have events that reset the global variable on the start of the layout or some where in the event sheet (unless you want something to reset them).

  • There is 'global' switch for every object, turn that on and object will persist through layout keeping it's variables and stuff. :)

    EDIT: wretchedshark For some reason I read question was about global variables as well the first time :)

  • Ok ive found my problem using set text to global variable to see which one wasnt working and it turn out to be the Npc 2 object variable Is there anyway to keep it throughout the next layouts ?

    Edit: its solved i just had to use global var instead of object var. but still my question remain is it possible to define where and how many layout an object variable is and is there a way to keep some global var and reset the other i do not see that function anywhere

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)