assignedTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(improved description)
m (Text replacement - "[[Arma 3 " to "[[Arma 3: ")
 
(47 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma |Game name=
|game1= ofpe
|version1= 1.00


|1.00|Game version=
|game2= arma1
|version2= 1.00


|arg= local |Multiplayer Arguments=
|game3= arma2
____________________________________________________________________________________________
|version3= 1.00


| Returns the target assigned to a vehicle ([[effectiveCommander]])/an infantry unit by the group/vehicle/formation leader. Done by the (formation sub)group AI leader, or by a player as group leader (via context menu or targets command menu).
|game4= arma2oa
<br><br>
|version4= 1.50
If the player is inside a vehicle and the [[effectiveCommander]], the vehicle crew will not be able to return an assignedTarget.
<br><br>
To unassign the target use [[doWatch]] [[objNull]] or [[commandWatch]] [[objNull]] or a group leader "no target" in the targets command menu.
<br><br>
{{Important | This does NOT return the target unit an unit is actually engaging ("attack unit").}}|DESCRIPTION=
____________________________________________________________________________________________


| '''assignedTarget''' vehicleName |SYNTAX=
|game5= tkoh
|version5= 1.00


|p1= vehicleName: [[Object]] |PARAMETER1=
|game6= arma3
|version6= 0.50


| [[Object]] |RETURNVALUE=
|arg= local
____________________________________________________________________________________________
 
|x1= <code>_target = [[assignedTarget]] _T72</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[commandTarget]], [[doTarget]], [[commandWatch]], [[doWatch]], [[effectiveCommander]], [[setEffectiveCommander]]  |SEEALSO=
|gr1= Object Manipulation


|descr= 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 [[Arma 3: Field Manual - Commanding#Target_Assignment|quick command menu]] or [[Operation Flashpoint: Commander Guide#TARGET .282.29|"target" complex command menu]]).<br>
To unassign the target use [[doWatch]] [[objNull]] or [[commandWatch]] [[objNull]] or as player and group leader order "no target" in the [[Operation Flashpoint: Commander Guide#TARGET .282.29|"target" complex command menu]].
{{Feature | Informative |
* 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]].
}}
}}


<h3 style="display:none">Notes</h3>
|s1= [[assignedTarget]] vehicleName
<dl class="command_description">


<!-- Note Section BEGIN -->
|p1= vehicleName: [[Object]]


<!-- Note Section END -->
|r1= [[Object]]
</dl>


<h3 style="display:none">Bottom Section</h3>
|x1= <sqf>_target = assignedTarget _T72;</sqf>


[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
|seealso= [[getAttackTarget]] [[commandTarget]] [[doTarget]] [[commandWatch]] [[doWatch]] [[effectiveCommander]] [[setEffectiveCommander]]
[[Category:Scripting Commands OFP Elite|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 10:38, 6 May 2024

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