Hello!! I am currently making an RPG game for my website. Everything is going smoothly, except one small part - discarding from the inventory. In order for you to understand what I’m doing, I’m going to give some explanations of how this game is designed:
-The background/everything but the character (which I am calling the ‘area’) moves, not the character. The character is constantly in the center of the screen.
-When the character touches an item (which is part of the area) their is a function for the item that makes it’s x & y coordinates equal the coordinates of the slot for the item.
-To use/equip an item, the user has to hit a key that corresponds with the slot for the item.
So, I want some way to discard, be it clicking on the item, doing a certain keypress, etc. As long as it is not too complicated for the user (this is a hack and slash) to do when it’s safe, enemies are around, or even if their about to be eaten by a carnivorous rock (which will be one of the enemies:P). When the item is discarded, I don’t care whether it appears at the characters feet (this._y = guy_y - 20) or, to just reset the item to where it originally was. If you can help me, please do (and thank you!).