How do I save the items in my inventory between layouts?

0 favourites
  • 4 posts
From the Asset Store
Inventory Aid
$4.90 USD
Create grid-based game inventories and items easily.
  • Hi again,

    I followed this tutorial: (https://www.youtube.com/watch?v=FdhFzrF1UhQ) to make an inventory system. However, the items in the inventory doesn't save between layouts. How do I make it do that?

    My first instinct is to use the object type 'Local Storage', but I wondered if you had any other ideas.

    Tagged:

  • I would put them on a global layer which acts like a HUD and remains between layouts, so where you create the objects (layer 0 in the tutorial) give that layer a global property and make sure in the other layout you have the same named layer.

    Another option is to make the inventory and objects you can pick up 'global objects', checkbox on object properties, which accomplishes the same thing.

    Also if you happen to mean a design something like going to another layout then returning to an 'inventory layout' so the inventory is always in one layout then there is something called Persist behaviour you can put on the objects which means the inventory will look the same when you return.

  • Sorry, but both of the options you suggested don't work. I also don't mean returning to inventory layout.

    Also, the inventory is separate to each layout. Maybe arrays?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Actually, scratch that, I made the inventory window global (keeping them on the same layout and put the items on a global layout and it works.

    Thanks!

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