SetHudSize()

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.

SetHudSize()

Postby LilWhiteMouse » Fri Dec 12, 2003 5:29 pm

How exactly do you manipulate the values for SetHudSize() and Hudmessage()? I have an icon, MANAI, 15x13, offsets set to 0x0. My video mode is set to 640x400. I use the following ACS:
Code: Select allExpand view
script 48 ENTER {
sethudsize(640,400,1);
SetFont("MANAI");
while (1)
   {
hudmessage (s:"A";0,0,-1,623.1,355.1,1.0);
delay (const:35);
   }
}

But my icon doesn't appear. I have to reduce the HudMessage()'s Y value to < 240.1 to get it on the screen.

This is where the icon ends up when I "center" it at 320x200:
Image
Last edited by LilWhiteMouse on Fri Dec 12, 2003 5:47 pm, edited 1 time in total.
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Nanami » Fri Dec 12, 2003 5:31 pm

Out of curiosity, why do you have a loop there? If you set the time to 0.0 it'll stay forever, and you won't need a loop.

I'm sorry I can't help with the other problem. I haven't messed with SetHudSize much yet.
User avatar
Nanami
Natdhipytadd
 
Joined: 15 Jul 2003
Location: That little island pritch created.

Postby LilWhiteMouse » Fri Dec 12, 2003 5:39 pm

Nanami wrote:Out of curiosity, why do you have a loop there? If you set the time to 0.0 it'll stay forever, and you won't need a loop.


When it wouldn't display, I setup a script to adjust the value through the console. The loop was to reflect the new values.
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Nanami » Fri Dec 12, 2003 7:01 pm

Ooh, adding a new mana type, I like it.
User avatar
Nanami
Natdhipytadd
 
Joined: 15 Jul 2003
Location: That little island pritch created.

Postby LilWhiteMouse » Fri Dec 12, 2003 10:37 pm

I've tried various hud sizes, and I get the same results. Setting the coordinates for the center of the specified hud places it about 3/4 the way down the screen instead. I ran through a couple different video modes, images, even the default font, with consistant below center locations. Is this a bug?
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Ty Halderman » Sat Dec 13, 2003 5:18 am

I use this in Daedalus:
Code: Select allExpand view
(in a loop on ijk)
         sethudsize(640,400,1);
         setfont (asGun1[ijk]);
         hudmessage (s:"A";HUDMSG_PLAIN, 900, CR_UNTRANSLATED, 360.0, 300.0, 1);

It appears at the bottom with a 143-high graphic, intentionally cut off a bit at the bottom, and a bit to the right of center.

I noticed you end your hudmessage() call with 1.0 instead of 1. Maybe I should wonder why mine doesn't have problems :oops:

[edit]Check your arguments--I think you're one short.[/edit]
User avatar
Ty Halderman
I'm free! ...or at least inexpensive.
... in loving memory ...
 
Joined: 17 Jul 2003
Location: New Orleans LA

Postby LilWhiteMouse » Sat Dec 13, 2003 6:58 am

What argument am I missing? From my notes:
Code: Select allExpand view
hudmessage (text; int type, int id, int color, fixed x, fixed y, fixed holdTime, ...);

Messages types other than 0 also take additional parameters.


Using your ACS, only replacing your setfont() with setfont("ETTNA1"), the ettin appeared half clipped off the bottom of the screen. It's only ~70 pixels high, so shouldn't it have appeared fully on the screen?
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Ty Halderman » Sat Dec 13, 2003 8:07 am

Sorry, you're fine on args. Periods and commas are way too hard to discern in code mode :(

ETTNA1 is a sprite, I assume, and mine are textures. I don't know if that matters or if there's a y-offset as a result? I agree that a shorter texture shouldn't have been clipped. Try it with SHAWN2 or something and see if you get the same cutoff with a texture instead of a sprite.
User avatar
Ty Halderman
I'm free! ...or at least inexpensive.
... in loving memory ...
 
Joined: 17 Jul 2003
Location: New Orleans LA

Postby LilWhiteMouse » Sat Dec 13, 2003 8:23 am

Using this:
Code: Select allExpand view
sethudsize(640,400,1);
setfont ("w_359");
hudmessage (s:"A";HUDMSG_PLAIN, 900, CR_UNTRANSLATED, 360.0, 300.0, 1);

W_359, which is a 64x64 patch, is half clipped off the screen. Using the texture name FORPUZ1 didn't even display.
User avatar
LilWhiteMouse
"Stop the world, I'm getting off."
 
Joined: 15 Jul 2003
Location: Maine, US

Postby Ty Halderman » Sat Dec 13, 2003 8:27 am

Well, I have 2 things to say:
- I think it might be buggy unless Randy can explain it
- I hope fixing it doesn't break Daedalus :(
User avatar
Ty Halderman
I'm free! ...or at least inexpensive.
... in loving memory ...
 
Joined: 17 Jul 2003
Location: New Orleans LA

Postby Lexus Alyus » Sun Dec 14, 2003 4:28 am

Does this meanb that you don't have to use imagetool? If so, then how do I set up my graphic to be used with hudmessage as a font?

Also, I was having problems with my mission console... I set the allignment right in 800x600 res, but it goes off in other resolutions, what are the commanbds for the "sethudsize"? And how do you use it?

:twisted:
User avatar
Lexus Alyus
One day, I may actually release something...
 
Joined: 15 Jul 2003
Location: Nottingham, UK

Postby Ty Halderman » Sun Dec 14, 2003 8:07 am

Lexus: You can specify a graphic name in setfont().
RH-log.txt June 30, 2003 wrote: - Added the ability for the SetFont ACS command to load normal pictures as
fonts. When used this way, it creates a new font with only the letter A
defined, and the letter A is drawn as whatever the picture is. This
effectively allows you to use HudMessage like a HudPic command. The
drawback to this method is that you cannot use any color translations, as
you can with real fonts.

Documentation on sethudsize is in the Sept. 25th update.

Don't you read that file? It's the closest thing to docs there are for new features.
User avatar
Ty Halderman
I'm free! ...or at least inexpensive.
... in loving memory ...
 
Joined: 17 Jul 2003
Location: New Orleans LA


Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 2 guests