Issues With Persist Behaviour on Global Layer?

  • So I have an object that has the Persist behaviour. It also is on a Global Layer. There seems to be an issue when I load another Layout that has the Global Layer. The object's properties are reset, but I thought the whole point of Persist was to prevent this?

    If you go to another Layout with the overridden layer, the Persisting object doesn't keep it's properties from the other Layout, and instead resets them. Interestingly, if you go back to the previous layout, the properties will be as you left them.

    What I want is for the object to keep it's properties, as well as Persist Behaviour, without resetting them when going to a new Layout that uses the Global Layer. I need the Persist Behaviour so that the objects don't reset their properties.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • this is a misunderstanding.

    The persistent behavior keeps the properties for objects when returning to the layout where they were placed or created.

    A global layer has the same objects on every layout, but the deafult properties.

    If you want to take an object from layout to layout and keep its properties, you need to place it on an normal layer and enable 'Global' for the object. Another option is to save all properties in an global object like an array or dictionary. You do not have to create any real entries there, but you can also create instance variables and store values like health, exp, strength etc.

  • this is a misunderstanding.

    The persistent behavior keeps the properties for objects when returning to the layout where they were placed or created.

    A global layer has the same objects on every layout, but the deafult properties.

    If you want to take an object from layout to layout and keep its properties, you need to place it on an normal layer and enable 'Global' for the object. Another option is to save all properties in an global object like an array or dictionary. You do not have to create any real entries there, but you can also create instance variables and store values like health, exp, strength etc.

    I Totally forgot you could make an object global. I considered an array, as it's for unlockables so it would work better, but arrays confuse me so I didn't. Thanks!

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