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



Introduced in

Version:2.00

Description

Description:

Returns the object that the unit weapon crosshairs are aimed at.

The effective range is determined by the "viewdistance" setVideoSetting and "objectdrawdistance" setVideoSetting. For map objects, only those objects that have a class name defined are returned (most plants and rocks are ignored).

While a lockable weapon is locked onto a target, this command returns the target, even if it is not currently being pointed at (this does not apply to the Javelin weapon).

Syntax

Syntax:cursorTarget unit
Parameters:
Return Value:

String - Object name.

Examples

Examples:cursorTarget // Placing this in Variable Watch returns the class of the object the unit is aiming at.

Additional Information

See also: laserTarget, weaponAimingAt, aimedAtTarget
Multiplayer: 
Problems: 

Notes