Skip to content

TurretAnimX

The horizontal screen offset from a building's artwork to its turret.

Specification
Applies to
BuildingType
File
rules.ini
Section
[<ObjectType ID>]
Value
integer
When omitted
0

The offset is in screen pixels, measured from the point the building’s own artwork is drawn at; a positive value moves the turret to the right and a negative one to the left. It places the turret animation, and on a building drawn with a voxel turret or a voxel barrel it places that model.

rules.ini
[MYTOWER] ; a BuildingType registered in [BuildingTypes]
TurretAnim=MYTOWER_A ; an AnimType registered in [Animations]
TurretAnimX=-2
TurretAnimY=10 ; the turret sits two pixels left of the draw point and ten below it

The pair is more than a drawing offset. It is projected back onto the ground, so the direction the building aims and fires along is measured from the displaced point rather than from its center, and on a TurretAnimIsVoxel=yes or BarrelAnimIsVoxel=yes building the shot is created there too. A turret drawn from an animation still fires from the point its firing offsets name, unmoved by this.