How to make Sprite/Player jump off spike/obstacles?

Get help using Construct 2

Post » Thu Apr 27, 2017 10:06 am

How to make Sprite/Player jump off spike/obstacles?
I tried setting the Y value but it jumps off instantly and it looks weird.
Any tips and tuts to make it look "natural"
B
5
Posts: 9
Reputation: 243

Post » Thu Apr 27, 2017 10:49 am

@JoshVillaluz

Use Set vector Y and put a negative value (e.g. -128) to make the player bounce up.

You can also use Set vector X to make the player bounce away from the obstacle

Here's an example, that will bounce the Player back or forwards depending on where they are in relation to the Spike:
Set vector X = Player.X < Spike.X ? -128 : 128

Edit: Here's an example with higher values:
capx (r244)
Last edited by OddConfection on Thu Apr 27, 2017 11:08 am, edited 1 time in total.
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
32
S
9
G
7
Posts: 444
Reputation: 6,731

Post » Thu Apr 27, 2017 11:05 am

@OddConfection
Thanks! Just changed some values to make the sprite bounce further.
I can play an animation at the same time right?
B
5
Posts: 9
Reputation: 243

Post » Thu Apr 27, 2017 11:07 am

@JoshVillaluz

Glad to help. And sure, you can put the action to play the animation in the same event.
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
32
S
9
G
7
Posts: 444
Reputation: 6,731


Return to How do I....?

Who is online

Users browsing this forum: Darth Crusher, NN81, plinkie, TsubaRu and 9 guests