Dr_Nomz
Member
So I have a code that changes one objects sprite from normal, to transparent.
Thing is, is it drawing a NEW sprite every time the code is activated? Or does it delete the first sprite? OR does it just change the current one, instead of drawing a new one?
Draw event:
I ask because if it IS creating lot's of sprites without ever deleting them, will that cause lag?
Thing is, is it drawing a NEW sprite every time the code is activated? Or does it delete the first sprite? OR does it just change the current one, instead of drawing a new one?
Draw event:
Code:
if alpha = true{
draw_set_alpha(0.8);
draw_sprite(spr_Inventory_5,0,x2-250,y1+150);
draw_set_alpha(1);
}
if alpha = false{
draw_sprite(spr_Inventory_5,0,x2-250,y1+150);
draw_set_alpha(1);
}