Classes:Railgun

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do NOT need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it will cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
Railgun
Actor type Weapon Game MiniSkulltagLogoIcon.png (Skulltag)
DoomEd Number 5012 Class Name Railgun
Spawn ID 164 Identifier T_RAILGUN
Center Warning: This class is a Skulltag-specific actor that is not included in ZDoom!


Classes: InventoryWeaponDoomWeaponRailgun

The Railgun is a highly accurate weapon, its shots can damage multiple monsters in a line. Uses plasma cells and shares slot 6 with the plasma rifle.

DECORATE definition

ACTOR Railgun : DoomWeapon 5012
{
  SpawnID 164
  Radius 20
  Height 16
  Weapon.Selectionorder 100
  Weapon.AmmoUse 10
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  Weapon.SlotNumber 6 // This line isn't in skulltag.pk3, which instead defines the slot directly in DoomPlayer
  Inventory.Pickupmessage "$PICKUP_RAILGUN" // "You got the railgun!"
  Obituary "$OB_RAILGUN" // "%o was railed by %k."
  States
  {
  Ready:
    RLGG A 1 A_WeaponReady
    Loop
  Deselect:
    RLGG A 1 A_Lower
    Loop
  Select:
    RLGG A 1 A_Raise
    Loop
  Fire:
    RLGG E 12 A_FireRailgun
    RLGG F 6 A_CheckForReload(4, "Reloaded")
    RLGG GHIJK 6
    RLGG L 6 A_ResetReloadCounter
  Reloaded:
    RLGG A 6
    RLGG M 0 A_ReFire
    Goto Ready
  Flash:
    TNT1 A 5 bright A_Light1
    TNT1 A 5 bright A_Light2
    TNT1 A 0 bright A_Light0
    Goto LightDone
  Spawn:
    RAIL A -1
    Stop
  }
}

Skulltag DECORATE definition

ACTOR Railgun : DoomWeapon 5012
{
  SpawnID 164
  Radius 20
  Height 16
  Weapon.Selectionorder 100
  Weapon.AmmoUse 10
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  Inventory.Pickupmessage "$PICKUP_RAILGUN" // "You got the railgun!"
  Obituary "$OB_RAILGUN" // "%o was railed by %k."
  States
  {
  Ready:
    RLGG A 1 A_WeaponReady
    Loop
  Deselect:
    RLGG A 1 A_Lower
    Loop
  Select:
    RLGG A 1 A_Raise
    Loop
  Fire:
    RLGG E 12 A_FireRailgun
    RLGG F 6 A_CheckRailReload
    RLGG GHIJKLA 6
    RLGG M 0 A_ReFire
    Goto Ready
  Flash:
    TNT1 A 5 bright A_Light1
    TNT1 A 5 bright A_Light2
    TNT1 A 0 bright A_Light0
    Goto LightDone
  Spawn:
    RAIL A -1
    Stop
  }
}