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

draw_sprite_stretched problem

Hello! I'm trying to make a custom healthbar for my rpg character but when the energy or health drops down, it stretches outside the border.
I use this script for both:
draw_sprite(sBarEmpty,0,view_xport[0]+32,view_yport[0]+12);
draw_sprite_stretched(sBarEnergy,0,view_xport[0]+32,view_yport[0]+12,(energy/energyMax)*45,16);

As you can see in the image, above there is the healthbar and below is the energy bar which is stretching outside the border length
 

Attachments

BB Scary

Member
Check, origin in sprite stretched in image editor. I dont see your code for healt. Check if health is not in negative value.
 
Top