Punch: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
m (Edit to fix up damage formula formatting.)
(added example)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Punch''' is a player weapon codepointer. This codepointer implements the DOOM player's fist attack. The punch attack is a melee-range tracer attack fired at the player's angle plus or minus a random angle between 0 and 5 degrees. If an object is hit by the attack, the player will emit the '''punch''' sound effect and turn toward the target. Damage done by the punch attack is given by this formula:
{{Codepointer |
description=Punch is a player weapon codepointer. This codepointer implements the DOOM player's fist attack. |
usage='''Punch'''|
parameters=None.|
examples=
{{example | description=From base\frames.edf | code=<nowiki>frame S_PUNCH2    { cmp = "PUNG|2|*|4|Punch      |@next";  dehackednum = 6 }</nowiki> }}|
notes=The punch attack is a melee-range tracer attack fired at the player's angle plus or minus a random angle between 0 and 5 degrees. If an object is hit by the attack, the player will emit the '''punch''' sound effect and turn toward the target. Damage done by the punch attack is given by this formula:


  damage = (random % 10 + 1) * 2
  damage = (random % 10 + 1) * 2


When the player is berserk, the damage value obtained from this formula is multiplied by 10.
When the player is berserk, the damage value obtained from this formula is multiplied by 10.
 
|
seealso=*[[CustomPlayerMelee]]
*[[List_of_codepointers#Attacks|Player attack codepointers]]
}}
[[Category:Codepointers]]
[[Category:Codepointers]]

Latest revision as of 16:54, 6 May 2011

Description

Punch is a player weapon codepointer. This codepointer implements the DOOM player's fist attack.

Usage

Punch

Parameters

None.

Examples

From base\frames.edf

frame S_PUNCH2    { cmp = "PUNG|2|*|4|Punch      |@next";   dehackednum = 6 }

Notes

The punch attack is a melee-range tracer attack fired at the player's angle plus or minus a random angle between 0 and 5 degrees. If an object is hit by the attack, the player will emit the punch sound effect and turn toward the target. Damage done by the punch attack is given by this formula:

damage = (random % 10 + 1) * 2

When the player is berserk, the damage value obtained from this formula is multiplied by 10.

See also