How to use sprites to realise this situation?

upload_2017-9-7_16-4-27.png

Like this, I want to use sprites to realise this:
#0030 = monster1's Map_x
----------
$gameVariables.setvalue(30,?);
What should I replace the question mark?
😅
This is RMMV

I've moved this thread to MV Support. Thank you.

There are no Monsters on the map, only events pretending to be monsters.
And you can use control variable to get the map coordinates of any event in the map without scripts.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-use-sprites-to-realise-this-situation.83732/