A_BFGSpray [(string flashtype [, int numrays [, int damage]])]
A_BFGSpray [(string flashtype [, int numrays [, int damage [, float angle [, float distance [, float vrange [, int explicit_damage]]]]]])] (development version only)
- flashtype - Spawns a fan of hitscan attacks based on the actor specified.
- numrays - Spawns this many of the specified actor across an angle of 90 degrees with the target in the center. Default is 40, i.e. one tracer every 2.25°.
- damage - The amount of damage to cause to an afflicted target. Note that this function uses a unique method, and adds a random value between 1 and 8. Default is 15.
- angle - Determines the field of view. Any actors within this angle are subject to being sprayed and damaged. Default is 90 (which is the player's FOV). (development version only)
- distance - Determines how far the function should search for monsters from the calling actor. Default is 1024. (development version only)
- vrange - (Clarification needed.) Default is 32. (development version only)
- explicit_damage - If greater than 0, the tracers deal this exact amount of damage and the damage parameter is ignored. Default is 0. (development version only)
Performs the secondary BFG attack. This consists of a fan of numrays hitscan attacks across an angle of 90 degrees with the target in the center. If no amount is given it will use 40 as a default, i.e. one tracer every 2.25°. The vertical range is 64° (32° in each direction of up/down), which is a bit less than the normal autoaim of 70° for primary attacks. The attack originates from the shooter of the missile and covers a distance of 1024. Any shootable actor beyond that is not harmed. The amount of damage is specified with the third parameter. Note that A_BFGSpray uses a unique method to determine damage. It adds a number of random values between 1 and 8. With this parameter you specify the amount of random numbers to be added. The default is 15. If explicit_damage is specified and is greater than 0, each tracer does that exact amount. The damage parameter is ignored in this case. Default is 0. (development version only)
At the position of each shootable actor that is hit an actor of type flashtype is spawned. If none is specified it will use the standard BFG flash.
Angle, distance and vertical range are no longer hard-coded into the function and can be set if one desires. They default to 90, 1024 and 32, respectively. (development version only)
Note that this function will create unpredictable effects if used on a non-missile.
Currently, BFG flash actors have been slightly expanded upon to allow custom damage types to be applied to them, much like other weapon puffs. Note that the EXTREMEDEATH flag still has no effect on this, however, so modders must use DamageType "Extreme" for it to work properly.
Because of the unique behavior of the BFG, this function has very limited use in custom projects. The only built-in class that makes use of it is the BFGBall, which is fired by the BFG, and triggers the function upon exploding.
Death: BFE1 AB 8 Bright BFE1 C 8 Bright A_BFGSpray BFE1 DEF 8 Bright Stop