I forgot the script call that checks event location.

I'm in the process of making an on map conditional branch, but I forgot the snippet that checks the event  x, y location

I've been putting in
$game_player.x == $game_event(45).x

$game_player.y == $game_event(45).y

Yet, I'm positive that's not right but it's all I can think of... unless game_mapevent or something... it's been ages since I used this progam.

Can anyone refresh my memory?

Edit: Just remembered

🙁     $game_map.events[45]
$game_map.events[id]

Events are per map, so each map has an @events array.

And an event is inherited from a character, so you can use all of these:
 

attr_reader :id # ID
attr_reader :x # map x-coordinate (logical)
attr_reader :y # map y-coordinate (logical)
attr_reader :real_x # map x-coordinate (real * 128)
attr_reader :real_y # map y-coordinate (real * 128)
attr_reader :tile_id # tile ID (invalid if 0)
attr_reader :character_name # character file name
attr_reader :character_hue # character hue
attr_reader 😮pacity # opacity level
attr_reader :blend_type # blending method
attr_reader :direction # direction
attr_reader 😛attern # pattern
attr_reader :move_route_forcing # forced move route flag
attr_reader :through # through
attr_accessor :animation_id # animation ID
attr_accessor :transparent # transparent flag
Edit: just saw your edit. 😛

Original thread: https://forums.rpgmakerweb.com/threads/i-forgot-the-script-call-that-checks-event-location.47928/