Animation Speed with Wait

0 favourites
  • 8 posts
From the Asset Store
Ninja char for your game! Make your own Shinobi game with this art.
  • Hey guys! So I ran into a problem with the animation speed action.

    Basically I have a platformer set up so when you hold down ctrl, you run. I have a progressive build up in speed, so I am animating the run animation to start off slower, and build up speed. How I am doing that is:

    ctrl down:

    -set animation to "run"

    -set wait 0.3

    -Set animation speed 10

    -set wait 0.2

    -Set animation speed 15

    ctrl release:

    set animation speed 7

    set animation "walk"

    It works fine expect the animation speed setting does not turn off until the left or right key it let off as well. (so basically the "walk" animation plays but at speed 15 until you stop all movement)

    I did a few different test, and know it has to do with the "wait" functions, as when I remove them, this does not happen.

    Anyone have an idea on how to maybe this this, or accomplish this effect without the wait function? Thanks!

  • Ctrl down:

    -set animation to "run"

    -set animation speed to lerp(Sprite.AnimationSpeed,15, dt)

    Make sure that the animation speed of the animation is 0 at the beginning.

    Example made in r98.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the info.

    I am currently running r90.

    How do I update this version exactly, so I can use this function? Thanks again.

  • Download the last beta version.

  • Latest beta is r98.

    The r95 is the latest stable build.

  • Hmmm, I installed r98.. and It seems you cant change the animation speed on any animations in the animation properties with this version... with or without the set animation speed to "lerp(Sprite.AnimationSpeed,15, dt)"

    Is that what you meant by unstable? =P

    Any other way to do this without having to use an unstable version of Construct?

  • It is the kind of bugs that goes with using beta versions.

    The fact that you can't directly edit the animation speed is a bug introduced in r98 and should be fixed in next version.

    You can just check the code and write the same in a r95 new project, it will work.

    R95 won't be able to open the r98 project, for matters of compatibility.

    For now, as a workaround, the animation speed is set in the "Start of layout" event.

  • Yeah, thats what I was thinking... But I saved over the r95 with the r98.... Crap! Anyway to revert this?

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