playerTargetLock: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (2.16 -> 2.18)
m (Text replacement - "↵|version1= 2.18↵↵|branch= dev↵" to " |version1= 2.18 ")
 
Line 3: Line 3:
|game1= arma3
|game1= arma3
|version1= 2.18
|version1= 2.18
|branch= dev


|gr1= Object Manipulation
|gr1= Object Manipulation

Latest revision as of 16:08, 8 October 2024

Hover & click on the images for description

Description

Description:
Get the local player's current locked target (with weapons that can lock on).
Groups:
Object Manipulation

Syntax

Syntax:
playerTargetLock
Return Value:
Array format [target, lockValue, config]:
  • target: Object - the locked object
  • lockValue: Number - in range 0..1 where 1 is fully locked
  • config: Config - used weapon's CfgWeapons config

Examples

Example 1:
playerTargetLock params ["_target", "_lock", "_cfg"]; if (_lock == 1) then { hint format ["%1 locked %2", getText (_cfg >> "displayName"), getText (configOf _target >> "displayName")]; };
Example 2:
playerTargetLock; // returns [objNull, 0, configNull] if no lock is being done

Additional Information

See also:
cursorTarget

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note