Inventory items counter

Get help using Construct 2

Post » Tue Jul 16, 2013 1:11 pm

Hi! I'm finding trouble to do an inventory items counter. I already made my inventory to, when the character collide with an object, alloc into an empty slot if he doesn't have one yet. The problem is that when I create one single time the texts objects to display items quantity, I don't know how to set the value of each one in each text quantity. So I decided to create objects in every loop but the system doesn't overwtrite the quantity of the previus loop and then it ends like this:
http://s1297.photobucket.com/user/ekeas/media/inv_zpsb1ad870e.png.html



Here's my capx file:
https://www.dropbox.com/s/ccns0uu7x24oc2r/Inventory.capx

I would be very happy if anyone could answer my question, I belive it should be bery simple to solve. Thanks and sorry for my bad english.

B
3
Posts: 8
Reputation: 266

Post » Tue Jul 16, 2013 4:46 pm

I fixed your .capx, now it is working perfectly. You were doing things in a bit complicated way, I crossed off pretty much everything you do not need. With the for each loops you were overlaying the previous text and the sprite too, although it was not visible in the game. I made so that the fruits and fruit count is created to the slots on start of layout. To count the number of fruits captured I gave the text an instance variable and it shows which fruit counter is chosen and then +1 is added to it.
Here is the .capx:
http://www.upload.ee/files/3448711/Inventory.capx.html
B
14
S
5
G
4
Posts: 107
Reputation: 4,788

Post » Wed Jul 17, 2013 12:05 pm

@trollface Thanks man. Pick all was what i was looking for.
B
3
Posts: 8
Reputation: 266


Return to How do I....?

Who is online

Users browsing this forum: RogerThompson, SoldjahBoy and 9 guests