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

[SOLVED]Making something in a draw event change opacity?

J

Jacob

Guest
So i have this virtual analog stick in my mobile game and i need to change the opacity on it so it becomes transparent. It's currently made in a draw end event and i have tried used the function "draw_set_alpha(alpha);"
but it affects all sprites in the entire game for some reason. Every single one becomes transparent.

This is how it looks.


https://gyazo.com/a28417b27ccdb1b6ebaef72f31c43663

Anybody know how i can accoplish this. Any help is appriciated.

Thanks in advance.
 

FrostyCat

Redemption Seeker
You have to set the drawing alpha back to 1 afterwards, this is no surprise.
The Manual entry for draw_set_alpha() said:
With this function you can set the base draw alpha for the game. This value can be set from 0 to 1 with 0 being fully transparent and 1 being fully opaque (the default value), and will affect all further drawing, including backgrounds, sprites, fonts, primitives and 3D.
 
Top