Replacing fist weapon
Posted: Sat Nov 17, 2018 10:54 pm
What it says on the tin. Having difficulties replacing the default fist with a new custom fist. Inherited from both the original fist and the DoomPlayer class, but the player won't spawn with it, and just starts with the default fist. Bizarrely, the scripting produced a second fist weapon, so if I use the "give all" command I have a saw, the default fist, and then my modified fist all occupying the same slot.
Here's the code, both for the replacer class and the weapon. Ommitted the States of the player class, since that's all unmodified for now and irrelevant to the problem.
Here's the code, both for the replacer class and the weapon. Ommitted the States of the player class, since that's all unmodified for now and irrelevant to the problem.
Code: Select all
ACTOR Gauntlet : Fist replaces Fist
{
Weapon.SelectionOrder 3700
Weapon.SlotNumber 1
Weapon.SlotPriority 0
Obituary "$OB_MPFIST"
Tag "$TAG_FIST"
States
{
Ready:
PUNG A 1 A_WeaponReady
Loop
Deselect:
PUNG A 1 A_Lower
Loop
Select:
PUNG A 1 A_Raise
Loop
Fire:
PUNG B 1
PUNG C 1 A_Punch
PUNG D 1
PUNG D 0 A_ReFire
Goto Ready
}
}
ACTOR ScrungusPlayer : DoomPlayer replaces DoomPlayer
{
Player.DisplayName "Scrungus"
Player.CrouchSprite "PLYC"
Player.StartItem "Pistol"
Player.StartItem "Gauntlet"
Player.StartItem "Clip", 50