groupId: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
m (Fix)
 
(35 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|0.50|= Game version
|version1= 0.50
|arg= global|= Arguments in MP
____________________________________________________________________________________________


| Returns group name.  |= Description
|gr1= Groups
____________________________________________________________________________________________


| '''groupId''' group |= Syntax
|arg= global


|p1= group: [[Group]]  |PARAMETER1=
|descr= Returns a group's name or a unit's group ID number.


| [[String]] |RETURNVALUE=
|s1= [[groupId]] group


|p1= group: [[Group]]


|x1= <code>_name = [[groupId]] ([[group]] [[player]]);
|r1= [[String]] - the group's name (e.g "Alpha Red")
</code>|EXAMPLE1=


____________________________________________________________________________________________
|s2= [[groupId]] unit


| [[setGroupId]], [[setGroupIdGlobal]], [[group]] |SEEALSO=  
|s2since= arma3 2.12


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


<h3 style='display:none'>Notes</h3>
|x1= <sqf>_name = groupId group player; // e.g "B Alpha 1-1"</sqf>
<dl class='command_description'>
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x2= <sqf>private _unitGroupId = groupId player; // e.g 3 (number, not a string)</sqf>
</dl>


<h3 style='display:none'>Bottom Section</h3>
|seealso= [[setGroupId]] [[setGroupIdGlobal]] [[group]]
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Groups|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Information|{{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