Skip to main content

Railgun

Fires a piercing Rail at high speeds. A long range weapon. Requires Rails and electricity for ammo. The damage increases for every 10 studs of length. It will pierce if the hit part is destroyed. Must be at least have a width and height of 6 and at least a length of 30 to function. While the Railgun is similar to the Artillery, the Railgun is nearly instant while Artillery is a projectile weapon.

Requires to charge for one minute before it can fire. While charging and when charged, it creates large amount of heat. The charging status resets when this part is damaged. When it is finished charging, it will stop creating a sound. At that point, it must be triggered and supplied by a Rail bin in order to fire.

It is a craftable and spawnable non-flammable solid.

It has a malleability of 2560.

At its default size (6x30x6) it has a durability of 8, at its maximum size it has a durability of 11.

By default, its colour is #a3a2a5.

It requires 5 AlienCore, 30 Diamond, 50 Gun, 1 Rail, 300 Titanium, and 60 Transformer to be crafted.

Events


Damaged(damage, damageType, damageSource)

Fires when the object is damaged.

The parameters for Damaged are as follows:

  • The damage parameter is the numerical damage dealt. It is a number.
  • The damageType parameter is the type of damage dealt. It is a string that can be Kinetic or Energy
  • The damageSource parameter is will return a reference to the attacking object, seems to provide references to EnergyGuns, Lasers and Guns, but not Blades or PlasmaCannons, there are other members of these lists that are untested. It is a PilotObject. It can also be nil.

Loop(deltaTime)

Fires when the object is updated by the game loop.

The deltaTime parameter is the 'time' since the last tick, it does not represent the actual time since the last tick was occurred, rather just how often a game tick should be fired (it will always be precisely 1). It is a number.


Triggered(otherPart)

Fires when the object is triggered and provides a reference to the part that triggered it.

If a Microcontroller indirectly initiated the triggering of an object, it will return the object rather than the Microcontroller, whereas in the case of directly triggering the object (i.e., calling :Trigger, but not TriggerPort), it will return the microcontroller.

The trigger source remains unchanged if the trigger is sent through something such as an Antenna, but will be set to a RemoteControl if one is present along the trigger line.

The otherPart parameter is the source of the trigger signal. It is a PilotObject.