User Tools

Site Tools


crpl:docs:getunitat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
crpl:docs:getunitat [2013/11/01 17:28] – Returns -1 if no unit found Captain Fordcrpl:docs:getunitat [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
-~~DISCUSSION~~+
 <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#unit_commands|Unit Commands]] <- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#unit_commands|Unit Commands]]
 =====  GetUnitAt  ===== =====  GetUnitAt  =====
Line 8: Line 8:
  
 === Description === === Description ===
-Returns the UID of the unit at the specified coordinates. Returns -1 if no unit was found at the coordinates.+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 === === Examples ===
 +Find the UID of the first unit at the specified coordinates X:1 Y:3
 <code> <code>
-example goes here +1 3 GetUnitAt ->unit 
-</code> +</code>
crpl/docs/getunitat.1383326893.txt.gz · Last modified: 2025/02/14 14:56 (external edit)