A_FireArrow

From ZDoom Wiki
Jump to navigation Jump to search

A_FireArrow (string proj)


Fires an actor of type proj, with a spread of up to 5.625°. This is affected by the player's accuracy: every two accuracy upgrade decreases the spread by half. The player using the calling weapon is then put in the Melee state for the relevant PlayerPawn class, if any, and the sound "weapons/xbowshoot" is played on the WEAPON channel.

This codepointer is restricted to StrifeCrossbow and derived classes.

Examples

Taked from strife electric crossbow fire state:

 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

Same, but for strife poison crossbow:

Fire:
   XBOW H 3
   XBOW B 6 A_FireArrow("PoisonBolt")
   XBOW C 4
   XBOW D 6
   XBOW E 3
   XBOW I 5
   XBOW J 5 A_CheckReload
   Goto Ready