Jump to content

GetName

From CMM Wiki
Revision as of 10:11, 11 November 2025 by Ozdeadmeat (talk | contribs) (GetName – created via PowerShell script (2025-11-11T21:11:58Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetName
Function Description: Returns the full "display" name for a DCS object or type; accepts either an object table (e.g., Unit, Weapon) or the type name string. The function looks up the supplied key in CMM.OBJECTS and CMM.WEAPONS and returns the DisplayName field if present, otherwise it falls back to the original type name.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.GetName( table or string obj )
Return Value: string
Parameters: Name Description
objObject table or type name string to query.
Example: env.info("Full name: "..tostring(CMM.GetName(unit)))
Example Description: Demonstrates retrieving a unit’s human‑readable name by passing the unit instance to CMM.GetName.
Related Functions:
Notes: