Difference between revisions of "DCS func getName"

From DCS World Wiki - Hoggitworld.com
m (1 revision imported)
 
 
(One intermediate revision by the same user not shown)
Line 16: Line 16:
  
 
Function also works with [[DCS_Class_Unit|Unit]], [[DCS_Class_Static_Object|Static Object]], [[DCS_Class_Airbase|Airbase]]
 
Function also works with [[DCS_Class_Unit|Unit]], [[DCS_Class_Static_Object|Static Object]], [[DCS_Class_Airbase|Airbase]]
 +
 +
When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id.
  
 
|rtnType= string
 
|rtnType= string
Line 42: Line 44:
 
}}
 
}}
 
[[Category:Class Functions|getName]]
 
[[Category:Class Functions|getName]]
 +
[[Category:Game Patch 1.2.0|getName]]

Latest revision as of 23:56, 20 March 2022

Scripting Root

Envrioment: Mission Scripting
Function: getName Added with: 1.2.0
Member Of: Object, Group
Syntax: string Object.getName(Class Self )
Description: Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions.

Function also works with Unit, Static Object, Airbase

When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id.


Return Value: string
Return Example: 'bob', "Unit #001"
Examples:
Related Functions: Object Functions: isExist, destroy, getCategory, getTypeName, getDesc, hasAttribute, getName, getPoint, getPosition, getVelocity, inAir

Group Functions: isExist, activate, destroy, getCategory, getCoalition, getName, getID, getUnit, getUnits, getSize, getInitialSize, getController, enableEmission

Notes: