• How to make a HUD with an image?
    10 replies, posted
Well hello there, I wondered something... How would I be able to make a hud with an image. And keep it centered on the bottom of the screen? The image my friend made for it: [url]http://img407.imageshack.us/img407/1295/hudgmodairsoft23.png[/url] And with VMF texture file, is it possible to keep transparency? If so how? Thank you.
Get VTFEdit and turn the image into a .vtf file, and make a .vmt for it, then use the surface functions in lua to draw it at the bottom of the screen.
Is there any easy way to make a hud? 'cause I have hard time placing everything at their place.
That's what you have to do with a HUD.
I got it to work, it look pretty neat, but the image I used is pretty much transparent, the alpha channel I made isn't supposed to do that. Tho I'll find a way to fix that.
[QUOTE=WolvesSoulZ;21164190]I got it to work, it look pretty neat, but the image I used is pretty much transparent, the alpha channel I made isn't supposed to do that. Tho I'll find a way to fix that.[/QUOTE] So then what are you asking?
I needed help about how to put a image as the hud... That guy who told me the surface function helped me. Now the only thing I have is that the hud is pretty damn transparent. [URL]http://img153.imageshack.us/img153/6471/55283520.png[/URL] vs [URL="http://img407.imageshack.us/img407/1295/hudgmodairsoft23.png"]http://img407.imageshack.us/img407/1295/hudgmodairsoft23.png [/URL] Edit:Apparently it only does it in my map... Why? [URL="http://img407.imageshack.us/img407/1295/hudgmodairsoft23.png"][/URL]
Show us the .vmt, you probbably messed it up there
[QUOTE]"UnlitGeneric" { "$basetexture" "hud/hud2" "$translucent" "1" "$translucency" "1" "$ignorez" "1" } [/QUOTE] Here's the vmt
Looks good, no idea why that happens
I tested it on gm_construct, and it work as intended, but in my map it's transparent... No idea why tho.
Sorry, you need to Log In to post a reply to this thread.