I'm currently working on a 2D direct control game with cursor frozen & hidden. The thing I want to achieve is 1) open inventory & select an item 2) selected item displays above the player's head 3) close the inventory, but the item remains above the player 4) when interacting with a hotspot, it then checks the item above the player's head and does stuff.
However, I couldn't let the item remain selected after closing the inventory menu, and I need the menu to be closed when interacting with the hotspot (otherwise the game would be paused). I used a separate menu with an inventory box element set to display selected item to appear above the player, and it did display the item, but again only when the inventory menu was open. I couldn't figure out a way to do it--setting it to display last selected item may be a workaround, but then there seems to be no action that checks the last selected item, only the currently selected one.
What should I go about doing it? Is there an option to make an item remain selected even after closing the inventory menu? Thank you.
Comments