ClearGroupsPersistence
Appearance
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | ClearGroupsPersistence | |
| Function Description: | Clears the persistence files for RED and BLUE groups by removing specified files, using default paths if none are provided. Optionally skips clearing based on flags, and logs removal actions to the environment. | |
| File Location: | cmm.persistence.lua | |
| Syntax: | CMM.ClearGroupsPersistence( string or nil RedGroundFile , string or nil BlueGroundFile , boolean or nil ClearRed , boolean or nil ClearBlue ) | |
| Return Value: | nil | |
| Parameters: | Name | Description |
| RedGroundFile | File path for RED group persistence (defaults to CMM.PERSISTENCE.REDGROUNDFILE if not provided). | |
| BlueGroundFile | File path for BLUE group persistence (defaults to CMM.PERSISTENCE.BLUEGROUNDFILE if not provided). | |
| ClearRed | Flag indicating whether to clear the RED persistence file (defaults to true). | |
| ClearBlue | Flag indicating whether to clear the BLUE persistence file (defaults to true). | |
| Example: | CMM.ClearGroupsPersistence("custom_red.json", "custom_blue.json", false, true) | |
| Example Description: | Clears only the BLUE persistence file using custom paths, while skipping RED file clearance. | |
| Related Functions: | ||
| Notes: | ||