D
Drago the Shinigami
Guest
So, what I'm trying to do is create a "healthbar" that goes across the top of the screen when the player holds the esc button, and when the bar goes all the way across, the game closes.
However, when I test it, there is no healthbar until the game actually closes, when it's full.
Here's my code:
(xit is a variable declared in Variable Definitions, and this is in the 'begin step' event)
However, when I test it, there is no healthbar until the game actually closes, when it's full.
Here's my code:
Code:
draw_healthbar(5, 5, camera_get_view_width(view_camera[0]) - 5, 40, xit, $00FFFFFF & FFFFFF, $FF13C11F & $FFFFFF, $FF0000E5 & $FFFFFF, 0, false, false);
if (keyboard_check(vk_escape))
{
xit += 2;
}
else
{
xit -= 2;
}
if(xit == 100)
{
game_end();
}
if(xit == 0)
{
}