assignedTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>_([a-zA-Z0-9_]+) = \[\[([a-zA-Z0-9]+)\]\] _([a-zA-Z0-9_]+);?<\/code>" to "<sqf>_$1 = $2 _$3;</sqf>")
m (Add getAttackTarget link)
Line 38: Line 38:
|x1= <sqf>_target = assignedTarget _T72;</sqf>
|x1= <sqf>_target = assignedTarget _T72;</sqf>


|seealso= [[commandTarget]] [[doTarget]] [[commandWatch]] [[doWatch]] [[effectiveCommander]] [[setEffectiveCommander]]
|seealso= [[getAttackTarget]] [[commandTarget]] [[doTarget]] [[commandWatch]] [[doWatch]] [[effectiveCommander]] [[setEffectiveCommander]]
}}
}}

Revision as of 11:56, 12 June 2022

Hover & click on the images for description

Description

Description:
Returns the target assigned to an unit or the vehicle's effectiveCommander. The target can be assigned by the group/vehicle/formation leader (as player via quick command menu or "target" complex command menu).
To unassign the target use doWatch objNull or commandWatch objNull or as player and group leader order "no target" in the "target" complex command menu.
  • This command does not return the target a unit is actually engaging ("attack unit"). For this information, see getAttackTarget.
  • If a player is inside a vehicle as the effectiveCommander, the vehicle's crew assignedTarget will always be objNull.
Groups:
Object Manipulation

Syntax

Syntax:
assignedTarget vehicleName
Parameters:
vehicleName: Object
Return Value:
Object

Examples

Example 1:
_target = assignedTarget _T72;

Additional Information

See also:
getAttackTarget commandTarget doTarget commandWatch doWatch effectiveCommander setEffectiveCommander

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