User Tools

Site Tools


crpl:docs:getunitat

<- CRPL reference <- Unit Commands

GetUnitAt

ArgumentsResultNotation
Coordinatesunit 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 GetAllUnitsInRange.

Examples

Find the UID of the first unit at the specified coordinates X:1 Y:3

1 3 GetUnitAt ->unit
crpl/docs/getunitat.txt · Last modified: 2021/02/05 11:44 by Karsten75