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
9
S
3
Posts: 39
Reputation: 703

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 :)
B
17
S
9
G
71
Posts: 1,082
Reputation: 38,727


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 22 guests