A_M_Saw

From ZDoom Wiki
Jump to navigation Jump to search

A_M_Saw [(string fullsound [, string hitsound [, int damage [, string pufftype]]])]


A chainsaw attack available to monsters. For weapons, use A_Saw.

Parameters

  • fullsound: The sound that plays if the attack doesn't hit anything. Defaults to "weapons/sawfull".
  • hitsound: The sound that plays if the weapon hits a target. Defaults to "weapons/sawhit".
  • damage: The amount of damage to deal, with the following calculation:
if (damage == 0) damage = 2;
damage *= (random() % 10 + 1);
For example, if damage is 5, the damage dealt will be between 5 and 50. Note that it is not possible to have this function deal 0 damage, since 0 means "use the default value" which is 2.
  • pufftype: The puff to spawn if the attack hits a wall or invulnerable actor. Defaults to "BulletPuff".

Examples

This example uses a Marine that uses his chainsaw up close.

 Melee:
   PLAY E 4 
   PLAY E 4 A_M_Saw
   PLAY E 0 A_JumpIfCloser(40, "Melee")
   goto See