Tools.GetDisplayName
Appearance
| 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 |
| tn | Either 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: | ||