B
Bokkie2988
Guest
Hey,
As the title says. How would I make a object blink with image_alpha?
-Bokkie
As the title says. How would I make a object blink with image_alpha?
-Bokkie
blink_time = 0;
blink_length = 30;
blink_alpha = 0.25;
//set image_alpha
if blink_time++ > blink_length image_alpha = blink_alpha else image_alpha = 1;
//reset time
if blink_time > blink_length * 2 blink_time = 0;
Is this a smooth transition btw? Because I need thatYou could also do it without an alarm like this:
CREATE
STEP:Code:blink_time = 0; blink_length = 30; blink_alpha = 0.25;
Code://set image_alpha if blink_time++ > blink_length image_alpha = blink_alpha else image_alpha = 1; //reset time if blink_time > blink_length * 2 blink_time = 0;
If you wanted a smooth transition, you should have said that from the start, not after you get a response.Is this a smooth transition btw? Because I need that
blink_theta = 0;
blink_theta_rate = 4;
blink_theta = (blink_theta+blink_theta_rate) mod 360;
image_alpha = 0.5*(dcos(blink_theta)+1);