Jump to content

ArtilleryStrike

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (ArtilleryStrike – created via PowerShell script (2025-11-11T21:12:21Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: ArtilleryStrike
Function Description: Fires a series of artillery strikes at random positions around a given location, with optional runway avoidance and configurable explosion power.
File Location: cmm.MapCommandFunctions.lua
Syntax: CMM.ArtilleryStrike( table vec3 , number spread , number rounds , number explPower , boolean: rangeshots , boolean: hitrunways ,boolean verbose )
Return Value:
Parameters: Name Description
vec3The base position (x, y, z) where artillery strikes will originate.
spreadThe spread radius in meters for each shot (defaults to CMM.arty.size if not provided).
roundsThe number of rounds to fire (defaults to CMM.arty.rounds if not provided).
explPowerThe base explosion power (defaults to 100 if not provided).
rangeshotsIf true, adds 2 extra rounds to account for ranging shots (defaults to false).
hitrunwaysIf true, artillery will avoid runways; if false, it may hit runways (defaults to false).
verboseIf true, prints detailed logs for each shot and round completion (defaults to false).
Example: CMM.ArtilleryStrike({100, 50, 0}, 50, 10, 150, true, false, true)
Example Description: Fires 10 rounds of artillery from (100, 50, 0) with 50m spread, 150 explosion power, ranging shots enabled, runway avoidance disabled, and verbose logging enabled.
Related Functions:
Notes: This function is the back end for the Map Command !arty