groupSelectUnit: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects? in MP|M...)
m (Some wiki formatting)
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


| arma2
|game1= arma2
|version1= 1.00


|1.00
|game2= arma2oa
|version2= 1.50
 
|game3= tkoh
|version3= 1.00
 
|game4= arma3
|version4= 0.50


|gr1= Interaction
|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.
|descr= Selects a unit from player's group. If player is the leader, the effect of this command is similar to player pressing {{Controls|F1}}, {{Controls|F2}}, {{Controls|F3}} etc 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]
|s1= player [[groupSelectUnit]] [unit, select]


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


|p2= [unit, select]: [[Array]]
|p2= unit: [[Object]]
 
|p3= unit: [[Object]]


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


| [[Nothing]]
|r1= [[Nothing]]


|x1= After leaving menu, deselect all units (command menu is not opened → no selection)
<sqf>
{
player groupSelectUnit [_x, false];
} forEach (groupSelectedUnits player);
</sqf>


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


|x3= Open communication with group leader:
<sqf>player groupSelectUnit [leader player, true];</sqf>


| [[groupSelectedUnits]]
|seealso= [[groupSelectedUnits]]
 
|
}}
}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 16:25, 15 August 2022

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 etc 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: 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