Thanks for this tutorial: I've been trying to follow it, but I've hit a problem, namely it fails to draw the HUD.
I'm using Game Maker Studio (Free edition) and have followed most of this tut to the letter, but when I compile it fails to draw both the sprite and the string for the number of lives you have left.
This is my HUD code:
if state == PLAY
{
// Draw HUD
draw_sprite(sPShipIcon, 0, view_xview[0]+300, 226);
draw_text(view_xview[0]+314, 228, string(global.pLives));
}
else if state == GAME_OVER
{
scrCenterText("GAME OVER", view_xview[0], 112, 8, 320);
}
Which is nearly identical to the one in the OP, except that it should place the sprite in the lower right corner, rather than lower left. Even with the exact same coordinates though, it does not execute.
I've downloaded the tutorial.gmx, and that one does run the HUD (exact same code).
Next I took a look at the activate/deactive region, but it's setup exactly the same, and I can't see it conflicting with oGame (as oGame is excluded from deactivating, and as the draw commands falls within the active region coordinates).
Lastly, it might be worth noting that I have two rooms, one boss room and one 'level' room. Both contain the game element, screenscroll is only included in the level room. The HUD does not load in either room. I have no problem loading text and sprites in my title or victory room, both of which feature the exact same type of content as my level and boss room.
I'm probably missing something really simple, but I'm a coding newb so I can't find it.