Jump to content

Tools.GetDisplayName

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (tools.GetDisplayName – created via PowerShell script (2025-11-11T21:12:50Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: tools.GetDisplayName
Function Description: Retrieves the display name of a unit or object based on a typename string or object table. It checks the provided input type and uses appropriate getDescByName functions to fetch the display name, falling back to 'unknown' if no match is found.
File Location: cmm.tools.lua
Syntax: CMM.tools.GetDisplayName( table or string tn )
Return Value: string
Parameters: Name Description
tnEither a table containing a typename field or a string representing the typename of an object such as a unit, static object, or airbase.
Example: CMM.tools.GetDisplayName("Fighter")
Example Description: Returns the display name of a fighter unit using the typename string.
Related Functions:
Notes: