<- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#unit_commands|Unit Commands]] ===== GetUnitAt ===== ^Arguments^Result^Notation^ |Coordinates|unit at coordinates |''i1 i2 -- u1 ''| === Description === Returns the UID of the first unit at the specified coordinates. Returns -1 if no unit was found at the coordinates. In the case that there are multiple units on the specified location, this function will return the bottom-most unit. If, instead, you want to find all of the units at specified coordinates, you will have to use GAUIR. See examples at [[crpl:docs:getallunitsinrange|GetAllUnitsInRange]]. === Examples === Find the UID of the first unit at the specified coordinates X:1 Y:3 1 3 GetUnitAt ->unit