A_BFGSpray [(string flashtype [, int numrays [, int damagecnt]])]
A_BFGSpray [(string flashtype [, int numrays [, int damagecnt [, float angle [, float distance [, float vrange [, int explicit_damage]]]]]])] (New from )
A_BFGSpray [(string flashtype [, int numrays [, int damagecnt [, float angle [, float distance [, float vrange [, int explicit_damage [, int flags]]]]]]])] (development version only)
Performs the secondary, "tracer" attack of the BFG9000. Note that this function will create unpredictable effects if used on a non-missile.
The tracer actors (flashtype) which are spawned by the function could have custom damage types 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. If PUFFGETSOWNER is used, however, it will use the calling actor's owner as the inflictor -- meaning if the owner has EXTREMEDEATH, then it will actually enact that flag. Specifically, if a BFG ball shot from a player calls A_BFGSpray and the sprays have the PUFFGETSOWNER flag, it relies upon the player's actor to determine causing extreme death or not.
- flashtype: The actor to spawn at the position of each shootable actor that is hit. Default is "BFGExtra".
- 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°.
- damagecnt: The count of iterations to calculate the damage for original BFG formula; it will add N random values from 1 to 8 together based on this value. 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). (New from )
- distance: Determines how far the function should search for monsters from the calling actor. Default is 1024. (New from )
- vrange: Determines maximum vertical angle to autoaim at, in degrees. Default is 32. (New from )
- explicit_damage: If greater than 0, the tracers deal this exact amount of damage and damagecnt is ignored. Default is 0. (New from )
- flags: The following flags can be combined by usgin the bit-wise OR operator (|): (development version only)
- BFGF_MISSILEORIGIN — If set, the tracers are emitted from the projectile rather than the shooter.
- BFGF_HURTSOURCE — If set, the shooter can be struck by their own projectile's tracers. This only has an effect if BFGF_MISSILEORIGIN is also set.
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