A simple but effective inventory code. So far this inventory code created in 2 versions. 1st version is
created in 2D arrays and this version is created in ds_map. You can choose which one is more suitable
with your interest.
2D arrays version link : https://marketplace.yoyogames.com/assets/1807/shop-inventory-arrays
This code is divide to 2 common sections which often appear in many games. There are shop inventory
section and player inventory section.
Shop Inventory Section
This section is consist of basic of this inventory code.
The main features include:
Resizeable inventory slots
Highlight slot when mouse meet a slot
Add 1 or multiple item(s) to shop in same time
Buy item then send it to player inventory
Delete added item(s) in shop
Player inventory section
This section is advanced version from shop inventory code. In here, we display 2 inventories in 1 room.
One inventory act like "stash" section & other one act like "equip" section.
The additional features include :
Click and drop item between those inventories
This feature-based performance is like equip & unequip in RPG game
Locked & unlocked slot system
For illustration in this inventory system, We use it to arrange army party:
1st step: in shop inventory section (we call it tavern section): we recruit some army units
2nd step: we deploy & arrange those units in player inventory section (we call it deploy section)