Ok, i've had game maker for awhile, but I never really wanted to use it. But now i've decided I really want to learn it. So I started with a heart engine, but I don't know how to make the hearts go buy fourths. I can draw a sprite the number of times I need, but i don't know how to make it show the heart in fourths.
in the create event
{
/* Variables for the HUD */
var global.totalhearts = 10;
var global.hearts = 10;
}
in the draw event
{
/* Draw Hearts */
for( i = 0; i < floor( global.totalhearts ); i += 1 )
{
subimg = global.hearts - i;
if( subimg < 0 )
{
subimg = 0;
} else if( subimg > 1 )
{
subimg = 1
}
heartx = view_xview[0] + 5 + (i*25);
draw_sprite( spr_heart_full, subimg, heartx, 1 );
}
}