Classes:StrifeCrossbow

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.
Crossbow
Actor type Weapon Game MiniStrifeLogoIcon.png (Strife)
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
  }
}