groupSelectUnit: Difference between revisions
Jump to navigation
Jump to search
m (Replaced <code> with <sqf>) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(One intermediate revision by the same user not shown) | |||
Line 15: | Line 15: | ||
|gr1= Interaction | |gr1= Interaction | ||
|descr= 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 | |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. | |||
|s1= player [[groupSelectUnit]] [unit, select] | |s1= player [[groupSelectUnit]] [unit, select] | ||
Line 21: | Line 22: | ||
|p1= player: [[Object]] | |p1= player: [[Object]] | ||
|p2= | |p2= unit: [[Object]] | ||
|p3 | |p3= select: [[Boolean]] | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= After leaving menu, deselect all units (command menu is not opened → no selection) | |x1= After leaving menu, deselect all units (command menu is not opened → no selection) | ||
<sqf>{ | <sqf> | ||
{ | |||
} forEach (groupSelectedUnits player);</sqf> | player groupSelectUnit [_x, false]; | ||
} forEach (groupSelectedUnits player); | |||
</sqf> | |||
|x2= Select all units when player is the leader: | |x2= Select all units when player is the leader: | ||
<sqf>{ | <sqf> | ||
{ | |||
} forEach units player;</sqf> | player groupSelectUnit [_x, true]; | ||
} forEach units player; | |||
</sqf> | |||
|x3= Open communication with group leader: | |x3= Open communication with group leader: |
Latest revision as of 16:25, 15 August 2022
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)
- Example 2:
- Select all units when player is the leader:
- Example 3:
- Open communication with group leader:
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