groupId: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Fix)
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 0.50


|gr1= Groups |GROUP1=
|gr1= Groups


|arg= global


|0.50|Game version=
|descr= Returns a group's name or a unit's group ID number.
|arg= global|Multiplayer Arguments=
____________________________________________________________________________________________


| Returns group name.  |DESCRIPTION=
|s1= [[groupId]] group
____________________________________________________________________________________________


| '''groupId''' group |SYNTAX=
|p1= group: [[Group]]


|p1= group: [[Group]] |PARAMETER1=
|r1= [[String]] - the group's name (e.g "Alpha Red")


| [[String]] |RETURNVALUE=
|s2= [[groupId]] unit


|s2since= arma3 2.12


|x1= <code>_name = [[groupId]] ([[group]] [[player]]);
|p21= unit: [[Object]] - a group's unit
</code>|EXAMPLE1=


____________________________________________________________________________________________
|r2= [[Number]] - the unit's group ID (e.g "'''2''', taking command")


| [[setGroupId]], [[setGroupIdGlobal]], [[group]] |SEEALSO=
|x1= <sqf>_name = groupId group player; // e.g "B Alpha 1-1"</sqf>


| |MPBEHAVIOUR=  
|x2= <sqf>private _unitGroupId = groupId player; // e.g 3 (number, not a string)</sqf>
____________________________________________________________________________________________
 
|seealso= [[setGroupId]] [[setGroupIdGlobal]] [[group]]
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group: Object Manipulation|{{uc:{{PAGENAME}}}}]]

Latest revision as of 12:45, 18 January 2023

Hover & click on the images for description

Description

Description:
Returns a group's name or a unit's group ID number.
Groups:
Groups

Syntax

Syntax:
groupId group
Parameters:
group: Group
Return Value:
String - the group's name (e.g "Alpha Red")

Alternative Syntax

Syntax:
groupId unit
Parameters:
unit: Object - a group's unit
Return Value:
Number - the unit's group ID (e.g "2, taking command")

Examples

Example 1:
_name = groupId group player; // e.g "B Alpha 1-1"
Example 2:
private _unitGroupId = groupId player; // e.g 3 (number, not a string)

Additional Information

See also:
setGroupId setGroupIdGlobal group

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