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

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