User Tools

Site Tools


4rpl:commands:getspecialtargets

Index

:!: Available in version 1.3 and later.

GetSpecialTargets

GetSpecialTargets(<-specialTarget <-worldPosition <-range <-includeIsBuilding) ->units

Description

Finds the units that are tagged as a special target within range (a float) from worldPosition (a vector3). The 'specialTarget' argument is a V4 that specifies the target types. See GetUnitSpecialTarget. The return value is a list of units. The units in the list are sorted with the closest at position 0.

:NOTE: For clarification: Line Of Sight is not factored. If you want to use this API with LOS restrictions, see GetTerrainLOS.
:WARNING: Spores, Blobs, etc, aren't special targets and will not be detected.

Examples

GetSpecialTargets(V4(1 1 0 0) GetUnitPosition(self) GetUnitRange(self) false) ->units

Index

4rpl/commands/getspecialtargets.txt · Last modified: 2024/03/30 22:53 by karsten75