Page 1 of 1

Custom Hud

Posted: Tue Apr 19, 2005 5:44 pm
by {FcOd}Nemesis
How in the world do you get a custom hud to work? I know you need to do billions of zillions of ACS scripting, but could someone help plz?

Posted: Tue Apr 19, 2005 5:50 pm
by Richard213
hmm

theres zillions of way to make a hud which way you want?

Posted: Tue Apr 19, 2005 5:51 pm
by {FcOd}Nemesis
Ill do a quick sketch in paint ;) then post it here

Edit:
Image

Thats the basic layout, obviously not what i want it to look like :roll: I want the HP and Armor to be bar like things. I want a picture of the current weapon to show up on right, and avalible weapons on left (or maybe level stats/info)

Posted: Tue Apr 19, 2005 6:01 pm
by Richard213
wont be easy i can say that heh

Posted: Tue Apr 19, 2005 6:17 pm
by Cyrez
This subject realy needs to be added to the wiki :?

a custom hud is a long and teadious process. even worse so if your not up on yor ACS scripting. as far as i no there are no tutorials on how to do this. and i'm not good at writing them but i will try to explain as best i can.

we will go in steps here.

Step one, Create a graphic or graphics you want to use for the HUD.
Keep inmind the size of the avrage users screen EG 640X480 or 800X600
this is important because i can tell you that a 1024X768 HUD graphic does not scale down well. once this is done post back and i'll continue :wink:

Posted: Tue Apr 19, 2005 7:00 pm
by {FcOd}Nemesis
Okay, ive got the things made...now what?

Posted: Tue Apr 19, 2005 7:25 pm
by Cyrez
Step 2

Load all the graphics you just made into your wad file.
make note of each graphics name as you will need them in the ACS script.

Next for the ACS
if you use doombuilder open map01 of your wad select scripts then edit behavure lump

to display the new HUD bar you use somthing like this

Code: Select all

Script 1 enter
{
        sethudsize (800, 600, 1); // this is (width, highth, cover stat bar 0 for no 1 for yes)
        SetFont("HUD image name"); // replace Hud image name with the name of your hud graphic.
        hudmessage (s: "a";HUDMSG_PLAIN,1000,CR_UNTRANSLATED,400.1,550.1,0.0); // 400.1 and 550.1 will very depending on the hudsize
}
now compile and save.
NOTE in most cases setting 400.1 to half the sethudsize width and the 550.1 to the full highth - how many pixels tall the image is will work first time.

Posted: Tue Apr 19, 2005 7:46 pm
by {FcOd}Nemesis
What would i do if i dont want grahics, but i want other things to show up still?

Posted: Tue Apr 19, 2005 9:24 pm
by Cyrez
{FcOd}Nemesis wrote:What would i do if i dont want grahics, but i want other things to show up still?
Please explain what you mean?
i need to no what you want displayed and how you want it displayed.

Posted: Thu Apr 21, 2005 7:04 pm
by AFADoomer
Demo .wad of complex hud (script code included):
http://65.190.172.84/files/alpha_hud.zip

It's overly complex in some places, but I tried to comment a lot...

Posted: Fri Apr 22, 2005 4:15 pm
by Duducrazy
AFADoomer wrote:Demo .wad of complex hud (script code included):
http://65.190.172.84/files/alpha_hud.zip

It's overly complex in some places, but I tried to comment a lot...
Cool hud! i liked it a lot! good work!

Posted: Fri Apr 22, 2005 4:19 pm
by Siggi
I was wondering where that alpha hud was hiding,,, I was looking for it at one stage,,, very nice. I shall tear it apart and steal its secrets shortly :twisted:

Posted: Fri Apr 22, 2005 5:11 pm
by AFADoomer
Go for it... It's not as neatly coded as I would like, but has a few neat tricks...