TurretAnimY
The vertical screen offset from a building's artwork to its turret.
- 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 down the screen and a negative one up it. It places the turret animation, and on a building drawn with a voxel turret or a voxel barrel it places that model.
[MYTOWER] ; a BuildingType registered in [BuildingTypes]TurretAnim=MYTOWER_A ; an AnimType registered in [Animations]TurretAnimX=-2TurretAnimY=10 ; the turret sits two pixels left of the draw point and ten below itThe 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.
Because the offset lands on the ground rather than in the air, a turret animation lifted up the screen by a negative value also sorts as though it stood that much further back, and can fall behind objects it used to be drawn over. TurretAnimYSort covers biasing that sorting position back without moving the artwork again.