I've been developing a game for about a month now, and I've recently run into a wall.
Let's say I have three items in my inventory: an empty glass, a watch, and a bowl. If I want to give the user the ability to use the empty glass on a pool of water and fill it up, using Game.DropItem("glass_empty") and Game.TakeItem("glass_water"). It replaces the empty glass, but puts the new glass at the end of the inventory. How do I get it to keep it in the same position in the inventory as the original, so it looks like it simply replaces it?
Also, using Game.DeleteItem() instead of Game.DropItem() causes the cursor to disappear and freezes the inventory, but I'm not sure why. Game.DropItem() works fine, but obviously I don't want to drop every item back into the scene when I want it to be destroyed or replaced.
Any tips?