Difference between revisions of "A GunAttack"

From ECWolf Wiki
m
m
 
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. {{new}}
+
** '''GAF_NOAMMO''': This attack does not draw from the weapon's ammo.
 
** '''GAF_NORANDOM''': Disables random damage calculation.
 
** '''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.

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)