Page 1 of 1

Replacing fist weapon

Posted: Sat Nov 17, 2018 10:54 pm
by superscrungus
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.

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

Re: Replacing fist weapon

Posted: Sat Nov 17, 2018 11:43 pm
by wildweasel
Is the player class being defined for the game in a MAPINFO lump? https://zdoom.org/wiki/Creating_new_player_classes

Re: Replacing fist weapon

Posted: Sun Nov 18, 2018 12:15 am
by superscrungus
wildweasel wrote:Is the player class being defined for the game in a MAPINFO lump? https://zdoom.org/wiki/Creating_new_player_classes
Ah, the simplest solutions always evading me. Worked like a charm, thanks for the tip! c: