Code: Select all
ACTOR HammerOfHatred : Weapon 15072
{
//
// The item is a modified Cleric Mace; the settings were
// copied direct from the ZDOOM source code as they were
// not detailed in the WIKI at the time of writing. The graphics
// are heavily-modified Hammer of Retribution sprites.
//
Radius 20
Height 55
Inventory.PickupMessage "You have the Hammer of Hatred!"
Obituary "%o was hammered."
Weapon.SelectionOrder 3500
Weapon.Kickback 150
// Weapon.AmmoType "NULL"
Weapon.AmmoUse 0
Weapon.AmmoGive 0
Weapon.YAdjust -8
+WEAPON.MELEEWEAPON
States
{
Ready:
SHRG A 1 A_WeaponReady
Loop
Deselect:
SHRG A 1 A_Lower
Loop
Select:
SHRG A 1 A_Raise
Loop
Fire:
SHRG B 2
SHRG B 1
SHRG B 2
SHRG C 1
SHRG D 1
SHRG E 1
SHRG E 1 A_CMaceAttack
SHRG F 1
SHRG F 2
SHRG F 1
SHRG F 8
SHRG A 2 A_ReFire
SHRG A 1
SHRG A 2
SHRG A 1
SHRG A 2
SHRG A 1
Goto Ready
Spawn:
SHRA A -1
Stop
}
}
The problem is that A_CMaceAttack is not exposed by DECORATE, for reasons given in this thread; however, it surely should be possible to code most of the Heretic and HeXen weapons from scratch, at least to a reasonable approximation. Of course, this could involve adding extra codepointers or states, or arguments to the existing ones. For example, there could be separate states in melee weapons for "miss entirely" and "hit wall instead of monster", or extra arguments to A_CustomPunch (i.e, "hit", "miss" and "hit a wall" sounds)?
In the meantime, however:
This would handle the "hit wall" thing, but what about hitting a monster? Sorry if these are dumb questions; I'm new to weapon creation and there's a lot of stuff I don't know about yet and therefore don't know to look for it.wildweasel wrote:You can do this by using a special puff, making its DeathSound the "thud" sound, and then putting A_Scream on one of the frames.