This repository has been archived on 2025-03-23. You can view files and clone it, but cannot push or open issues or pull requests.
spaceinator/scripts/use_item_in_inventory.gml
2020-07-29 13:22:35 +12:00

12 lines
286 B
Text

///use_item_in_inventory(slot)
var slotno = argument0;
var count = obj_inv_controller.inventoryCount[slot];
count--;
obj_inv_controller.inventoryCount[slot] = count;
if(count <= 0)
{
obj_inv_controller.inventory[slot] = 0;
obj_inv_controller.inventoryCount[slot] = 0;
}