PlayerOne
Member
Is there a way to isolate a function within gml? Using draw_set_alpha in this example:
Within the arrows I want to isolate a function like draw_set_alpha, have that execute only with the desired code in the brackets, and not have it affected anywhere else in the game. Same goes for the exit statement if that is at all possible.
Code:
DRAW:
draw_text(x,y,"Hello World...");
vvvvvvvvvvvvvvvvvvvv
if (!test_var)
{
draw_set_alpha(0.5)
draw_text(x,y,"hello!");
}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
draw_text(x,y,"hello people...");