WeaponRangeOnRoad ScheduledTask
Appearance
| 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 |
| argTable | Table 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: | ||
}