GetScore
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | GetScore | |
| Function Description: | Retrieves the combat score value associated with a unit, aircraft, or weapon type. The function looks up the supplied TypeName in the internal CMM.OBJECTS and CMM.WEAPONS tables, obtains the first tag of that entry, then returns the corresponding score from CMM.TAGS. If no matching entry or tag is found, a default score of **1** is returned. | |
| File Location: | cmm.DCSFunctions.lua | |
| Syntax: | CMM.GetScore( string TypeName ) | |
| Return Value: | number | |
| Parameters: | Name | Description |
| TypeName | The name of an object table or weapon type to look up (e.g., "A-10C"). | |
| Example: | env.info("Score: " .. tostring(CMM.GetScore("F-16C"))) | |
| Example Description: | Demonstrates how to obtain and log the combat score for a given aircraft type. | |
| Related Functions: | ||
| Notes: | ||