This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 4rpl:commands:nearestspecialtarget [2023/09/24 15:37] – -1 returned if no unit found. Vertu | 4rpl:commands:nearestspecialtarget [2024/03/29 00:22] (current) – Moved Karsten75 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~NOTOC~~ | ||
| - | < | ||
| - | :!: Available in version 1.3 and later. | ||
| - | ====== GetNearestSpecialTarget====== | ||
| - | GetNearestSpecialTarget(< | ||
| - | |||
| - | ===== Description ===== | ||
| - | Finds the nearest unit that is tagged as a special target within range (a float) from worldPosition (a vector3). The ' | ||
| - | |||
| - | If no unit matching the special target parameter is found, -1 is returned. | ||
| - |              | ||
| - | ===== Examples ===== | ||
| - | <code 4rpl> | ||
| - | GetNearestSpecialTarget(V4(1 1 0 0) GetUnitPosition(self) GetUnitRange(self) false) ->unit | ||
| - | </ | ||
| - | |||
| - | < | ||