Cyclone112 Posted January 25, 2017 Share Posted January 25, 2017 So I have 2 animations that both work independently. I can pause and unpause either of them fine but I can't pause one, play the other and then unpause the first. Quote this.animations.play("animation1", 10); // Sometime later this.animations.getAnimation("animation1").paused = true; // Sometime later this.animations.getAnimation("animation1").paused = false; This doesn't and no animations play in the end Quote this.animations.play("animation1", 10); // Sometime later this.animations.getAnimation("animation1").paused = true; this.animations.play("animation2", 10); // Sometime later this.animations.getAnimation("animation2").paused = true; this.animations.getAnimation("animation1").paused = false; Any ideas? Link to comment Share on other sites More sharing options...
samme Posted January 25, 2017 Share Posted January 25, 2017 Try var anim1 = this.animations.getAnimation("animation1"); var anim2 = this.animations.getAnimation("animation2"); this.animations.play("animation1", 10); // Sometime later anim1.paused = true; anim2.play(); // Sometime later anim2.paused = true; anim1.play(); Link to comment Share on other sites More sharing options...
Cyclone112 Posted January 25, 2017 Author Share Posted January 25, 2017 Hey samme, while that does work in the sense that it does replay the first animation it unfortunately starts it over from the beginning again when I need it to start where it was paused from. Link to comment Share on other sites More sharing options...
Cyclone112 Posted January 26, 2017 Author Share Posted January 26, 2017 Okay I finally got it working. You need to reset the currentAnim object on the animation manager back to anim1 after pausing anim2 and it starts right where it left off. var anim1 = this.animations.getAnimation("animation1"); var anim2 = this.animations.getAnimation("animation2"); this.animations.play("animation1", 10); // Sometime later anim1.paused = true; this.animations.play("animation2", 10); // Sometime later anim2.paused = true; this.animations.currentAnim = anim1; anim1.paused = false; kudefe and drhayes 2 Link to comment Share on other sites More sharing options...
Recommended Posts