How do I keep all of /sprite/objects

Get help using Construct 2

Post » Fri Sep 15, 2017 7:40 am

Hi,
I am making escpae games so How do I keep all of /sprite/objects working between all layout ?
for example one object take it from 1st layout that object going to inventory and then used in 3rd layout so how keep the object . see the link
prntscr.com/gle0xc
B
12
S
4
Posts: 52
Reputation: 954

Post » Fri Sep 15, 2017 8:33 am

I don't think you can. You need to store your inventory (items, quantity) in some array or dictionary. And then when you change layouts, you re-build your inventory using that data.

To automate and optimize this task you can create a function that fills the inventory with sprites using the data from the array/dictionary. And call this function from all your layouts.
Also, move the inventory area of the screen to a separate layer and set it as Global, so you don't have to duplicate it on other layouts.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
155
Posts: 2,199
Reputation: 82,479


Return to How do I....?

Who is online

Users browsing this forum: Ironic Chef, odiusfly and 3 guests