Jump to content

ClearGroupsPersistence

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (ClearGroupsPersistence – created via PowerShell script (2025-11-11T21:12:29Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
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
RedGroundFileFile path for RED group persistence (defaults to CMM.PERSISTENCE.REDGROUNDFILE if not provided).
BlueGroundFileFile path for BLUE group persistence (defaults to CMM.PERSISTENCE.BLUEGROUNDFILE if not provided).
ClearRedFlag indicating whether to clear the RED persistence file (defaults to true).
ClearBlueFlag 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: