Classes:GrenadeLauncher

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.
Grenade launcher
Actor type Weapon Game MiniSkulltagLogoIcon.png
DoomEd Number 5011 Class Name GrenadeLauncher
Spawn ID 163 Identifier T_GRENADELAUNCHER
Center Warning: This class is a Skulltag-specific actor that is not included in ZDoom!


Classes: InventoryWeaponDoomWeaponGrenadeLauncher

A grenade launcher inspired by Quake's own. It uses standard rockets rather than a separate type of grenade ammunitions.

DECORATE definition

ACTOR GrenadeLauncher : DoomWeapon 5011
{
  SpawnID 163
  Radius 20
  Height 16
  Weapon.Selectionorder 2500
  +WEAPON.NOAUTOFIRE
  +WEAPON.NOAUTOAIM
  Weapon.AmmoUse 1
  Weapon.AmmoGive 2
  Weapon.AmmoType "RocketAmmo"
  Weapon.Kickback 100
  Weapon.SlotNumber 5 // This line isn't in skulltag.pk3, which instead defines the slot directly in DoomPlayer
  Inventory.PickupMessage "$PICKUP_GRENADELAUNCHER" // "You got the grenade launcher!"

  action native A_FireSTGrenade ();

  States
  {
  Spawn:
    GLAU A -1
    Stop
  Ready:
    GRLG A 1 A_WeaponReady
    Loop
  Deselect:
    GRLG A 1 A_Lower
    Loop
  Select: 
    GRLG A 1 A_Raise
    Loop
  Fire: 
    GRLG B 8 A_GunFlash
    GRLG B 12 A_FireSTGrenade
    GRLG B 0 A_ReFire
    Goto Ready 
  Flash: 
    GRLF A 3 bright A_Light1
    GRLF B 4 bright
    GRLF C 4 bright A_Light2
    GRLF D 4 bright A_Light2
    Goto LightDone
  }
}