Change animation during timeline

0 favourites
  • 5 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Hey guys!

    I'm pretty new to Construct3, so sorry, if I'm asking dumb stuff.

    Is there any solution for changing a sprite's animation during a timeline?

    Like to "walk" from "idle" animation?

    I don't really find anything about that question.

    Basically my main problem is that if I'm moving a character with timeline, the platform based properties just goes to zero, and the animations doesn't change based on speed, etc.

    I tried to use moveto instead, but in that case, I can't use timeline based tags to trigger events, and the animations doesn't changes correctly either. Only of there is some gravitation in the equation, like falling.

    Thank you!

    Thanks!

  • Well... it's probably not a "best practice", but I came up with a solution. I figured it out, that I can change some props on the fly, but as I see, unfortunately there is no "AnimationName" prop for the sprite object on the props panel, so I gave a "currentAnimation" instance variable to my player object, and I refresh it based on the "frame changed" event from the sprite. During the timeline, I can reach that variable, and change it, what changes the current animation on the sprite (with some magic on the event sheet panel). So... yep. It's a little ugly, so if there is any "factory solution", pls share it :) Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • How is this solution working for you so far? I'm looking to do the same thing -- have sprite animations change during a timeline -- and I'm actually pretty surprised it's not a standard option.

  • Well.. It's working quite good I think :) The only problem is that I have to be really specific with everything. Like if I want to move a character from A point to B, I have to flag a bunch of keyframes with animation names. Turn right, then idle, then walk, then idle again, etc. But I accept it, because there will be cases, where I want to move the character with idle animation, (for example the character stands on a moving object) and I'm pretty sure that there will be other cases, where the character movement and the animation will not have some "obvious relation". But yeah, I was also surprised that I had to implement some custom solution for that.

  • That's good to hear! I'm going to play around with this idea a bit and may have some questions. Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)