Rendering a Dynamic Inventory System

Get help using Construct 2

Post » Fri Aug 02, 2013 11:53 am

I'm currently using a Dictionary for my inventory system. Right now I assume the player has one of each type of object:



You'll notice that I use a local variable modifier for rendering. However, the thing I'm having trouble with is setting up rendering in the case one of the objects does not exist. For example, if there are no "Hack" objects in the inventory, the rendering of the two other objects will need to be moved over since the Hack will not be rendered.

How would you render an inventory that accounts for this dynamic?

BoardGame.capx
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Fri Aug 02, 2013 11:57 am

Something like this.

.capx

Note:
I set the HackCount value to 0 to test it.cvp2013-08-02 11:58:58
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Fri Aug 02, 2013 12:03 pm



But now the Hack seems missing:

Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224

Post » Fri Aug 02, 2013 12:12 pm

As i wrote the HackCount is set to 0 for testing
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Fri Aug 02, 2013 12:12 pm

This problem is now fixed :)
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,224


Return to How do I....?

Who is online

Users browsing this forum: SoldjahBoy, Yahoo [Bot] and 9 guests