LoadBLUEFORUnitClasses
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | LoadBLUEFORUnitClasses | |
| Function Description: | Loads BLUEFOR unit class data from a specified JSON file or falls back to a default file if the provided path does not exist. Parses the JSON content into CMM.BLUEFOR and logs success or failure messages accordingly. | |
| File Location: | cmm.persistence.lua | |
| Syntax: | CMM.LoadBLUEFORUnitClasses( string FilePath ) | |
| Return Value: | nil | |
| Parameters: | Name | Description |
| FilePath | Full path to the JSON file containing BLUEFOR unit class data. If not provided or invalid, defaults to CMM.TEMPLATEDIR .. "BLUEFOR_UNIT_TYPES.json". | |
| Example: | CMM.LoadBLUEFORUnitClasses("CMM/Custom/BLUEFOR_UNIT_TYPES.json") | |
| Example Description: | Loads custom BLUEFOR unit classes from a specified file path and assigns them to CMM.BLUEFOR, logging success or failure based on file existence and validity. | |
| Related Functions: | ||
| Notes: | ||