Player Class Based HUD Alternations (need help please)

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Reilsss
Posts: 184
Joined: Thu Mar 06, 2008 1:38 am
Location: Germany
Contact:

Player Class Based HUD Alternations (need help please)

Post by Reilsss »

Hello all,
I readed the Wiki about SBARINFO, so I want to try to draw a grpahic (latter whole display) that only appear when you choose a self made player class.

So far ZDoom is stuborn and keeps telling me that it do not know my playerclass. So i tryed research and this what I found:
ZDoom Wiki entires about SBARINFO says wrote: PlayerClass <classname> [, <classname2> [, <classname3>]]

Executes the following sub block only if the player is one of the specified classes (represented by their display name).
I also found on the forum this information by Osiris
Osiris wrote:No, it's used as a subblock within the HUD code. Just as an example:

Code: Select all

statusbar fullscreen
{
	PlayerClass DoomPlayerClass
	{
		drawnumber 2, HUDFONT_DOOM, red, frags, 276, 1;
                drawimage "MEDIA0", 20, 196;
		drawnumber 3, HUDFONT_DOOM, red, health, 80, 180;
		drawimage armoricon, 20, 172;
		drawnumber 3, HUDFONT_DOOM, red, armor, 80, 156;
		drawimage ammoicon1, 306, 196;
		drawnumber 3, HUDFONT_DOOM, red, ammo1, 295, 180;
		drawimage ammoicon2, 306, 172;
		drawnumber 3, HUDFONT_DOOM, red, ammo2, 295, 156;
	}
}
I can't exactly test it since I'm at work, but I believe that a HUD I was making worked liked that.
So here what I tryed:
First of all the nessery Informations from my new Player class:

Code: Select all

ACTOR AEoDPlayer3 : PlayerPawn //DoomPlayer 
{ 
		// Basic Information
  	Player.DisplayName "ARCANUM SIDHE" 		//Name of the chracter
  	player.soundclass AEODPL10S			//Sound class of chracter
...
And here is the SBARINFO Code I try so far to make a grpahic appearing when I play the above playerclass

Code: Select all

statusbar None, forcescaled
{
	//------------------------------------------
	// ARCANUM SIDHE, SIRENS, SJNUM - Ichor
	//------------------------------------------
	PlayerClass "ARCANUM SIDHE"
	{
		drawimage "NEWSBAR", 0, 0;
	}
}
As far I understand, is my close to what Osiris posted here on the forum. And the Doomwiki says that I need to define my playerclass by its display name, The Displayname is "ARCANUM SIDHE" as you see above. But ZDoom gives me follow error message when I try to run the game with my new HUD

Code: Select all

Execution could not continue.

Script error, "AEoD_HUD.wad:SBARINFO" line 16:
Expected '}' but got string constant "ARCANUM SIDHE" instead.
When I now change the class name to AEoDPlayer3 I get follow error message:

Code: Select all

Execution could not continue.

Script error, "AEoD_HUD.wad:SBARINFO" line 16:
Unkown PlayerClass 'AEoDPlayer3'.
I also checked the order in that I load my wad files. I first load the Wad file with my new player class, then on the end of -file I load the WAD with my new HUD, so ZDoom should by this time already know the new player class.

Does anybody know something how to get this work ?
I would be very thankful if somebody could give me a hint, sinces I'm currently out of my ideas for this thing.
User avatar
Skippy
Posts: 695
Joined: Sun Nov 20, 2005 9:57 am
Location: Belfast, NI

Re: Player Class Based HUD Alternations (need help please)

Post by Skippy »

As per [wiki=Creating_new_player_classes]the Wiki article[/wiki], you need to add the class to the game in a [wiki]KEYCONF[/wiki] lump too. It failed initially because the class display name can not contain spaces. :|
Blzut3
 
 
Posts: 3213
Joined: Wed Nov 24, 2004 12:59 pm
Operating System Version (Optional): Kubuntu
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: Player Class Based HUD Alternations (need help please)

Post by Blzut3 »

SBARINFO does not agree with spaces in the display name. This is an error caused by something that seemed like a good idea at the time. I won't change this until Randy gets a new release out as it is technically not a bug.
User avatar
Reilsss
Posts: 184
Joined: Thu Mar 06, 2008 1:38 am
Location: Germany
Contact:

Re: Player Class Based HUD Alternations (need help please)

Post by Reilsss »

So I try to replace the space in the name with a _ and then it could work when I correct the keydef and everything else as well?

I guess i give this a try. it sounds logical, Thakns for the hints I give it a run!
Locked

Return to “Editing (Archive)”