groupId: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
m (Fix)
 
(37 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


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


|0.50|= Game version
|gr1= Groups
____________________________________________________________________________________________


| Returns group name.  |= Description
|arg= global
____________________________________________________________________________________________


| '''groupId''' group |= Syntax
|descr= Returns a group's name or a unit's group ID number.


|p1= group: [[Group]] |= PARAMETER1
|s1= [[groupId]] group


| [[String]] |= RETURNVALUE
|p1= group: [[Group]]


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


|x1= <code>_name = [[groupId]] ([[group]] [[player]]);
|s2= [[groupId]] unit
</code>|= EXAMPLE1


____________________________________________________________________________________________
|s2since= arma3 2.12


| [[setGroupId]], [[setGroupIdGlobal]], [[group]] |= SEEALSO
|p21= unit: [[Object]] - a group's unit


| |= MPBEHAVIOUR
|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