Classes:Minigun

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
  1. This actor is already defined in GZDoom, there's no reason to define it again.
  2. In fact, trying to define an actor with the same name will cause an error (because it already exists).
  3. If you want to make your own version of this actor, use inheritance.
  4. Definitions for existing actors are put on the wiki for reference purpose only.
Minigun
Actor type Weapon Game MiniSkulltagLogoIcon.png (Skulltag)
DoomEd Number 5014 Class Name Minigun
Spawn ID 214 Identifier T_MINIGUN
Center Warning: This class is a Skulltag-specific actor that is not included in ZDoom!


Classes: InventoryWeaponMinigun

The minigun is a rapid fire bullet weapon, even faster than the chaingun, which uses clips for ammo.

DECORATE definition

ACTOR Minigun : Weapon 5014
{
  SpawnID 214
  Radius 20
  Height 16
  Weapon.AmmoType "Clip" 
  Weapon.AmmoGive 20
  Weapon.AmmoUse 1
  Weapon.Selectionorder 700
  Weapon.Kickback 100
  Weapon.SlotNumber 4 // This line isn't in skulltag.pk3, which instead defines the slot directly in DoomPlayer
  Inventory.PickupMessage "$PICKUP_MINIGUN" // "You got the minigun!"
  Obituary "$OB_MINIGUN" // "%o was drilled by %k's minigun."
  AttackSound "weapons/minigun"
  States
  {
  Spawn:
    MNGN A -1
    Loop
  Ready:
    MNGG A 1 A_WeaponReady
    Loop
  Deselect:
    MNGG A 1 A_Lower
    Loop
  Select: 
    MNGG A 1 A_Raise 
    Loop  
  Fire: 
    MNGG A 0 A_GunFlash
    MNGG A 2 A_FireBullets(5.6, 0, 1, 5, "BulletPuff")
    MNGG B 2 A_FireBullets(5.6, 0, 1, 5, "BulletPuff")
    MNGG A 2 A_ReFire
    MNGG B 2
    MNGG A 4
    MNGG B 4
    MNGG A 8
    MNGG B 8
    Goto Ready 
  Flash: 
    MNGF A 3 BRIGHT A_Light1 
    MNGF B 3 BRIGHT A_Light0
    Stop 
  }
}