Using Items From Menu Screen

Hello,

I followed this tutorial on youtube :
which explains how to use an item from your item menu by calling a common event depending upon the players X and Y coordinates as well as Map ID and direction

I have tried to replicate this but it doesn't seem to work. I know that the Map ID conditional in the common event works because I have tested it separately, so the problem is that the common event does not recognize my characters X and Y values though they seems to be correct to me.

I have included 2 images, an image showcasing the block where the player uses the item (7,7) and a image of the common event. Any help as to why this isn't working would be very appreciated.

Thank you




1655807604884.png
1655807617822.png
For testing, you can add a Show Text command just after you set the variables, e.g.

◆Control Variables:#0001 Item Map ID = Map ID ◆Control Variables:#0002 Item X = Map X of Player ◆Control Variables:#0003 Item Y = Map Y of Player ◆Text:None, None, Window, Bottom : :\>TEST! : :\>Map ID: \v[1] : :\>Player X: \v[2] : :\>Player Y: \v[3]
first a general tip:
if you have an event where the variables or switches do not do what they are supposed to do, add a show text giving you the numbers that aare there with \V
in this case after the control variable but before the if checks.

that said, there are several possibilities here - one is that you are on the wrong position, another is that you accidentally used the same variables that are already used elsewhere.
the last option is the reason why configuring plugins is very important: there are quite a number of plugins that use variables for configuration, and they need to be set to unused variables or exactly this can happen.
Update: I somehow solved the problem by creating a near identical Common Event that works as intended. Pic related is the exact same common event as in OP pic but with a conditional for direction. Not sure why it worked but glad it does now

Thanks to those who responded, will keep in mind
1655818861532.png

Original thread: https://forums.rpgmakerweb.com/threads/using-items-from-menu-screen.148750/