FireSiegeEngine
Fires a loaded siege engine, as its operator’s fire key would.
The shot leaves a moment later - a trebuchet’s sling lets go 2 s into the swing, a cannon’s fuse burns 1.5 s - along the engine’s
aim (AimSiegeEngine; never aimed: straight ahead). Its operator, if anyone works it, is the shooter. Refused (the second
value says why) when it is not loaded.
Syntax
Section titled “Syntax”FireSiegeEngine(id)| Parameter | Type | |
|---|---|---|
id |
number | the engine |
Returns
Section titled “Returns”boolean, string - whether it fires, and why not
Example
Section titled “Example”-- the mode's own battery: every loaded cannon fires at the gatefor _, id in ipairs(GetSiegeEngines()) do if GetEntityTemplate(id) == "cannon" then AimSiegeEngine(id, GATE_X, GATE_Y, GATE_Z) FireSiegeEngine(id) endendSee also
Section titled “See also”LoadSiegeEngine · OnSiegeShot · OnSiegeImpact · the Siege engines group of the index
