This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
4rpl:commands:getnearestsnipertarget [2021/01/08 16:01] – created - external edit 127.0.0.1 | 4rpl:commands:getnearestsnipertarget [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 7: | Line 7: | ||
===== Description ===== | ===== Description ===== | ||
Finds the nearest enemy unit that a sniper would shoot at within range (a float) from worldPosition (a vector3). The target booleans specify whether a unit of that type is targeted. | Finds the nearest enemy unit that a sniper would shoot at within range (a float) from worldPosition (a vector3). The target booleans specify whether a unit of that type is targeted. | ||
+ | |||
+ | If a target unit is not found, -1 is returned. | ||
===== Examples ===== | ===== Examples ===== | ||
<code 4rpl> | <code 4rpl> |