groupSelectUnit: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)<nowiki\/?>([^<]*)<\/code>" to "<code>$1$2</code>") |
m (Replaced <code> with <sqf>) |
||
Line 29: | Line 29: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= After leaving menu, deselect all units (command menu is not opened | |x1= After leaving menu, deselect all units (command menu is not opened → no selection) | ||
<sqf>{ | |||
player groupSelectUnit [_x, false]; | player groupSelectUnit [_x, false]; | ||
} forEach (groupSelectedUnits player);</ | } forEach (groupSelectedUnits player);</sqf> | ||
|x2= Select all units when player is the leader: | |x2= Select all units when player is the leader: | ||
< | <sqf>{ | ||
player groupSelectUnit [_x, true]; | player groupSelectUnit [_x, true]; | ||
} forEach units player;</ | } forEach units player;</sqf> | ||
|x3= Open communication with group leader: | |x3= Open communication with group leader: | ||
< | <sqf>player groupSelectUnit [leader player, true];</sqf> | ||
|seealso= [[groupSelectedUnits]] | |seealso= [[groupSelectedUnits]] | ||
}} | }} |
Revision as of 13:11, 14 May 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... 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)
- 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