Halting an animation in place
|
|
I'm trying to get a dart to travel across the screen. When various events happen, I want the dart to stop moving but remain where it was stopped. With the following example code, the dart is disappearing on me when it reaches the half way point when I was expecting it to just stop. How can I halt the animation while leaving the object right where it is?
Code:
var/Dart/d = new(locate(1, 10, 1))
// Send the dart across the screen animate(d, pixel_x = 500, time = 100, easing = SINE_EASING, EASE_OUT)
spawn() // When the dart gets half way, end the animation and leave the dart where it is while(d.x < 250) sleep(2) animate(d)
|