jump backwards when coliding

Get help using Construct 2

Post » Thu Feb 13, 2014 6:26 pm

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
B
4
Posts: 8
Reputation: 256

Post » Thu Feb 13, 2014 10:11 pm

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...
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603

Post » Fri Feb 14, 2014 7:43 pm

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...
B
4
Posts: 8
Reputation: 256


Return to How do I....?

Who is online

Users browsing this forum: dop2000, Seruza, Yahoo [Bot] and 8 guests