PrimaryFireFLH
The offset from an object's center that its first weapon fires from.
- Applies to
- AircraftTypeBuildingTypeInfantryTypeUnitType
- File
art.ini- Section
[<Image ID>]Image ID: Image= value; ObjectType ID when omitted- Value
- point (x,y,z)
- When omitted
0,0,0
The value is three whole numbers, X,Y,Z, in leptons (256 to a cell). The offset turns with the gun as the object aims:
Xruns forward, in the direction the gun faces.Yruns sideways, with positive values to the gun’s left.Zruns upward.
[MYTANK] ; the Image ID of a UnitTypePrimaryFireFLH=100,0,60 ; a bit under half a cell forward, 60 leptons upThe gun’s heading depends on the kind of object. Firing geometry lists it for each.
The mounting and the muzzle
Section titled “The mounting and the muzzle”The offset places two points, and Firing geometry lists which part of a shot uses each:
- The mounting is where the projectile is created and where its aim is measured from. It is this offset with
TurretOffsetadded toX. It stays in place as the barrel elevates. On a vehicle or aircraft it also tilts with the body on slopes and in flight. - The muzzle is where the firing animation, laser beam, sonic wave and attached particle systems appear. It starts from the same offset but does not tilt with the body. It rises by
PBarrelThickness, then extendsPBarrelLengthalong the elevated barrel.
An infantry type has no separate mounting: its projectile starts at the muzzle, so PBarrelThickness and PBarrelLength move its projectile as well as its effects.
X and Z also position a drawn voxel barrel, including the point it pivots around as it elevates. Changing this offset can therefore move the barrel artwork as well as the shot.
Burst weapons
Section titled “Burst weapons”Y is reversed on every second shot of a Burst weapon. A nonzero Y therefore gives a burst weapon two mountings, one on each side of the centerline. How a burst alternates muzzles covers the order and its exceptions.
Other slots and overrides
Section titled “Other slots and overrides”The elite weapon slot has no offset keys of its own. It uses PrimaryFireFLH, PBarrelLength and PBarrelThickness, so an Elite weapon fires from the same point as the weapon it replaces.
Two structure settings replace this offset for every weapon slot. If both are set, the first one listed applies:
- A
PrimaryFirePixelOffsetother than65535,65535pins both points to that screen offset. - A
BarrelAnimIsVoxel=yesstructure takes both points fromVoxelBarrelOffsetToBarrelEnd.
Otherwise, a structure whose turret is a voxel adds the turret animation’s screen offset to both points.