Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.00

Description

Description:

Returns a list of targets within the defined range. Targets are not restricted to enemy units.

Note: Returns only in the RTE.

Syntax

Syntax:unit nearTargets range
Parameters:
  • unit: Object - Unit to check.
  • range: Number - Range to check.
Return Value:Array of Array - Each recognized target consists of:
  • 0: Position - Perceived, includes judgment and memory errors.
  • 1: Type - Perceived, gives only what was recognized.
  • 2: Side - Perceived side.
  • 3: Subjective Cost - Positive for enemies, more positive for more important or more dangerous enemies.
  • 4: Object - Object type, can be used to get more information, if needed.
  • 5: Position Accuracy (since build 5209) - Assumed accuracy of the perceived position.

Examples

Examples:
player nearTargets 100;
// Could return:  [[[2555.33,2535.33,1.32708],"SoldierEB",EAST,214222,EAST 1-1-A:1],[[2550.39,2482.5,1.32696],"SoldierWB",WEST,0,WEST 1-1-A:2]]

Additional Information

See also: 
Multiplayer: 
Problems: 

Notes