GetShortName
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | GetShortName | |
| Function Description: | Returns a concise "short" 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 DisplayNameShort field if present, otherwise it falls back to the original type name. | |
| File Location: | cmm.DCSFunctions.lua | |
| Syntax: | CMM.GetShortName( table or string obj ) | |
| Return Value: | string | |
| Parameters: | Name | Description |
| obj | Object table or type name string to query. | |
| Example: | env.info("Short name: "..tostring(CMM.GetShortName(unit))) | |
| Example Description: | Shows how to obtain a compact identifier for a unit by passing the unit instance to CMM.GetShortName. | |
| Related Functions: | ||
| Notes: | ||