netId: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Command|= Comments ____________________________________________________________________________________________ | arma3 |= Game name |0.50|= Game version ____________________...")
 
(Add 2.18 feature)
 
(48 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


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


|0.50|= Game version
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.63


| Unique ID of object or group.  |= Description
|gr1= Multiplayer
____________________________________________________________________________________________


| '''netId''' var |= Syntax
|descr= Get the unique ID of an object or a group.


|p1= var: [[Object]] or [[Group]] |= PARAMETER1 
|mp= <nowiki/>
* In singleplayer: {{GVI|arma3|2.18|size= 0.75}} returns a net ID (different from [[BIS_fnc_netId]]'s output), before that it returned an empty string in single player (see [[BIS_fnc_netId]] and [[BIS_fnc_objectVar]])
* In multiplayer: works as described


| [[String]] |= RETURNVALUE
|s1= [[netId]] objOrGroup


|p1= objOrGroup: [[Object]] or [[Group]]


|x1= <code>
|r1= [[String]]
</code>|= EXAMPLE1


____________________________________________________________________________________________
|x1= <sqf>_playerNetId = netId player;</sqf>


| |= SEEALSO
|seealso= [[objectFromNetId]] [[groupFromNetId]] [[BIS_fnc_objectFromNetId]] [[BIS_fnc_netId]] [[BIS_fnc_groupFromNetId]] [[BIS_fnc_objectVar]]
}}


| |= MPBEHAVIOUR
{{Note
____________________________________________________________________________________________
|user= Demellion
|timestamp= 20181019134000
|text= Even if the returned value is in format of '''owner:uniqueid''', it doesn't follow the current ownership of an object ([[owner]] for example).<br>
This command keeps the '''original owner''' of a created object.
}}
}}
<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|{{uc:{{PAGENAME}}}}]]

Latest revision as of 18:25, 4 July 2024

Hover & click on the images for description

Description

Description:
Get the unique ID of an object or a group.
Multiplayer:
Groups:
Multiplayer

Syntax

Syntax:
netId objOrGroup
Parameters:
objOrGroup: Object or Group
Return Value:
String

Examples

Example 1:
_playerNetId = netId player;

Additional Information

See also:
objectFromNetId groupFromNetId BIS_fnc_objectFromNetId BIS_fnc_netId BIS_fnc_groupFromNetId BIS_fnc_objectVar

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
Demellion - c
Posted on Oct 19, 2018 - 13:40 (UTC)
Even if the returned value is in format of owner:uniqueid, it doesn't follow the current ownership of an object (owner for example).
This command keeps the original owner of a created object.