Arma 3 Scripting

playerTargetLock

  • Arma 3 v2.18

Command · Markdown · JSON · original wiki page

Description

Get the local player's current locked target (with weapons that can lock on).

Syntax

playerTargetLock

Returns: Array with [target, lockValue, 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

See also

cursorTarget