Animation woes...

0 favourites
From the Asset Store
Ninja char for your game! Make your own Shinobi game with this art.
  • the sin() part is really basic, sin() make things evolve from 0 to 1 to 0 to -1 to 0 etc... with the abs() I force it to evolve frome 0 to 1 to 0 to 1 to 0 etc... and then I just have to multiply this value by an amplitude to make the height evolve.

    The lerp thingy is just used to quickly go back to the starting size. (If you don't use lerp it will just snap back instantly).

    I strongly suggest you learn how it works. Your way is way more complicated. There's too much variables and situations to take into account. Once you get the hang of sine and lerp you will see that things get easier and well... You can use that for so many things.

    Anyway, this capx was to demonstrate one thing: you can tweak width and height even with mirror. You just have to always put the mirror at the end of the event list for it to be applied. So you don't have to resort on your animation frame tricks anymore.

    Using lerp and sine is not necessary, you can use a variable you increment and decrement for scaling as you already do. (with sine it's just more straighforward)

    That's all (:

  • Sooo... I'm having trouble again, <img src="smileys/smiley6.gif" border="0" align="middle" />

    I took a two-week-ish break to do schoolwork (design and make a game in two weeks, yikes), but now I'm getting back into this. I started redoing the whole animation system using your sine walking as a foundation, and got pretty far with it. The problem? The same dang flickering I started this topic for in the first place, at the end of the turning animation. <img src="smileys/smiley5.gif" border="0" align="middle" />

    Mind taking a look?

  • ninjaTurn4.capx

    Somehow, the walking animation was set one tick later. So the turn animation frame 0 was displayed. Very weird. But setting the animation in the state="Walk" subevent make sure you set frame 0 from animation "Walk" and not "Turn". Well look at it you'll see.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That did the trick! Weird problem, but thanks for the fix. Hopefully the rest of the animations will work in smoothly, but... well, I might be back soon. <img src="smileys/smiley18.gif" border="0" align="middle" />

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