Classes:MWeapLightning

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.
Arc of death spell
Actor type Weapon Game MiniHexenLogoIcon.png
DoomEd Number 8040 Class Name MWeapLightning


Classes: InventoryWeaponMageWeaponMWeapLightning
The Mage's third weapon, the Arc of Death spell uses 5 green mana to summon a vertical lightning bolt that will stick on enemies and keep dealing damage.

DECORATE definition

ACTOR MWeapLightning : MageWeapon
{
  +NOGRAVITY
  Weapon.SelectionOrder 1100
  Weapon.AmmoUse1 5
  Weapon.AmmoGive1 25
  Weapon.KickBack 0
  Weapon.YAdjust 20
  Weapon.AmmoType1 "Mana2"
  Inventory.PickupMessage "$TXT_WEAPON_M3" // "ARC OF DEATH"
  Tag "$TAG_MWEAPLIGHTNING"

  action native A_LightningReady();
  action native A_MLightningAttack(class<Actor> floor = "LightningFloor", class<Actor> ceiling = "LightningCeiling");

  States
  {
  Spawn:
    WMLG ABCDEFGH 4 Bright
    Loop
  Select:
    MLNG A 1 Bright A_Raise
    Loop
  Deselect:
    MLNG A 1 Bright A_Lower
    Loop
  Ready:
    MLNG AAAAA 1 Bright A_WeaponReady
    MLNG A 1 Bright A_LightningReady
    MLNG BBBBBB 1 Bright A_WeaponReady
    MLNG CCCCC 1 Bright A_WeaponReady
    MLNG C 1 Bright A_LightningReady
    MLNG BBBBBB 1 Bright A_WeaponReady
    Loop
  Fire:
    MLNG DE 3 Bright
    MLNG F 4 Bright A_MLightningAttack
    MLNG G 4 Bright
    MLNG HI 3 Bright
    MLNG I 6 Bright Offset(0, 199)
    MLNG C 2 Bright Offset(0, 55)
    MLNG B 2 Bright Offset(0, 50)
    MLNG B 2 Bright Offset(0, 45)
    MLNG B 2 Bright Offset(0, 40)
    Goto Ready
  }
}