Custom HUD not animating in Widescreen

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
LanHikariDS
Posts: 179
Joined: Tue Aug 04, 2015 11:30 pm
Location: Playing in the snow

Custom HUD not animating in Widescreen

Post by LanHikariDS »

I'm attempting to add a custom HUD to a project I've been working on, and I've made two duplicates of the same HUD with different horizontal offsets: Normal for 4:3 screens, and Fullscreen for 16:9 screens, and the 4:3 HUD works perfectly fine, but for whatever reason, in the 16:9 HUD if the player has less than 100 health, the health bar completely disappears, until the player reachieves 100 health, disappearing again when hurt.

Code: Select all

statusbar fullscreen, forcescaled
{
	// basic layout
	DrawImage "Thermom", -45, 50;	
	DrawMugshot 5, -53, 167;
	// health and armor bars
	DrawBar "ThermFW", "ThermEW", Health, vertical, interpolate(8), 8, 51;
	DrawNumber 3, DIGIFONT_SMALL, DoomNukemStatusBarGreen, Health, Alignment(left), fillzeros, -30, 154;
	//DrawBar "ArmorFul", "ArmorEmp", Armor, horizontal, interpolate(8), 102, 44;
	DrawNumber 3, DIGIFONT_SMALL, DoomNukemStatusBarGreen, Armor, Alignment(left), fillzeros, -30, 160;
}
statusbar normal, forcescaled
{
	// basic layout
	DrawImage "Thermom", 8, 50;	
	DrawMugshot 5, 0, 167;
	// health and armor bars
	DrawBar "ThermFu", "ThermEm", Health, vertical, interpolate(8), 8, 51;
	DrawNumber 3, DIGIFONT_SMALL, DoomNukemStatusBarGreen, Health, Alignment(left), fillzeros, 23, 154;
	//DrawBar "ArmorFul", "ArmorEmp", Armor, horizontal, interpolate(8), 102, 44;
	DrawNumber 3, DIGIFONT_SMALL, DoomNukemStatusBarGreen, Armor, Alignment(left), fillzeros, 23, 160;
}
Before, I had the same graphics as 4:3 and different offsets in the SBARINFO, but now I'm using different copies of the same graphics, and the "W" copies are offset within the graphics themselves. Both methods produced the same results.

https://imgur.com/a/2rjTO Four screenshots are present here, of the two states of both HUDs
User avatar
LanHikariDS
Posts: 179
Joined: Tue Aug 04, 2015 11:30 pm
Location: Playing in the snow

Re: Custom HUD not animating in Widescreen

Post by LanHikariDS »

Nothing? Nobody?
User avatar
AFADoomer
Posts: 1317
Joined: Tue Jul 15, 2003 4:18 pm

Re: Custom HUD not animating in Widescreen

Post by AFADoomer »

You'll probably need to post at least the HUD portion of your mod. Otherwise people are going to just be guessing at what's wrong... The tiny snippet of SBARINFO that you posted isn't really enough to tell anything.
User avatar
LanHikariDS
Posts: 179
Joined: Tue Aug 04, 2015 11:30 pm
Location: Playing in the snow

Re: Custom HUD not animating in Widescreen

Post by LanHikariDS »

Well, that's the entire SBARINFO, but I'll cut it and upload it
EDIT: https://allfearthesentinel.net/zandronu ... =wwhud.pk3 The HUD in question
User avatar
LanHikariDS
Posts: 179
Joined: Tue Aug 04, 2015 11:30 pm
Location: Playing in the snow

Re: Custom HUD not animating in Widescreen

Post by LanHikariDS »

Huh, odd. I just tested this in ZDoom, and both modes operate fine, but in Zandronum, the 16:9 mode still doesn't work...

Return to “Scripting”