I'll see if I can pull all my related code - I get the Tile name all the time.
Sorry if this is messy - want to try to pull some code for you quickly...
var tilename0 = $map/TileMap.tileset.tilegetname($map/TileMap.get_cell(myposontilemap.x, myposontilemap.y))
if (npc.tilestandingon == "water" or npc.tilestandingon == "waterdeep" or npc.tilestandingon == "deepwater") and npc.doing != "swimming" and npc.doing != "standingInWater" and npc.doing != "drowning" and npc.doing != "coma" and npc.doing != "dead":
npc.doing = "standingInWater"
My NPC's run around the map and constantly look for what Tile they are standing on.
This seems to be the lines of code that do this for me. (Sorry, wrote over a year ago so not completely familiar with right now).