How do I make a persistant variable between layouts

0 favourites
  • 5 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • I am trying to make it so when I activate something on layout 1, it drains from a global variable, and when i switch to another layout the draining still continues from that variable, but when i deactivate the object, the variable stops draining.

  • A global variable is global, so it is persistent.

    The actions you perform on the variable are inside event sheets.

    If the "draining" action is not in the event sheet of the new layout it will not be performed.

    So I gues it would just be a case of adding the event and action to the new layout.

  • A global variable is global, so it is persistent.

    The actions you perform on the variable are inside event sheets.

    If the "draining" action is not in the event sheet of the new layout it will not be performed.

    So I gues it would just be a case of adding the event and action to the new layout.

    But its a door that is activated on layer 1, So how would i make that activation register on the second layer aswelll so the draining continues?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use another global variable to register if the door is open.

  • You could use another global variable to register if the door is open.

    THanks man, im a big time idiot, i should've realized that from the beginning, Thanks for the help man

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