Array-based inventory

  • 65 favourites

Index

Attached Files

The following files have been attached to this tutorial:

.png
.capx

array-based-inventory.capx

Download now 83.25 KB

Stats

7,088 visits, 25,646 views

Tools

Practice

First of all, create 4 objects:

1. Sprite - slot (invetory slot)

with 3 variables:

id, item, number

It will help us to work with the information.

Add second frame for this sprite to distinguish between the normal and the selected slot:

2. Sprite - item (your items)

with 1 variable:

number

3. Array - inventory (your inventory array)

Set size to (the planned number of slots (we will use 5),2)

Remember, that arrays in Construct 2 is 0-based. So if you have 5 slots width array, it will start from 0 to 4.

4. Mouse - just mouse object, huh

Add varialbles about which I wrote earlier:

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!