A CustomPlayerMelee: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
m (Minor changes, keyword values)
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''CustomPlayerMelee''' (int ''dmgfactor'', int ''dmgmod'' [, int ''berserk'' [, string ''deflection'' [, string ''soundname'']]])<br>
{{Codepointer |
 
description=CustomPlayerMelee is a parameterized player weapon codepointer. This codepointer allows construction of custom player melee attacks. Two major classes of attacks are possible: punch-style and chainsaw-style, depending on the parameters given. |
==Usage==
usage='''CustomPlayerMelee''' (''dmgfactor'', ''dmgmod'' [, ''berserk'' [, ''deflection'' [, ''soundname''[, ''range''[, ''pufftype'']]]]]) |
 
parameters=*''dmgfactor'': Damage factor. Damage formula is: dmgfactor * ((rnd%dmgmod) + 1)
CustomPlayerMelee is a parameterized player weapon codepointer. This codepointer allows construction of custom player melee attacks. Two major classes of attacks are possible: punch-style and chainsaw-style, depending on the parameters given.
*''dmgmod'': Damage modulus. (Clamped into range of 1 to 256)
 
*''berserk'': Berserk multiplier. (Default 0, x*damage when player is berserk)
Note that the Berserk multiplier can be applied to any attack, but that if it is 0, you will do zero damage when berserk! The Berserk multiplier should be 1 when no berserk bonus is desired.
*''deflection'': Select angle deflection type. (Default '''None''')
 
**'''none''' = None
===Parameters===
**'''punch''' = Punch-style deflection (player will face object)
 
**'''chainsaw''' = Chainsaw-style deflection (player will face object and be wiggled around)
*dmgfactor: Damage factor. Damage formula is: dmgfactor * ((rnd%dmgmod) + 1)
*''soundname'': The "nice name" of the sound to play.  See [[sound|the sound EDF block]] for how to define this.  
*dmgmod: Damage modulus. (Clamped into range of 1 to 256)
*''range'': The range of fire, as a floating-point value. Default: 64.0.
*berserk: Berserk multiplier. (Default 0, x*damage when player is berserk)
*''pufftype'': name of [[EDF]] [[pufftype]] to spawn when hitting walls. Default is the one designated for the current game.|
*deflection: Select angle deflection type. (Default None)
examples=
**'none' = None
<code>A_CustomPlayerMelee(2, 10, 10, punch, punch, BulletPuff)</code>|
**'punch' = Punch-style deflection (player will face object)
notes=The Berserk multiplier can be applied to any attack, but that if it is 0, you will do zero damage when berserk! The Berserk multiplier should be 1 when no berserk bonus is desired. |
**'chainsaw' = Chainsaw-style deflection (player will face object and be wiggled around)
seealso=
*soundname: The "nice name" of the sound to play.  See [[ESOUNDS]] for how to define this.
*[[FireCustomBullets]]
 
*[[FirePlayerMissile]]
[[Category:Codepointers]]
*[[List_of_codepointers#Attacks|Player attack codepointers]]}}

Latest revision as of 15:38, 7 April 2020

Description

CustomPlayerMelee is a parameterized player weapon codepointer. This codepointer allows construction of custom player melee attacks. Two major classes of attacks are possible: punch-style and chainsaw-style, depending on the parameters given.

Usage

CustomPlayerMelee (dmgfactor, dmgmod [, berserk [, deflection [, soundname[, range[, pufftype]]]]])

Parameters

  • dmgfactor: Damage factor. Damage formula is: dmgfactor * ((rnd%dmgmod) + 1)
  • dmgmod: Damage modulus. (Clamped into range of 1 to 256)
  • berserk: Berserk multiplier. (Default 0, x*damage when player is berserk)
  • deflection: Select angle deflection type. (Default None)
    • none = None
    • punch = Punch-style deflection (player will face object)
    • chainsaw = Chainsaw-style deflection (player will face object and be wiggled around)
  • soundname: The "nice name" of the sound to play. See the sound EDF block for how to define this.
  • range: The range of fire, as a floating-point value. Default: 64.0.
  • pufftype: name of EDF pufftype to spawn when hitting walls. Default is the one designated for the current game.

Examples

A_CustomPlayerMelee(2, 10, 10, punch, punch, BulletPuff)

Notes

The Berserk multiplier can be applied to any attack, but that if it is 0, you will do zero damage when berserk! The Berserk multiplier should be 1 when no berserk bonus is desired.

See also