XD005
Member
Code:
if (dir=0)
{
draw_set_color(c_white);
draw_set_alpha(0.50);
draw_circle(x+sprite_width/2,y+sprite_height/2,clamp(90-(90*((room_width-x-32)/1120)),0,90),false);
draw_set_alpha(1);
}
else
{
draw_set_color(c_white);
draw_set_alpha(0.50);
draw_circle(x+sprite_width/2,y+sprite_height/2,clamp(90-(90*(x/1120)),0,90),false);
draw_set_alpha(1);
}
draw_set_color(c_white);
draw_text(x+4,y+4,string(90-clamp((90*abs((32/-x))),0,90)))
Basically dir0 is left (x-4 in step event), dir 1 is the opposite, moving to the right.
What I'm basically trying to do is draw a shrinking circle that shrinks completely to zero once the circle is in the proper position. When moving to the right, it needs to be at 1120, when moving to the left it needs to be at 32.
I can't figure out how to make it shrink correctly for direction 0.