SetSiegeEngineHealth
Sets a siege engine’s structure - wrecks it, repairs it, or makes it unbreakable.
In percent: a new engine has 100, and the other engines’ shots near it take it down (structureDamage,
SetSiegeEngineRules). 0 wrecks it (OnSiegeEngineDestroyed runs, its operator lets go - a ladder’s climbers come down
with it); more repairs a wrecked one - it stands at rest again, unloaded (a ladder lies whole, to be raised); below 0 nothing
can wreck it.
Syntax
Section titled “Syntax”SetSiegeEngineHealth(id, percent)| Parameter | Type | |
|---|---|---|
id |
number | the engine |
percent |
number | 0-100; below 0 = it cannot be wrecked |
Returns
Section titled “Returns”boolean - false when it is no engine
Example
Section titled “Example”SetSiegeEngineHealth(id, -1) -- the keep's own cannon cannot be shot to piecesSetSiegeEngineHealth(id2, 100) -- the wrecked trebuchet is rebuiltSee also
Section titled “See also”OnSiegeEngineDestroyed · GetSiegeEngineInfo · the Siege engines group of the index
