MrxArtilleryAttack
Module: mrxartilleryattack.lua
Overview
The MrxArtilleryAttack module is responsible for executing a staggered falling-ordnance strike. It spawns multiple shells at randomized positions around the target location, creating an artillery bombardment effect.
Inheritance
- Inherits from:
none β base/utility module - Imports:
none
Instance pattern
This is a stateless manager/utility module (no per-instance table). It does not track any persistent state.
Functions
Create(uGuid, nShells, nDistance, sTemplate, nTime)
Spawns an artillery bombardment at the specified location (uGuid). Configures the number of shells (nShells), distance from the target (nDistance), shell template (sTemplate), and total time for the attack (nTime). Randomizes positions for each shell and schedules their deployment using timers.
TriggerFallingMissile(x, y, z, sTemplate)
Spawns a single falling missile at the specified coordinates (x, y, z) using the provided template (sTemplate).
Events
- Listens for custom event
Event.TimerRelativeto schedule each shellβs deployment.
Notes for modders
- Ensure that the correct parameters are passed to
Createto achieve the desired artillery strike. - Customize the number of shells, distance, and timing by adjusting the parameters when calling
Create. - The module uses randomization to spread out the shells around the target location, creating a more realistic artillery bombardment effect.