Classes:StrifeCrossbow

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.
Crossbow
Actor type Weapon Game MiniStrifeLogoIcon.png
DoomEd Number 2001 Class Name StrifeCrossbow
Conversation ID 194, 188, 192 Puzzle Item ID N/A


Classes: InventoryWeaponStrifeWeaponStrifeCrossbow
 →StrifeCrossbow2
Your first proper weapon in Strife, the crossbow has two modes. This is the first mode, in which it fires electric bolts. This does more damage to mechanical targets.

DECORATE definition

ACTOR StrifeCrossbow : StrifeWeapon
{
  +FLOORCLIP
  Weapon.SelectionOrder 1200
  +WEAPON.NOALERT
  Weapon.AmmoUse1 1
  Weapon.AmmoGive1 8
  Weapon.AmmoType1 "ElectricBolts"
  Weapon.SisterWeapon "StrifeCrossbow2"
  Inventory.PickupMessage "$TXT_STRIFECROSSBOW" // "You picked up the crossbow"
  Tag "$TAG_STRIFECROSSBOW1" // "Crossbow"
  Inventory.Icon "CBOWA0"

  action native A_ClearFlash ();
  action native A_ShowElectricFlash ();
  action native A_FireArrow (class<Actor> proj);

  States
  {
  Spawn:
    CBOW A -1
    Stop
  Ready:
    XBOW A 0 A_ShowElectricFlash
    XBOW A 1 A_WeaponReady
    Wait
  Deselect:
    XBOW A 1 A_Lower
    Loop
  Select:
    XBOW A 1 A_Raise
    Loop
  Fire:
    XBOW A 3 A_ClearFlash
    XBOW B 6 A_FireArrow("ElectricBolt")
    XBOW C 4
    XBOW D 6
    XBOW E 3
    XBOW F 5
    XBOW G 0 A_ShowElectricFlash
    XBOW G 5 A_CheckReload
    Goto Ready+1
  Flash:
    XBOW KLM 5
    Loop
  }
}