How do I Make inventory with 2 array

Get help using Construct 2

Post » Sat Feb 06, 2016 1:05 pm

Hello guys, Im having a doubt, i need to create a inventory based in array. i Have two array and i would like that these arrays can do interactions with both; like

ArrayUsed can move item to ArrayInventory;
ArrayInventory Can move item to ArrayUsed;

one of them are Inventory Used; sounds like when the item are equiped;

and Inventory; sound like when you catch in of the ground;

Example like im doing Image


I try to did, but where i try to put item in one, the other clone the same item, where's an example like i did my code;

i.imgur.com/lhpjeQU.png
i.imgur.com/t7xJAQO.png
i.imgur.com/Q6lVD8n.png
i.imgur.com/RPyCUHV.png
i.imgur.com/Ztjj2Fm.png

Thanks;
B
6
Posts: 14
Reputation: 285

Post » Mon Feb 08, 2016 6:44 pm

You need to have an external data source (like a JSON or XML file) that contains item details and item IDs. Then you can store the item IDs in the x & y indices of a single Array object.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Tue Feb 09, 2016 1:10 pm

The datasource is my data base, so what i need to do?
B
6
Posts: 14
Reputation: 285

Post » Tue Feb 09, 2016 3:24 pm

It can be, but it doesn't have to be. You can use a file too, or a LocalStorage array.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 32 guests