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