• 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!

GameMaker help!

André Luiz

Member
I want to make the character's life bar follow the camera, but I can't do that,
so i need your help to send me some toturial or write some code that helps me.

here's my camera code:
GML:
{
#region Movimentação da câmera

halfViewwidth = camera_get_view_width(view_camera[0]) / 2;
halfviewHeight = camera_get_view_height(view_camera[0]) / 2;

camera_set_view_pos(view_camera[0], x - halfViewwidth, y - halfviewHeight);


#endregion
}
ps: my object's name is Life_bar_obj
 
Hello !

I think just use a "Draw_GUI" event. It is made to be drawn on top of other draw event and to follow the camera automatically.

Hope it helps :)
 
  • Like
Reactions: Rob
Top