• 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 [SOLVED] draw_set... are performing for another objects

E

Edwin

Guest
Hello, comrades.

I have a problem that I can't solve:
When I set a font/colour/alpha and other stuff for my sprites or fonts in one objects Draw Event when I draw something in another object it shows the same properties that I just set.

I know that I can use functions like draw_sprite_ext or draw_text_colour, but I can't do that because it's harder to write than draw_set_something.

Can I use draw_set_... functions for only single object and don't make them global?

Can I do something like:
Code:
draw_text(x, y, "Eat pant.") {
    draw_set_font(fn_bart);
    draw_set_colour(c_white);
}
Any suggestions?
 

Slyddar

Member
Can I do something like:
Code:
draw_text(x, y, "Eat pant.") {
draw_set_font(fn_bart);
draw_set_colour(c_white);
}
While you can't do that, they can be set to defaults with the value -1.
So
Code:
draw_set_font(fn_bart);
draw_set_colour(c_white);
draw_text(x, y, "Eat pant.")
draw_set_font(-1);
draw_set_colour(-1);
will restore them to their default, but not necessarily what they were before. I prefer to set them each time I need them for a draw, that way you never need to reset them again.
 
Top