frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

Is there any way to make a landing animation? (RE-POSTED)

edited September 3 in How To
I wanna make it to where one of the characters in my game plays a single-frame animation when they land on the ground after jumping and falling off of something but, I don't know how to, so can you help me? If you know a solution to my problem, please tell me and if you do, thanks! -Scraptap

Comments

  • edited September 3
    I re-posted this because nobody said anything that helped the first time this was posted and after those responses to the post, no one responded any more.
  • If I understand you correctly, I think something like this should work:
    Basic version:
    1) Add a ground collision trigger (only enabled for the bottom of your player)
    2) Connect that trigger to a switch
    3) Connect the output of the switch to play the animation, and also turn itself off. This will only allow the animation to play once, when you first touch the ground.
    4) Connect your jump button to the switches "on" input so the animation can play again after you jump

    Improvements:
    The above should work, but will have the drawback that the animation will only play after jumping. If you have platforms that the player can fall from, the animation will not play when touching the ground. To solve this, you could have a timer that checks for the ground periodically using a raycast, and if the player is in the air, then turn the switch back on.


Sign In or Register to comment.

flowlab.io

| make games in your browser
@ 2017 Flowlab.io, All rights reserved.

Contact us

Get In Touch