Classes:AssaultGun

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'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.
Assault gun
Actor type Weapon Game MiniStrifeLogoIcon.png
DoomEd Number 2002 Class Name AssaultGun
Conversation ID 188, 182, 186 Puzzle Item ID N/A


Classes: InventoryWeaponStrifeWeaponAssaultGun
An assault rifle. Fairly innaccurate by default, but can be improved in this regard by Accuracy Upgrades.

DECORATE definition

ACTOR AssaultGun : StrifeWeapon
{
  +FLOORCLIP
  Weapon.SelectionOrder 600
  Weapon.AmmoUse1 1
  Weapon.AmmoGive1 20
  Weapon.AmmoType1 "ClipOfBullets"
  Inventory.Icon "RIFLA0"
  Tag "$TAG_ASSAULTGUN" // "Assault Gun"
  Inventory.PickupMessage "$TXT_ASSAULTGUN" // "You picked up the assault gun."
  Obituary "$OB_MPASSAULTGUN" // "%o was drilled full of holes by %k's assault gun."
  States
  {
  Spawn:
    RIFL A -1
    Stop
  Ready:
    RIFG A 1 A_WeaponReady
    Loop
  Deselect:
    RIFG B 1 A_Lower
    Loop
  Select:
    RIFG A 1 A_Raise
    Loop
  Fire:
    RIFF AB 3 A_FireAssaultGun
    RIFG D 3 A_FireAssaultGun
    RIFG C 0 A_ReFire
    RIFG B 2 A_Light0
    Goto Ready
  }
}