ArtilleryStrike
Appearance
| 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 |
| vec3 | The base position (x, y, z) where artillery strikes will originate. | |
| spread | The spread radius in meters for each shot (defaults to CMM.arty.size if not provided). | |
| rounds | The number of rounds to fire (defaults to CMM.arty.rounds if not provided). | |
| explPower | The base explosion power (defaults to 100 if not provided). | |
| rangeshots | If true, adds 2 extra rounds to account for ranging shots (defaults to false). | |
| hitrunways | If true, artillery will avoid runways; if false, it may hit runways (defaults to false). | |
| verbose | If 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 | |