Man, I love ya so much, I'm pretty happy to see that you keep teaching other people about GameMaker and programing in general, thanks for all you do for us.
Dis game is starting to look rly good btw is it possible to put the code in obj_hud in obj_skeleton that way instead of having to type o_skeleton.hp we can just type hp
Nice video. I have a question, is there a specific reason, why you use the draw_rectangle_color function instead of the draw_healthbar function? The second have a few more options to customize the healthbar. Have a nice day everybody.
Hi i injoy your videos I am really bad at pixel art could I use the sprite layout “the RPG Game” but change the colors and the details and put your name in the credits and give you that I used the layout and what changes? Oh thanks on helping me I bought your rpg and tile sets keep up your work
Does anyone have any suggestions for an equally smooth health regen? I can get it to refill using certain conditions (eg. not moving + button press) but it's an instantaneous refill rather than something that takes several steps to complete. Alarms have zero effect, however - I think maybe because of the lerp function...? I'm not quite sure.
I'm new to this, but maybe you can make a jump state, check if input.jump is pressed, and then, if it is pressed, inside your jump state use script to change sprite to jump sprite, And then check, if your animation is between frames when your character should be going up and set its speed on y-axis, Then check if animation is between Frames your character should be going down, and if it is, change its speed on y-axis to go down, after this, check if animation has ended, and if it is, change state to move. Well, I hope it helps, but I haven't tested it, and probably there is million better ways to do this. As I said, I'm new to this, so sorry if it doesn't work. PS: sorry for my English :p PS2:I just thought, you should make sure that your character is going down the same distance as he does while going up, this will prevent changes in character's orginal position
Create in oHud var camera_id = view_camera[0]; var view_width = camera_get_view_width(camera_id); var view_height = camera_get_view_height(camera_id); display_set_gui_size(view_width, view_height); Draw Gui in oHud if not instance_exists(Player) exit; var hp_percent = (Player.hp / Player.max_hp) * 100; draw_healthbar(8, 8, 500, 20, hp_percent, c_black, c_red, c_lime, 0, true, true); .........easy health bar code for 1920x1080p game.
Man, I love ya so much, I'm pretty happy to see that you keep teaching other people about GameMaker and programing in general, thanks for all you do for us.
Best GMS2 tutorial I've seen so far, at least when it comes to using scripts. Can't wait for next one :)
Hey! Thank you for the tutorials, I hope the next episode will come soon! :D
Awesome lesson!
Wow thats awesome! Helped a lot! Thank you :D
Keep it up!
Dis game is starting to look rly good
btw is it possible to put the code in obj_hud in obj_skeleton that way instead of having to type o_skeleton.hp we can just type hp
Yes however it would be probably considered bad practice to do something like that. Makes it more confusing when going back to your code later
Nice video. I have a question, is there a specific reason, why you use the draw_rectangle_color function instead of the draw_healthbar function? The second have a few more options to customize the healthbar.
Have a nice day everybody.
Hi i injoy your videos I am really bad at pixel art could I use the sprite layout “the RPG Game” but change the colors and the details and put your name in the credits and give you that I used the layout and what changes? Oh thanks on helping me I bought your rpg and tile sets keep up your work
Is there a reason you use draw_rectangle_colour instead of draw_healthbar?
Does anyone have any suggestions for an equally smooth health regen? I can get it to refill using certain conditions (eg. not moving + button press) but it's an instantaneous refill rather than something that takes several steps to complete. Alarms have zero effect, however - I think maybe because of the lerp function...? I'm not quite sure.
Hey! Does anyone how I would be able to implement a jump mechanic I’ve been trying to figure it out but I’m stumped.
I'm new to this, but maybe you can make a jump state, check if input.jump is pressed, and then, if it is pressed, inside your jump state use script to change sprite to jump sprite,
And then check, if your animation is between frames when your character should be going up and set its speed on y-axis,
Then check if animation is between
Frames your character should be going down, and if it is, change its speed on y-axis to go down, after this, check if animation has ended, and if it is, change state to move.
Well, I hope it helps, but I haven't tested it, and probably there is million better ways to do this. As I said, I'm new to this, so sorry if it doesn't work.
PS: sorry for my English :p
PS2:I just thought, you should make sure that your character is going down the same distance as he does while going up, this will prevent changes in character's orginal position
Thank you so much for the reply! I will try this tonight and let you know if I can get it work.
Create in oHud
var camera_id = view_camera[0];
var view_width = camera_get_view_width(camera_id);
var view_height = camera_get_view_height(camera_id);
display_set_gui_size(view_width, view_height);
Draw Gui in oHud
if not instance_exists(Player) exit;
var hp_percent = (Player.hp / Player.max_hp) * 100;
draw_healthbar(8, 8, 500, 20, hp_percent, c_black, c_red, c_lime, 0, true, true); .........easy health bar code for 1920x1080p game.
health bar is juicy