How do you make a collision event only happen once?

0 favourites
  • 5 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • My character has another animation when it jumps. I need to make it so once it touches the ground it should go back to it's original animation. I don't want it to go the original animation all time it touches the ground since it should be able to go to other animations while standing on the ground. The on collision whit another object event makes it so so long the character touches the ground it can't do any other animation. The same goes for platform on floor event. Is there a way to make it so the collision only switches the animation everytime the character has jumped and reached the ground and not again until the character jumps again?

  • Seriously what? I know a lot about platformer behaviour, but I don't understand what do you mean. Could you explain it more simple?

  • Create an instance variable called "recover" and set it to boolean.

    Use 'on landed' would be trigger action once such as playing "recoil" animation. Add wait action (1 or 2 seconds) then set recover to true so we know the condition has switched. You also can make sure after the "recoil" animation finished, another animation is being played while is on floor.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create an instance variable called "recover" and set it to boolean.

    Use 'on landed' would be trigger action once such as playing "recoil" animation. Add wait action (1 or 2 seconds) then set recover to true so we know the condition has switched. You also can make sure after the "recoil" animation finished, another animation is being played while is on floor.

    It took alot of thinking and trying but it worked in the end. Thanks!

  • Congrats then. Another platformer mechanic should not too hard to achieve when you understand the logic.

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