Well, using terrain_tag(x, y) from Game_Map line 299 MIGHT work, but you have to specify.
So I think that $game_variables = terrain_tag(x, y) should be what you're looking for, but I haven't tested it, and never used it,
and made this on the fly, so I'm not sure if it will work.