selectLeader: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
Line 11: Line 11:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Select a group's leader. |= Description
| Select a group's leader. In MP the group has to be [[local]] to the PC executing the command. Locality of the group can be checked with [[local]] command and group ownership with [[groupOwner]] command.  |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 22: Line 22:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>[[group]] [[player]] selectLeader [[player]]</code> |= Example 1
|x1= <code>[[group]] [[player]] [[selectLeader]] [[player]];</code> |= Example 1
|x2= Make unit a leader from server:<code><nowiki>[</nowiki>[[group]] _unit, _unit] [[remoteExec]] ["selectLeader", [[groupOwner]] _unit];</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 31: Line 32:
<h3 style="display:none">Notes</h3>
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
SnowSky: In Multiplayer the command has to be executed on the client which the group is actually local, otherwhise the effect would stay only for shorter then 1 second. P.S.: remember, Teamleader is not equivalent to the client on which the group is local!
<!-- Note Section END -->
</dl>
</dl>



Revision as of 16:12, 19 September 2015

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Select a group's leader. In MP the group has to be local to the PC executing the command. Locality of the group can be checked with local command and group ownership with groupOwner command.
Groups:
Uncategorised

Syntax

Syntax:
groupName selectLeader unitName
Parameters:
groupName: 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 _unit];

Additional Information

See also:
formationLeaderformLeaderleaderisFormationLeader

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