Difference between revisions of "A GunAttack"

From ECWolf Wiki
m
m
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
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.
 
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.
 
* ''flags'': Modify the behavior of the function.
** '''GAF_NOAMMO''': This attack does not draw from the weapon's ammo. {{Hg|d5f71f22e5e2b05c38d6904a3b63c3338dc36309|1.1}}
+
** '''GAF_NOAMMO''': This attack does not draw from the weapon's ammo.
** '''GAF_NORANDOM''': Disables random damage calculation. (Note that this is '''WAF_NORANDOM''' in 1.0.)
+
** '''GAF_NORANDOM''': Disables random damage calculation.
 
* ''sound'': Sound to play for this attack.  The default of "*" plays the weapon's attack sound.
 
* ''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).
 
* ''snipe'': Factor to multiply distance calculations by (smaller values are more accurate).

Latest revision as of 08:51, 12 June 2013

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.
    • 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)