T
Tarte
Guest
Hey! First of all thank you for reading my post. My question is the following :
I'm creating a game maker game (GML) and I want to make a life bar for my character.
Here is the code:
(This is in the character's step and the objects are created at the beginning of the room)
The problem is that when I move my character, the Bar of Life and Mana shifts to the right when I go to the left and to the left when I go to the right.
(the number of pixels that my character is moving forward).
Voila if you have answers I'm interested and I specify that this post has been translated with google translation (yes I'm French and not very good in English) Tanks
I'm creating a game maker game (GML) and I want to make a life bar for my character.
Here is the code:
Code:
/// Quick Bar, Bar of Life and Mana Bar of the Character + Life of the Boss in relation to the camera:
var cx = camera_get_view_x (view_camera [0])
var cy = camera_get_view_y (view_camera [0])
var cw = camera_get_view_width (view_camera [0])
/// Manage the Character Life Bar:
ObjBarreViePlayer.y = cy + 1675
ObjBarreViePlayer.x = (cx + cw / 2) - 2000
/// Management of the Mana Bar of the Character:
ObjBarreManaPlayer.y = cy + 1900
ObjBarreManaPlayer.x = (cx + cw / 2) - 2000
(This is in the character's step and the objects are created at the beginning of the room)
The problem is that when I move my character, the Bar of Life and Mana shifts to the right when I go to the left and to the left when I go to the right.
(the number of pixels that my character is moving forward).
Voila if you have answers I'm interested and I specify that this post has been translated with google translation (yes I'm French and not very good in English) Tanks