Jump to content

WeaponRangeOnRoad ScheduledTask

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (WeaponRangeOnRoad_ScheduledTask – created via PowerShell script (2025-11-11T21:12:03Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: WeaponRangeOnRoad_ScheduledTask
Function Description: Executes a scheduled task that checks the unit count in a weapon‑range zone, cleans it if below threshold, and replenishes units up to the specified limit.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.WeaponRangeOnRoad_ScheduledTask( table argTable )
Return Value:
Parameters: Name Description
argTableTable of arguments – {WeaponsRangeZoneName <string>, Country <number>, UnitTypeTable <TBL>, UnitLimit <number>
Example: timer.scheduleFunction(WeaponRangeOnRoad_ScheduledTask,{"Weapons-Range-01", CMM.REDFOR.COAL, {CMM.REDFOR.UNARMED, CMM.REDFOR.FUEL, CMM.REDFOR.AMMO, CMM.REDFOR.ENGI}, 100}, timer.getTime() + 10)
Example Description: Schedules a check on "Weapons‑Range‑01" for all countries, replenishing up to ten F‑16 or MiG‑29 units when the zone is under‑populated.
Related Functions:
Notes:

}