Array-based inventory

5
  • 71 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

13,020 visits, 41,986 views

Tools

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

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!