Hello, I am crhttps://www.construct.neteating an RPG and have finished creating a loot drop and inventory system that works. I am now working on making the items in my inventory actually usable. First, I'm working on potions.
I have two objects to achieve this: Obj_item_potions_game and obj_item_potions_inventory. Once of these represents the dropped sprites in game, the other represents the smaller versions that appear in the inventory once they are picked up.
Both objects have the same three animations: ID_ManaPotion, ID_FireBottle, and ID_HealthPotion. These animations represent the three types of potions.
I have managed to allow the player to pick up and drop potions at will and have made it to where a middle mouse click on a health potion will heal the player by two which is what I want.
My issue comes with adding more potions. I'm trying to make it to where the fire bottle potion gets placed in an active items slot when clicked while maintaining the quantity the player has.
I've successfully made this happen, but it happens to all potion types. For example, I click on a fire bottle in the inventory, and it moves to the active slot, but ALSO heals the player, while when I click on a health potion it heals the player, but ALSO, moves a fire bottle into the active slot.
Is there a better way for me to differentiate between my potions so I can make sure they are all doing their own respective things when my player tries to use them?
(Also, I plan on figuring out how the fire bottle will actually be used once this problem is taken care of).
Any help would be greatly appreciated!
youtu.be/pZyvF4SmsHQ Video example of what is happening.