From ZDoom Wiki
A_Saw [(string fullsound [, string hitsound [, int damage [, string pufftype[, int flags[, float range[, float spread_xy[, float spread_z[, float lifesteal]]]]]]]])]
- 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".
- flags: The following flags can be combined by using the | character between the constant names:
- SF_NORANDOM — No random: Disables damage randomization.
- SF_RANDOMLIGHTMISS — Random light on miss: Adds a 25% chance to toggle lighting if no target is hit.
- SF_RANDOMLIGHTHIT — Random light on hit: Randomly changes light on hit, like A_GauntletAttack (25% 0, 37.5% 1, 37.5% 2).
- SF_RANDOMLIGHTBOTH — Random light on both: The two above flags combined, works like A_GauntletAttack.
- SF_NOUSEAMMOMISS — No ammo use on miss: Do not use ammo if nothing hit.
- SF_NOUSEAMMO — No ammo use: Do not use ammo.
- range: The maximum range of the attack. The default value is 65.
- spread_xy: Maximum angle of random horizontal spread. Defaults to 2.8125.
- spread_z: Maximum angle of random vertical spread. Defaults to 0.
- lifesteal: If positive, this value is used as a factor for giving back the inflicted damage as hit points to the actor using the calling weapon.
This example is taken from Doom's Chainsaw weapon.
Fire: SAWG AB 4 A_Saw SAWG B 0 A_ReFire goto Ready