groupFromNetId: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(note)
(see also to scripted function, note removed)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Get group with given unique ID.  |= Description
| Get group with given unique ID. For objects use [[objectFromNetId]]. As this command is MP only, you can use [[BIS_fnc_groupFromNetId]], which extends the use to SP as well.  |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 21: Line 21:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[objectFromNetId]], [[netId]] |= SEEALSO  
| [[objectFromNetId]], [[netId]], [[BIS_fnc_objectFromNetId]], [[BIS_fnc_netId]], [[BIS_fnc_groupFromNetId]] |= SEEALSO  


|  |= MPBEHAVIOUR  
|  |= MPBEHAVIOUR  
Line 38: Line 38:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on May 9, 2015 - 15:03 (UTC)</dd>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<dd class="note">
[[groupFromNetId]] in SP is [[grpNull]]. Here is the function that will give you universal [[groupFromNetId]] that works both in SP and MP (needs KK_fnc_netId from this page [[netId]])
<code>KK_fnc_groupFromNetId <nowiki>=</nowiki> {
[[if]] ([[isMultiplayer]]) [[exitWith]] {[[groupFromNetId]] _this};
[[if]] ([[typeName]] _this <nowiki>!=</nowiki> "STRING" <nowiki>||</nowiki> [[isNil]] "KK_globIDs") [[exitWith]] {[[grpNull]]};
[[private]] "_i";
_i <nowiki>=</nowiki> KK_globIDs [[find]] _this;
[[if]] (_i < 0) [[exitWith]] {[[grpNull]]};
KK_globIDs [[select]] (_i + 1)
};
//example
[[hint]] [[str]] ("0:1" [[call]] KK_fnc_groupFromNetId);</code>
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 19:08, 26 March 2016

Hover & click on the images for description

Description

Description:
Get group with given unique ID. For objects use objectFromNetId. As this command is MP only, you can use BIS_fnc_groupFromNetId, which extends the use to SP as well.
Groups:
Uncategorised

Syntax

Syntax:
groupFromNetId id
Parameters:
id: String
Return Value:
Group

Examples

Example 1:
_group = groupFromNetId "4:45";

Additional Information

See also:
objectFromNetIdnetIdBIS_fnc_objectFromNetIdBIS_fnc_netIdBIS_fnc_groupFromNetId

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