(XP) event collision by terrain tags

hello sorry for my english .... in rpg maker it is possible to make conditions by calling scripts

I actually did with the character colliding with a terrain:

$ game_player.terrain_tag == 0

with 0 being the desired terrain number.

but when trying to do this with events does not work. events do not react to land

I tried to exchange the $ game_player for $ game_event but it did not work well ,,,,

is there a way to fix or a script that can fix this? desde já agradeço
I made a simple map and changed the sandy tile's terrain tag to 1. And then, I drew a strip of the sandy tiles onto the map. After that, I made an event that walked towards the sandy tile.

So far, simple enough. Right?

Okay, now here's the magic part.......

I edited the event by adding a script call:
Code:
x = $game_map.events[@event_id].x
y = $game_map.events[@event_id].y
if $game_map.terrain_tag(x,y) == 1
  p 'Hey, I touched it!'
end

And then, I set the event to run by way of a 'parallel process', so it continually runs this check.

This is a very simple test run. But it will bring up a message all the time the event is over the sandy tiles.

😀 Funny. You can have a @event_id value in a script call, and it recognizes the ID of the event using it! For over ten years, I never tried that.
👍 THANK YOU VERY MUCH!!!!

Original thread: https://forums.rpgmakerweb.com/threads/xp-event-collision-by-terrain-tags.105381/