vehicleVarName: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " be local" to " be local")
m (Some wiki formatting)
Line 22: Line 22:
|gr1= Object Manipulation
|gr1= Object Manipulation


|descr= Returns the variable name that contains a primary editor reference to this object. This is the variable given in the ''Insert Unit dialog / name field'' in the editor. It can be changed using [[setVehicleVarName]]. <br>
|descr= Returns the variable name that contains a primary editor reference to this object. This is the variable given in the ''Insert Unit dialog / name field'' in the editor. It can be changed using [[setVehicleVarName]].
 
|mp= Since it is possible to [[setVehicleVarName]] individually on each PC, the value of [[vehicleVarName]] returned will be [[Multiplayer Scripting#Locality|local]] to the PC on which command is executed.


|s1= [[vehicleVarName]] object
|s1= [[vehicleVarName]] object
Line 37: Line 35:
}}
}}


<dl class="command_description">
{{Notes
 
|user= Killzone_Kid
<dt></dt>
|timestamp= 20150419084500
<dd class="notedate">Posted on April 19, 2015 - 08:45 (UTC)</dd>
|text= To get variable names referencing an object in mission namespace:
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<code>KK_fnc_objectVarNames = {
<dd class="note">
To get variable names referencing an object in mission namespace:
<code>KK_fnc_objectVarNames <nowiki>=</nowiki> {
[[private]] "_names";
[[private]] "_names";
_names <nowiki>=</nowiki> [];
_names <nowiki>=</nowiki> [];
Line 56: Line 51:


{{cc|Example}}
{{cc|Example}}
myGroup <nowiki>=</nowiki> [[group]] [[player]];
myGroup = [[group]] [[player]];
aGroup <nowiki>=</nowiki> [[group]] [[player]];
aGroup = [[group]] [[player]];
[[hint]] [[str]] ([[group]] [[player]] [[call]] KK_fnc_objectVarNames); //["agroup","mygroup"]</code>
[[hint]] [[str]] ([[group]] [[player]] [[call]] KK_fnc_objectVarNames); {{cc|["agroup", "mygroup"]}}</code>
</dd>
}}
 
</dl>

Revision as of 22:54, 18 February 2022

Hover & click on the images for description

Description

Description:
Returns the variable name that contains a primary editor reference to this object. This is the variable given in the Insert Unit dialog / name field in the editor. It can be changed using setVehicleVarName.
Groups:
Object Manipulation

Syntax

Syntax:
vehicleVarName object
Parameters:
object: Object
Return Value:
String - Variable name, if none was set, "" is returned

Examples

Example 1:
hint vehicleVarName player;

Additional Information

See also:
setVehicleVarName 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

Template:Notes