• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML Keep text inside viewport help!

B

BBTP

Guest
Currently I have drawn text one scree via this code:
{
draw_text(45,y, "Level: "+string(global.level));
draw_text(45,y+16 ,"HP: "+string(global.hp)+"/"+string(global.maxhp));
draw_text(45,y+32 ,"EXP: "+string(global.expr)+"/"+string(global.maxexpr));
if global.hp > global.maxhp {global.hp=global.maxhp}
x= view_xview[0]
y= view_yview[0] + 250;
}



When I go off to the side it no longer appears on the screen, how can I 'lock' it into the viewport so It's always on screen?
 
Top