GML Keep drawn text on screen

B

BBTP

Guest
I am currently designing a game and I have viewports turned on as well as text drawn onto the screen but the text does not stay and follow the viewport. How can I fix this?

Code for my drawn text:
{
draw_text(x,y, "Level: "+string(global.level));
draw_text(x,y+16 ,"HP: "+string(global.hp)+"/"+string(global.maxhp));
draw_text(x,y+32 ,"EXP: "+string(global.expr)+"/"+string(global.maxexpr));
if global.hp > global.maxhp {global.hp=global.maxhp}
}
 

Rob

Member
If you want text to be drawn at a specific point relative to the screen regardless of where the view is in the room, use draw_gui.

The top left of the screen is always 0,0 in draw_gui
 
Top