groupSelectUnit: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma2 |Game name=
| arma2


|1.00|Game version=
|1.00


|gr1= Interaction |GROUP1=
|gr1= Interaction


| Selects a unit from player's group. If player is the leader, the effect of this command is similar to player pressing F1, F2, F3... buttons to highlight units in his squad, after which the unit command menu is shown. If leader is AI, player will get usual communication menu to interact with the leader. |DESCRIPTION=
| Selects a unit from player's group. If player is the leader, the effect of this command is similar to player pressing F1, F2, F3... buttons to highlight units in his squad, after which the unit command menu is shown. If leader is AI, player will get usual communication menu to interact with the leader.


| player '''groupSelectUnit''' [unit, select] |SYNTAX=
| player '''groupSelectUnit''' [unit, select]


|p1= player: [[Object]] |PARAMETER1=
|p1= player: [[Object]]


|p2= [unit, select]: [[Array]]|PARAMETER2=
|p2= [unit, select]: [[Array]]


|p3= unit: [[Object]] |PARAMETER3=
|p3= unit: [[Object]]


|p4= select: [[Boolean]] |PARAMETER4=
|p4= select: [[Boolean]]


| [[Nothing]] |RETURNVALUE=
| [[Nothing]]




|x1= After leaving menu, deselect all units (command menu is not opened -> no selection)<code>{
|x1= After leaving menu, deselect all units (command menu is not opened -> no selection)<code>{
     [[player]] [[groupSelectUnit]] [_x, [[false]]];
     [[player]] [[groupSelectUnit]] [_x, [[false]]];
} [[forEach]] ([[groupSelectedUnits]] [[player]]);</code>|EXAMPLE1=
} [[forEach]] ([[groupSelectedUnits]] [[player]]);</code>
|x2= Select all units when player is the leader:<code>{
|x2= Select all units when player is the leader:<code>{
     [[player]] [[groupSelectUnit]] [_x, [[true]]];
     [[player]] [[groupSelectUnit]] [_x, [[true]]];
} [[forEach]] [[units]] [[player]];</code>|EXAMPLE2=
} [[forEach]] [[units]] [[player]];</code>
|x3= Open communication with group leader:<code>[[player]] [[groupSelectUnit]] [<nowiki/>[[leader]] [[player]], [[true]]];</code>|EXAMPLE3=
|x3= Open communication with group leader:<code>[[player]] [[groupSelectUnit]] [<nowiki/>[[leader]] [[player]], [[true]]];</code>




| [[groupSelectedUnits]] |SEEALSO=
| [[groupSelectedUnits]]


|  |MPBEHAVIOUR=  
|  |MPBEHAVIOUR=  

Revision as of 00:40, 18 January 2021

Hover & click on the images for description

Description

Description:
Selects a unit from player's group. If player is the leader, the effect of this command is similar to player pressing F1, F2, F3... buttons to highlight units in his squad, after which the unit command menu is shown. If leader is AI, player will get usual communication menu to interact with the leader.
Groups:
Interaction

Syntax

Syntax:
player groupSelectUnit [unit, select]
Parameters:
player: Object
[unit, select]: Array
unit: Object
select: Boolean
Return Value:
Nothing

Examples

Example 1:
After leaving menu, deselect all units (command menu is not opened -> no selection){ player groupSelectUnit [_x, false]; } forEach (groupSelectedUnits player);
Example 2:
Select all units when player is the leader:{ player groupSelectUnit [_x, true]; } forEach units player;
Example 3:
Open communication with group leader:player groupSelectUnit [leader player, true];

Additional Information

See also:
groupSelectedUnits

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

Notes

Bottom Section