• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

Legacy GM GMS Object intensity

J

Jamonnin

Guest
I'm trying to find an easy way to reflect damage visually. The easiest way seems to be subtracting from the intensity value, but I can't figure out how to do this through GML. Any and all help is appreciated! :)

 
J

Jamonnin

Guest
Got it working perfectly thank you both. Just draw self through the drag/drop then draw with this code:

draw_sprite_ext(sprite_index, -1, x, y, 1, 1, image_angle, c_black, 1 - (myhp / 100));

draw's the same sprite mixed with the color black at the same spot with the same image angle and the opacity is same as your health ratio (if your maxhp isn't 100 just change it to whatever you need). Thanks guys!
 
Top