IsRailgun
Fires a beam that damages objects along the line from the muzzle to the target as the weapon fires.
- Applies to
- WeaponType
- File
rules.ini- Section
[<ObjectType ID>]- Value
- boolean
- When omitted
no
IsRailgun=yes fires a beam from the muzzle to the target’s center at the moment the weapon fires, after the projectile has been launched. The beam damages objects along its line once each, dealing the weapon’s AmbientDamage through its Warhead=. The weapon’s AttachedParticleSystem= is drawn along the beam.
[MyRailgun] ; example WeaponTypeIsRailgun=yesProjectile=MyBolt ; a BulletType, registered by a weapon naming it as its ProjectileAmbientDamage=200 ; the beam's damageDamage=0 ; the projectile has noneAttachedParticleSystem=LargeRailgunSys ; a ParticleSystemType registered in [ParticleSystems]ROF=60What the beam hits
Section titled “What the beam hits”The beam damages:
- a vehicle, infantry or aircraft in a cell the beam enters after leaving the firer’s cell, when its center is within
[CombatDamage] RailgunDamageRadiusof the beam’s line; - a structure in such a cell, however far its center is from the line;
- the vehicle, infantry, aircraft or structure the shot was aimed at, even if the beam did not pass through its cell.
The firing object is never damaged.
Rising ground stops the beam
Section titled “Rising ground stops the beam”If the ground rises above the beam before it reaches the target, the beam stops there and deals no AmbientDamage to anything, including the target and the objects it passed on the way. At that point, a destroyable cliff may collapse at the chance [CombatDamage] CollapseChance sets. The particle system is drawn only as far as the stopping point.
The projectile still deals damage
Section titled “The projectile still deals damage”The weapon still fires its projectile, which delivers Damage= on impact like any other shot. Set Damage=0 for a weapon that should deal its damage through the beam alone.
Firing rate
Section titled “Firing rate”While the particle system is still alive, neither of the object’s weapons can fire. The reload delay after a railgun shot is exactly ROF, with no house rate-of-fire bias, burst delay, random extra frames or veteran bonus. The next shot waits until both ROF has passed and the particle system has burned out. A structure with more than one round of Ammo left waits only for the particle system. The reload delay gives the full rules.