Skip to content

AimSiegeEngine

Aims a siege engine at a point.

It turns there at its own pace (within its traverse, SetSiegeEngineRules) and sets its throw for the point - within its reach (GetSiegeEngineInfo’s inReach says whether it gets there). An operator’s look aims it the same way while they work it, so the mode’s aim lasts until they look elsewhere.

AimSiegeEngine(id, x, y, z)
Parameter Type
id number the engine
x number metres
y number metres
z number metres

boolean - false when it is no engine or it is wrecked

-- the defenders' cannon answers the trebuchet that fired at them
function OnSiegeShot(id, shooter, shot)
if GetEntityTemplate(id) == "trebuchet" then
AimSiegeEngine(DEFENDERS_CANNON, GetEntityPos(id))
end
end

LoadSiegeEngine · FireSiegeEngine · GetSiegeEngineInfo · the Siege engines group of the index