Skip to content

GetSiegeEngineInfo

A siege engine as it stands - its phase, operator, aim, structure and shots.

phase is "rest", "winding" (a trebuchet’s arm going down), "loading", "loaded", "firing" or "destroyed" (and "cocked": a trebuchet wound with no stones left to load); secondsLeft is the running phase’s time. aim is the point it is aimed at (nil until something aimed it: it throws straight ahead); pitch and speed are the throw the aim takes (degrees, m/s), range its reach on level ground, and inReach is false when the aim lies beyond its limits - it throws as far (or, a cannon, as high) as it can. health is its structure in percent (-1: nothing can wreck it); shots the shots left (-1 = no limit); fired how many it fired. A siege ladder’s phase is "up", "falling", "down", "raising" or "destroyed"; it has no operator, aim or shots. A pile of stones’ is "rest", "lifting", "holding" or "throwing": its operator is the player with its stone in their hands, aim where the last one was thrown, shots the stones on it.

GetSiegeEngineInfo(id)
Parameter Type
id number the engine

table - {kind =, phase =, operator =, yaw =, aim =, pitch =, speed =, range =, inReach =, health =, shots =, fired =, secondsLeft =} (operator a player or nil, aim {x =, y =, z =} or nil, secondsLeft nil when no phase runs); nil when it is no siege engine

local info = GetSiegeEngineInfo(id)
if info.phase == "loaded" and info.inReach then FireSiegeEngine(id) end

GetSiegeEngines · AimSiegeEngine · SetSiegeEngineHealth · the Siege engines group of the index