WeaponMeleeAttack
From Eternity Wiki
Jump to navigationJump to search
Description
Generic weapon melee attack, from MBF21.
Usage
A_WeaponMeleeAttack(baseDamage, randomMultiplier, berserkMultiplier, hitSound, range)
Parameters
- baseDamage: base damage of attack; if not set, defaults to 2
- randomMultiplier: attack damage random multiplier; if not set, defaults to 10
- berserkMultiplier: berserk damage multiplier; if not set, defaults to 1.0
- hitSound: sound index to play if attack hits
- range attack range; if not set, defaults to player mobj's melee range property
Examples
This is an example for a "plasma lance" which deals damage and noise like the plasma shot (5-40) at double range, but only has 2x berserk multiplication (because it is farther from the berserker's body).
Fire: LANC B 4 LANC C 4 A_WeaponMeleeAttack(5, 8, 2.0, "firxpl", 128.0) LANC D 5 LANC C 4 LANC B 5 A_ReFire goto Ready
Notes
This is the MBF21 standard implementation equivalent of CustomPlayerMelee. Check that function too for feature comparison.