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

Draw event for all objects with same name

S

Stancho

Guest
Hey guys. So i have an object that draws shadows for all my other objects. I'm at the point where i want to draw_ellipse for my trees. so i write
draw_ellipse_colour(obj_tree.x-34,obj_tree.y-27,obj_tree.x+39,obj_tree.y+10,c_dkgray,c_dkgray,false);
but only one of my trees gets the ellipse drawn, what am i missing to have this ellipse drawn on all my obj_tree?

thanks guys.
 

marasovec

Member
The easiest way is probably 'with' statement
Code:
with(obj_tree)
    {
    draw_ellipse_colour(x-34,y-27,x+39,y+10,c_dkgray,c_dkgray,false);
    }
 
Top