IsLaser
Draws a beam from the muzzle to the target as the weapon fires.
- Applies to
- WeaponType
- File
rules.ini- Section
[<ObjectType ID>]- Value
- boolean
- When omitted
no
IsLaser=yes draws a beam from the muzzle to the target each time the weapon fires. The beam is only a visual effect. The weapon still fires its projectile, and the projectile deals all the damage when it detonates.
[MyObeliskRay] ; example WeaponTypeIsLaser=yesLaserInnerColor=255,0,0LaserOuterColor=128,0,0LaserOuterSpread=20,40,40LaserDuration=15Projectile=LLine ; a BulletType, registered by a weapon naming it as its ProjectileWhat is drawn
Section titled “What is drawn”A laser shot draws two effects along the line from the muzzle to the target’s aim point:
- The beam: a thin core line in
LaserInnerColor, with two glow lines beside it inLaserOuterColor.LaserOuterSpreadvaries the glow color each frame, and the beam lastsLaserDurationframes. - A screen glow along the same line, drawn only at the high detail level. It brightens only the red of whatever lies beneath it, whatever colors the beam uses, and fades out over about 22 frames.
IsBigLaser=yeswidens it.
Effects on the shot
Section titled “Effects on the shot”When the firing slot has a barrel length above 0, most projectiles take two flight turns as they launch, so they appear past the muzzle. A laser weapon’s projectile skips those turns and starts at the barrel mounting. The shot, step by step lists the firing order.
On a structure, each laser shot resets the turret’s charge animation to its first frame. The structure also loses its turret charge, unless it has more than one round of Ammo left. Charges covers what that means for a charging weapon.