LocationEnumerator SpaceportEnum(LOCATION(tr.Location().x-2, tr.Location().y-1));
if(SpaceportEnum.GetNext(unitontile))
{
[Stuff, in my code i checked if its a spaceport with unitontileGetType()]
}
Hey, does anyone know if there's a way to check what type of unit is on a specific tile?HFL, or the old GetTile hack. If you go HFL, use GameMapEx::GetTileEx, and check the tile.unitIndex field. I dunno how that works for structures (if at all), though, but it works for vehicles. A LocationEnumerator would probably work as well.
Note that I'm not talking about simply detecting any unit on a tile using a trigger. I want to check a specific location and grab the mapID of the unit on that tile (or return mapNone if no unit is there).