jump backwards when coliding

0 favourites
  • 3 posts
From the Asset Store
Candy Jumping
$2 USD
60% off
Jump on candies, collect candies and earn score!!!
  • Hi i need help again...

    I need to make the principal caracter jump backwards when colliding with an object , regardless if he colides from the right or the left. Has anyone tried this .

    forehand Pbain

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • pretty simple for the most part. You will most likely need to setup multiple variables. Or you can test for if the player is moving, and collides with wall object (if you have certain types of walls that they should bounce off of then use families). Then:

    On Collision with Wall

       If Wall to Left > Set Vector X + 100

       Set Vector Y - 100

       Play Animation BounceOff

       If Wall to Right > Set Vector X -100

       Set Vector Y - 100

       Play Animation BounceOff

    You may also want to check what direction the player is moving if they have the option to run backwards, etc... Setting Vector X moves the player to the left or right depending on + or -, Setting the Vector Y moves the player up or down depending on the + or -.

    That should get you started...

  • Thankyou for your answer , I tried what you explained and it does not generate the effect i am looknig for or trying tjo reach , the caracter jumps back but remains in the same place i tried alterating the vectors x , y and there is no positive effect...

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