selectLeader: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "") |
Lou Montana (talk | contribs) 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|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma1 | | arma1 | ||
|1.00 | |1.00 | ||
|gr1= Groups | |gr1= Groups | ||
|arg= local | |arg= local | ||
|eff= global | |eff= global | ||
| Select the group's leader. Group locality can be checked with [[local]] command and group ownership with [[groupOwner]] command. | | Select the group's leader. Group locality can be checked with [[local]] command and group ownership with [[groupOwner]] command. | ||
Line 16: | Line 16: | ||
* ''unitName'' will be [[leader]] of ''group'', but will not be able to command them | * ''unitName'' will be [[leader]] of ''group'', but will not be able to command them | ||
* if ''unitName'' is deleted or killed, [[leader]] of ''group'' will be [[objNull]] and will not automatically be reassigned. | * if ''unitName'' is deleted or killed, [[leader]] of ''group'' will be [[objNull]] and will not automatically be reassigned. | ||
}} | }} | ||
| group [[selectLeader]] unitName | | group [[selectLeader]] unitName | ||
|p1= group: [[Group]] | |p1= group: [[Group]] | ||
|p2= unitName: [[Object]] | |p2= unitName: [[Object]] | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>[[group]] [[player]] [[selectLeader]] [[player]];</code> | |x1= <code>[[group]] [[player]] [[selectLeader]] [[player]];</code> | ||
|x2= Make unit a leader from server:<code><nowiki>[</nowiki>[[group]] _unit, _unit] [[remoteExec]] ["selectLeader", [[groupOwner]] [[group]] _unit];</code> | |x2= Make unit a leader from server:<code><nowiki>[</nowiki>[[group]] _unit, _unit] [[remoteExec]] ["selectLeader", [[groupOwner]] [[group]] _unit];</code> | ||
| [[commandFollow]], [[doFollow]], [[formationLeader]], [[formLeader]], [[isFormationLeader]], [[leader]], [[setLeader]] | | [[commandFollow]], [[doFollow]], [[formationLeader]], [[formLeader]], [[isFormationLeader]], [[leader]], [[setLeader]] | ||
}} | }} | ||
Revision as of 11:02, 18 January 2021
Description
- Description:
- Select the group's leader. Group locality can be checked with local command and group ownership with groupOwner command.
- Groups:
- Groups
Syntax
- Syntax:
- group selectLeader unitName
- Parameters:
- group: Group
- unitName: Object
- Return Value:
- Nothing
Examples
- Example 1:
group player selectLeader player;
- Example 2:
- Make unit a leader from server:
[group _unit, _unit] remoteExec ["selectLeader", groupOwner group _unit];
Additional Information
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
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Command Group: Groups
- Scripting Commands: Global Effect
- Operation Flashpoint: Elite: Scripting Commands
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands
- Take On Helicopters: Scripting Commands