User Tools

Site Tools


4rpl:commands:nearestspecialtarget

Differences

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

Link to this comparison view

Next revision
Previous revision
4rpl:commands:nearestspecialtarget [2021/02/14 18:05] – created virgilw4rpl:commands:nearestspecialtarget [2024/03/28 20:22] (current) – Moved Karsten75
Line 1: Line 1:
-~~NOTOC~~ 
-<=[[4rpl:start| Index]] 
  
-:!: Available in version 1.3 and later. 
-====== GetNearestSpecialTarget====== 
-GetNearestSpecialTarget(<-specialTarget <-worldPosition <-range <-includeIsBuilding) ->unit 
- 
-===== Description ===== 
-Finds the nearest unit that is tagged as a special target within range (a float) from worldPosition (a vector3). The 'specialTarget' argument should be 1 through 4. 1 is for units that snipers target, 2 is for units that missile launchers target. 3 and 4 are for 4rpl use. 
-             
-===== Examples ===== 
-<code 4rpl> 
-GetNearestSpecialTarget(3 GetUnitPosition(self) GetUnitRange(self) false) ->unit 
-</code> 
- 
-<=[[4rpl:start| Index]] 
4rpl/commands/nearestspecialtarget.1613343958.txt.gz · Last modified: 2021/02/14 18:05 by virgilw