Custom Hud

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
{FcOd}Nemesis
Posts: 90
Joined: Mon Sep 13, 2004 1:47 pm
Location: Dunno
Contact:

Custom Hud

Post 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?
Richard213
Posts: 43
Joined: Sun Dec 05, 2004 1:35 pm

Post by Richard213 »

hmm

theres zillions of way to make a hud which way you want?
User avatar
{FcOd}Nemesis
Posts: 90
Joined: Mon Sep 13, 2004 1:47 pm
Location: Dunno
Contact:

Post 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)
Last edited by {FcOd}Nemesis on Tue Apr 19, 2005 6:01 pm, edited 1 time in total.
Richard213
Posts: 43
Joined: Sun Dec 05, 2004 1:35 pm

Post by Richard213 »

wont be easy i can say that heh
User avatar
Cyrez
Posts: 81
Joined: Tue Jul 15, 2003 4:20 pm
Location: Missouri
Contact:

Post 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:
User avatar
{FcOd}Nemesis
Posts: 90
Joined: Mon Sep 13, 2004 1:47 pm
Location: Dunno
Contact:

Post by {FcOd}Nemesis »

Okay, ive got the things made...now what?
User avatar
Cyrez
Posts: 81
Joined: Tue Jul 15, 2003 4:20 pm
Location: Missouri
Contact:

Post 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.
User avatar
{FcOd}Nemesis
Posts: 90
Joined: Mon Sep 13, 2004 1:47 pm
Location: Dunno
Contact:

Post by {FcOd}Nemesis »

What would i do if i dont want grahics, but i want other things to show up still?
User avatar
Cyrez
Posts: 81
Joined: Tue Jul 15, 2003 4:20 pm
Location: Missouri
Contact:

Post 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.
User avatar
AFADoomer
Posts: 1341
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Post 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...
User avatar
Duducrazy
Posts: 600
Joined: Sat Aug 21, 2004 6:16 pm

Post 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!
User avatar
Siggi
Posts: 3288
Joined: Sun Oct 03, 2004 8:57 am
Preferred Pronouns: They/Them
Location: South Africa

Post 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:
User avatar
AFADoomer
Posts: 1341
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Post by AFADoomer »

Go for it... It's not as neatly coded as I would like, but has a few neat tricks...
Locked

Return to “Editing (Archive)”