netId: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
(Add 2.18 feature)
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


| arma3
|game1= arma3
|version1= 0.50


|0.50
|game2= arma2oa
|version2= 1.63


|gr1= Multiplayer
|gr1= Multiplayer


| Unique ID of object or group. As this command is MP only, you can use [[BIS_fnc_netId]], which extends the use to SP as well. See also: [[BIS_fnc_objectVar]]
|descr= Get the unique ID of an object or a group.


| '''netId''' var
|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


|p1= var: [[Object]] or [[Group]]
|s1= [[netId]] objOrGroup


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


|r1= [[String]]


|x1= <code>_playerNetId = [[netId]] [[player]];</code>
|x1= <sqf>_playerNetId = netId player;</sqf>


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


| [[objectFromNetId]], [[groupFromNetId]], [[BIS_fnc_objectFromNetId]], [[BIS_fnc_netId]], [[BIS_fnc_groupFromNetId]], [[BIS_fnc_objectVar]]
{{Note
 
|user= Demellion
|  |MPBEHAVIOUR=
|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>
{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on October 19, 2018 - 13:40 (UTC)</dd>
<dt class="note">[[User:demellion|demellion]]</dt>
<dd class="note">
'''NOTE:''' 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.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 19: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.