Use inkey to do this. To display the text, you need a text object. Look these up in the manual. If the health bar moves around on the screen, you can set the position of the text object to be relative to the health bar like this:

player_name.pos_x = healthbar.pos_x; // same X position
player_name.pos_y = healthbar.pos_y + 96; // 96 pixels below the health bar - adjust as needed


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials