How do I set position to a sprite but still jump?

Get help using Construct 2

Post » Thu Mar 31, 2016 7:55 am

Hello everybody. I cant figure out how to do this, i would appreciate any tips or hints.

I have a sprite "sprite1" which follows another sprite "sprite2" (i use set position and angle every tick), now i want "sprite1" to jump up when i press a button and then land again on "sprite2", so while in the air "sprite1" still follows "sprite2" position and angle. I cant seem to do that since i force "sprite1" position and angle to "sprite2" every tick.
(imagine a guy standing on a moving car and then he jumps up and down)

Do you guys have any suggestions on how to do that?


Cheers
B
7
S
1
Posts: 12
Reputation: 799

Post » Thu Mar 31, 2016 11:00 am

Hi i think you have to do 2 conditions,
like when Sprite1 is on land his positionX/Y = positionX/Y of Sprite2
But when Sprite 1 is jumping then only position X = position X of Sprite2
B
18
S
7
G
1
Posts: 56
Reputation: 3,000

Post » Thu Mar 31, 2016 4:37 pm

Hmm. Although that will only work on straight line.
What if the car "side view" drives inside a round loop? Then i need sprite1 to jump towards the center of the loop and still land on sprite2.
B
7
S
1
Posts: 12
Reputation: 799


Return to How do I....?

Who is online

Users browsing this forum: Pandy, Uglypenguin and 9 guests