I've been trying to make a health bar for a HUD, and I can't figure out how I would make this work: I have two pictures, one is a black silhouette of a soldier and the other is red silhouette of the same thing. I have it so the black silhouette draws first then the red draws on top. The red is supposed to go down when you lose health. Basically I'm trying to do what the WarZ did with their health bar. Trouble is, I can't just make the red silhouette change height when the player loses health, because it won't cut the image like in WarZ's HUD; it will just get smaller. Does anyone know how I would go about doing this? I thought maybe render.SetScissorRect() but I don't know how I would incorporate that into the red silhouette.
Just for an example here is what I'm talking about:
[thumb]http://i.imgur.com/9r3wEL3.png[/thumb]
Why not just use [url]http://wiki.garrysmod.com/page/surface/DrawTexturedRectUV[/url] ?
[QUOTE=Netheous;40518937]Why not just use [url]http://wiki.garrysmod.com/page/surface/DrawTexturedRectUV[/url] ?[/QUOTE]
ah, I knew there was something for this! Thanks man.
Sorry, you need to Log In to post a reply to this thread.