no animation falling from platforms but yes in jump

Apamaster

  • Posts: 129
Good morning. Many times I used the forums and found the answers to many problems. but now I have a question that I could not solve in the forums. I have a fall animation works well when the character jumps, but when falling from a platform the animation of walking when it falls falls. I tried everything but I think there must be a problem with On ground since that animation should not be seen as it is not colliding.

« Last Edit: January 26, 2020, 02:14:57 pm by Apamaster »

Luyren

  • *
  • Posts: 2747
In your code, you don't have anything setting "On Ground?" to false, only when jumping. You might think that your "if not actor hit a tile" would execute, but that is inside a collision event, meaning your actor would need to collide with something for that to happend. That's why your falling animation isn't paying in those cases.

Use the double-boolean setup to check when a collision is not happening instead. In the attached example, the "On Ground" attribute will return true if the actor is touching the ground, and false if not touching the ground.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

Apamaster

  • Posts: 129
It was the collision of the sprite that my animation did not touch the ground by a pixel I had to manipulate the collision and make the box above the sprite. Now it works. the corrections and te colison box on the sprite is more importan

« Last Edit: January 27, 2020, 09:20:54 am by Apamaster »