How to make inventory?

Basically it involves using global variables as inventory slots.
The simplest arrangement is one variable for one item, only. It gets more complex if you want to carry more of the same item as you'd need another variable to store the quantity.

The most important part and also tough to code part is registering part: getting an item and place it in a slot. I've coded such system in D&D: Rise of Warduke years ago.
 
Back
Top Bottom