A GunAttack

From ECWolf Wiki
Revision as of 22:01, 17 December 2012 by Blzut3 (talk | contribs)

A_GunAttack [(int flags[, string sound[, float snipe[, int maxdamage[, int blocksize[, int pointblank[, int longrange[, int maxrange]]]]]]])]

Performs a standard player attack similar to A_WolfAttack. Deals damage to the closest shootable enemy in front of the player in a 9 degree cone.

  • flags: Modify the behavior of the function.
    • GAF_NOAMMO: This attack does not draw from the weapon's ammo. (New from 1.4)
    • GAF_NORANDOM: Disables random damage calculation.
  • sound: Sound to play for this attack. The default of "*" plays the weapon's attack sound.
  • snipe: Factor to multiply distance calculations by (smaller values are more accurate).
  • maxdamage: The amount of damage the attack does. Maximum of 256 without GAF_NORANDOM.
  • blocksize: Size of a map block. This defaults to 128 to account for the scale of Doom 2's Wolf3D maps.
  • pointblank: Number of blocks for which the damage is done in full. After which the damage is multiplied by 2/3. (Default 2)
  • longrange: Number of blocks after which accuracy is lost. The attack will have a distance/maxrange chance of failing. (Default 4)
  • maxrange: Maximum number of blocks an attack can travel. (Default 21)