GetName
Appearance
| 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 |
| obj | Object 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: | ||