A FireBullets: Difference between revisions

From ZDoom Wiki
Jump to navigation Jump to search
mNo edit summary
m (Grammar)
Line 4: Line 4:
Defines a custom hitscan attack for weapons. You have to specify the horizontal and vertical spread, the amount of bullets and the damage per bullet.
Defines a custom hitscan attack for weapons. You have to specify the horizontal and vertical spread, the amount of bullets and the damage per bullet.


The first bullet fired in the Fire (not Hold) sequence ignores the spread is always perfectly accurate. Set ''numbullets'' to a negative value to remove this effect.
The first bullet fired in the Fire (not Hold) sequence normally ignores the spread and is always perfectly accurate. Setting ''numbullets'' to a negative value removes this effect.


''UseNoAmmo'' determines if the attack uses ammo or not. The attack uses ammo if it's set to 1.
''UseNoAmmo'' determines if the attack uses ammo or not. The attack uses ammo if it's set to 1.

Revision as of 18:00, 17 February 2007

A_FireBullets (angle spread_horz, angle spread_vert, int numbullets, int damage [, string pufftype [,bool UseNoAmmo [, float range]]])


Defines a custom hitscan attack for weapons. You have to specify the horizontal and vertical spread, the amount of bullets and the damage per bullet.

The first bullet fired in the Fire (not Hold) sequence normally ignores the spread and is always perfectly accurate. Setting numbullets to a negative value removes this effect.

UseNoAmmo determines if the attack uses ammo or not. The attack uses ammo if it's set to 1.

The damage formula is damage * ((random()%3)+1).

Optionally you can specify a puff type that is spawned when hitting a wall or a non-bleeding actor. The puff also determines the damage type of the attack.

range specifies the maximum distance of the attack.