Use item from menu at location

Hello everyone!

I'm trying to replicate what quite a few rpgm horror games do,
where you chose an item from the inventory at a specific location to use it.
(Like selecting a key from the menu infront of a door to open it)

SRD has this tutorial about it

but I did run into an error, as there always only will play the else branch text,
I scrolled into the comments and a few people had the same problem in the last couple months...

I wonder if some RPGMMV update might have changed the scriptcall that would need to be done?
I'm not sure, but I vaguely remember that some functions changed at some point? Though I might be mistaken.
This is what is used as an conditional brach within a common event attached to the item within SRD's tutorial:
$gamePlayer.scrolledX() == x && $gamePlayer.scrolledY() == y && $gamePlayer.direction() == direction (2,4,6,8) && $gameMap.mapId() == mapID

Help anyone?
Thanks! :3
Don't use .scrolledX and .scrolledY, instead just use .x and .y
So the script will look like this
Code:
$gamePlayer.x == x && $gamePlayer.y == y && $gamePlayer.direction() == direction (2,4,6,8) && $gameMap.mapId() == mapID
Ah! Thank you @DrDhoom!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/use-item-from-menu-at-location.103266/