From f20c4b7469dccc11dffb79de82f39a1c848e8938 Mon Sep 17 00:00:00 2001 From: SilicaAndPina Date: Wed, 29 Jul 2020 13:23:42 +1200 Subject: [PATCH] Commit Message --- Spaceinator.project.gmx | 3 ++- scripts/use_item_in_inventory.gml | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Spaceinator.project.gmx b/Spaceinator.project.gmx index 932f6a2..d58eca4 100644 --- a/Spaceinator.project.gmx +++ b/Spaceinator.project.gmx @@ -35,6 +35,7 @@ + @@ -58,7 +59,7 @@ objects\obj_dropped_item - objects\obj_dropped_stone + objects\obj_placed_item diff --git a/scripts/use_item_in_inventory.gml b/scripts/use_item_in_inventory.gml index 82e9bc2..6fecaf5 100644 --- a/scripts/use_item_in_inventory.gml +++ b/scripts/use_item_in_inventory.gml @@ -1,12 +1,12 @@ ///use_item_in_inventory(slot) var slotno = argument0; -var count = obj_inv_controller.inventoryCount[slot]; +var count = obj_inv_controller.inventoryCount[slotno]; count--; -obj_inv_controller.inventoryCount[slot] = count; +obj_inv_controller.inventoryCount[slotno] = count; if(count <= 0) { - obj_inv_controller.inventory[slot] = 0; - obj_inv_controller.inventoryCount[slot] = 0; + obj_inv_controller.inventory[slotno] = 0; + obj_inv_controller.inventoryCount[slotno] = 0; }