A_FireGoldWandPL1

From ZDoom Wiki
Jump to navigation Jump to search

A_FireGoldWandPL1
(no parameter)

Fires one hitscan attack dealing 1d8+6 damage using a GoldWandPuff1, and plays the sound "weapons/wandhit" on the WEAPON channel. When holding fire, the first shot is accurate but the following have a random horizontal spread of up to 5.625°.

If vertical bullet spread for weapons is enabled, the function applies a random vertical spread of up to 3.549° in addition to the horizontal one.


The behavior of this function can be recreated by using A_FireBullets:

A_FireBullets(random(5, 6), 0, 1, random(2, 3), "GoldWandPuff1")

This codepointer is restricted to GoldWand and derived classes.

Examples

This example is taken straight from the Gold Wand from Heretic.

 Fire:
   GWND B 3 
   GWND C 5 A_FireGoldWandPL1
   GWND D 3
   GWND D 0 A_ReFire
   Goto Ready