This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| crpl:docs:getunitat [2013/10/26 04:51] – created ThirdParty | crpl:docs:getunitat [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | + | |
| <- [[crpl: | <- [[crpl: | ||
| ===== GetUnitAt | ===== GetUnitAt | ||
| Line 8: | Line 8: | ||
| === Description === | === Description === | ||
| - | Returns the UID of the unit at the specified 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, | ||
| === Examples === | === Examples === | ||
| + | Find the UID of the first unit at the specified coordinates X:1 Y:3 | ||
| < | < | ||
| - | example goes here | + | 1 3 GetUnitAt ->unit |
| - | </ | + | </ |