Not the ID of equipped Weapons or Armor, but in the inventory.
Context: A system I want to create shall work as follows
Player can buy up to ONE item from a shop -> Shop closes -> Game checks if inventory has Weapon or Armor -> Saves ID of that as variable -> If variable == ID, equip Weapon/Armor with ID -> Clear all Weapons/Armor in inventory (Not equipped)
Through this system, the player should never have any Weapon or Armor in inventory as new ones replace the old equipment immediately upon buying and then the old ones get deleted.
What I specifically need:
A script call that checks Equipment in Inventory and saves its ID into a variable (I chose variable 17)
Due to my attempt to stay away from plug-ins as much as possible (to some extend to hopefully learn ab it) I try to get by with script calls and events.
Context: A system I want to create shall work as follows
Player can buy up to ONE item from a shop -> Shop closes -> Game checks if inventory has Weapon or Armor -> Saves ID of that as variable -> If variable == ID, equip Weapon/Armor with ID -> Clear all Weapons/Armor in inventory (Not equipped)
Through this system, the player should never have any Weapon or Armor in inventory as new ones replace the old equipment immediately upon buying and then the old ones get deleted.
What I specifically need:
A script call that checks Equipment in Inventory and saves its ID into a variable (I chose variable 17)
Due to my attempt to stay away from plug-ins as much as possible (to some extend to hopefully learn ab it) I try to get by with script calls and events.