Script call not working.

Hello,

I'm trying to know what it's wrong with this piece of code:

($gameMap.event(11).x == $gamePlayer.x) && ($gameMap.event(11).y ==$gamePlayer.y)

​

basically, what I want to accomplish with the code is nothing complicated.

 Please refer to the image to what I'm trying to accomplish.

I know something similar worked for Ace but I'm having a hard time scripting like this in MV. This piece doesn't give me any errors it just doesn't work and I don't know why.

I know how to do the same trough events but I want to use script.

any information provided will be of much appreciate it.

sample.jpg
Try changing the "==" to "===", that's the proper equivalency syntax for Javascript.
it works for me

i think your problem is change from 11 to 15 and make your event through
Woly molly... tnx mates!!!

For some reason I was looking to the map number not the event number... That solves my issue...

thank you guys!!

Original thread: https://forums.rpgmakerweb.com/threads/script-call-not-working.49469/