0 Favourites

PLATFORMER: managing players speed and animation

  • This is an example i made of a player changing animation, depending on its speed.

    It was suposed to be sonic like runner but i cant seem to get the player slide by holding oposite dirrection when in high speed.

    Anyway,heres a first try of managing the characters speed with animation speed state.

    Sudgestions and examples with other ideas for this topic are welcome!

    Example contains:

    -Basic description in eventsheet

    -Managing players speed with global variables

    -Changing animation, depending on the players speed (stand,walk,runn,break)

    File: dl.dropbox.com/u/5214903/GM/Runner%20Speed%20up1.zip

  • Yup!

    Good example, I use it to apply in a game based on the space.

    I just add some Sine who changes according to the speed.

    The next time I'll add that when you release a key when you are in high speed that the animation of the character goes trough "walk" for more fluidity.

    runouterspace.capx

  • I can't remember exactly how it works in Sonic, but one way to get a character to have a sliding animation is to check like this:

    Right Arrow is down

    Player.Platform.VectorX < 0

    Set animation to Slide

    Left Arrow is down

    Player.Platform.VectorX > 0

    Set animation to Slide

    If you want it to be more specific, such as only sliding while turning at VERY high speeds, simply modify the 0 in both of those checks to whatever you want it to be. Just remember that when you're heading left, VectorX is negative.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Yup!

    Good example, I use it to apply in a game based on the space.

    I just add some Sine who changes according to the speed.

    The next time I'll add that when you release a key when you are in high speed that the animation of the character goes trough "walk" for more fluidity.

    runouterspace.capx

    How about giving it rotation instead seting the angle and play a bit with combining sine movement with global?

    dl.dropbox.com/u/5214903/GM/UfoSpeeder.zip

  • I can't remember exactly how it works in Sonic, but one way to get a character to have a sliding animation is to check like this:

    Right Arrow is down

    Player.Platform.VectorX < 0

    >> Set animation to Slide

    Left Arrow is down

    Player.Platform.VectorX > 0

    >> Set animation to Slide

    If you want it to be more specific, such as only sliding while turning at VERY high speeds, simply modify the 0 in both of those checks to whatever you want it to be. Just remember that when you're heading left, VectorX is negative.

    Thankyou for the tip!

    The movement looks much better now the way i wanted :D

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