Skip to content

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.

SetSiegeEngineHealth(id, percent)
Parameter Type
id number the engine
percent number 0-100; below 0 = it cannot be wrecked

boolean - false when it is no engine

SetSiegeEngineHealth(id, -1) -- the keep's own cannon cannot be shot to pieces
SetSiegeEngineHealth(id2, 100) -- the wrecked trebuchet is rebuilt

OnSiegeEngineDestroyed · GetSiegeEngineInfo · the Siege engines group of the index