Page 1 of 1

Replacing doomplayer doesnt work?

Posted: Fri Nov 01, 2024 10:29 pm
by PartiallyInvisible
I have no idea what im doing wrong, im using zscript, this is my code:

Code: Select all

class newplayer : Doomplayer Replaces DoomPlayer
{
	Default
	{
	Player.StartItem "Clip", 100;
	}
    States
	{
	Death:
	PLAY H 10 A_SkullPop("PlayerHead");
	PLAY I 10 A_PlayerScream;
	PLAY J 10 A_NoBlocking;
	PLAY KLM 10;
	PLAY N -1;
		Stop;
    }		
		
class PlayerHead : PlayerChunk
{
	Default
	{
		Radius 4;
		Height 4;
		Gravity 0.125;
		+NOBLOCKMAP
		+DROPOFF
		+CANNOTPUSH
		+SKYEXPLODE
		+NOBLOCKMONST
		+NOSKIN
	}
	States
	{
	Spawn:
		PHED A 0;
		PHED ABCDEFGHI 5 A_CheckFloor("Hit");
		Goto Spawn+1;
	Hit:
		PHED J 16 A_CheckPlayerDone;
		Wait;
	}
}

Re: Replacing doomplayer doesnt work?

Posted: Sat Nov 02, 2024 2:22 am
by Blue Shadow
Player pawns cannot be replaced with the replaces keyword like any other actor. To replace them, use MAPINFO:

Code: Select all

gameinfo
{
	PlayerClasses = "newplayer"
}

Re: Replacing doomplayer doesnt work?

Posted: Sat Nov 02, 2024 9:03 am
by PartiallyInvisible
Blue Shadow wrote: Sat Nov 02, 2024 2:22 am Player pawns cannot be replaced with the replaces keyword like any other actor. To replace them, use MAPINFO:

Code: Select all

gameinfo
{
	PlayerClasses = "newplayer"
}
Wow, I cant believe that i didnt know that beforehand. Thanks!