Classes:Shotgun

From ZDoom Wiki
Jump to: navigation, 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's actually harmful as it can 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.
  5. There is only one exception: if what you want is changing Ammo capacity, you need to create a new type from Ammo.
Shotgun
Actor type Weapon Game MiniDoomLogoIcon.png
DoomEd Number 2001 Class Name Shotgun
Spawn ID 27 Identifier T_SHOTGUN


Classes: InventoryWeaponDoomWeaponShotgun


The shotgun. A hitscan weapon which has a large spread. Uses shells for ammo.


DECORATE definition

ACTOR Shotgun : DoomWeapon
{
  Weapon.SelectionOrder 1300
  Weapon.AmmoUse 1
  Weapon.AmmoGive 8
  Weapon.AmmoType "Shell"
  Inventory.PickupMessage "$GOTSHOTGUN"
  Obituary "$OB_MPSHOTGUN"
  Tag "$TAG_SHOTGUN"
  States
  {
  Ready:
    SHTG A 1 A_WeaponReady
    Loop
  Deselect:
    SHTG A 1 A_Lower
    Loop
  Select:
    SHTG A 1 A_Raise
    Loop
  Fire:
    SHTG A 3
    SHTG A 7 A_FireShotgun
    SHTG BC 5
    SHTG D 4
    SHTG CB 5
    SHTG A 3
    SHTG A 7 A_ReFire
    Goto Ready
  Flash:
    SHTF A 4 Bright A_Light1
    SHTF B 3 Bright A_Light2
    Goto LightDone
  Spawn:
    SHOT A -1
    Stop
  }
}