My goal is to create a system whereby the player accesses the inventory via the menu and chooses to use an item whilst facing an event. If it is the correct combination of item/event then it will use the item and move on , if not then it will say nothing happens. If you stand facing the door and use the key, it will open the door etc. but will not prompt you to use the key if you engage with the door.
As far as I can tell from reading around, this isn't exactly possible - instead, you do things like check the location of the player and see if they are standing in a particular square (for instance, the square adjacent to the event you would use the item on) or perhaps use regions?
Currently, I have worked out how to make it so that the item works only on the correct map using mapID, but not only on the correct space within that map. I suspect I need to check against X and Y coordinates of the player, but I can't work out how to do that.
Any suggestions? Thanks.
As far as I can tell from reading around, this isn't exactly possible - instead, you do things like check the location of the player and see if they are standing in a particular square (for instance, the square adjacent to the event you would use the item on) or perhaps use regions?
Currently, I have worked out how to make it so that the item works only on the correct map using mapID, but not only on the correct space within that map. I suspect I need to check against X and Y coordinates of the player, but I can't work out how to do that.
Any suggestions? Thanks.