The VG Resource

Full Version: I need Game Maker help thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Need help on Game Maker? Ask here folks!

How do I make a "drainable" hp bar that drains as hp goes down say for PACMAN please? Thank you.
Isn't this what the Game Maker Community is for... ?
True but no luck their yet. However I got an idea for my hp bar thing though.
Oh, I'm sorry. That's probably where you'll get all your answers though.
Quote:Isn't this what the Game Maker Community is for... ?
If they're anything like they were back when I went there, they'd all say RTFM and laugh at him.

Aaaaanyways~

You need to make an HP variable, and a max HP variable...

then;

draw_set_color(cl_black)
draw_rectangle(x,y,x+102,y+18,false)
draw_set_color(cl_green)
draw_rectangle(x+1,y+1,x+(max_hp/hp)*100,y+16,false)

in draw event. If you need a more elaborate demonstration, I'll write an example after work. Hope it helps Cute