How do I just make the player jump only left or right

Just started using Construct 2? Post your questions here

Post » Thu Jun 19, 2014 6:12 am

Hi,

I think I haven't had much sleep to work this simple objective out. All I want is my player sprite is to jump left or right when touching the left or right of the screen. I have pinned invisible boxes left, right and above his head to take on the simulated actions. I don't want the player to be able to walk left or right, just jump left and jump right or jump straight up if touching directly above his head. ANy ideas? This is what I have so far... but it will jump the first time then just goes left or right without jumping.

Image
B
26
S
6
Posts: 39
Reputation: 1,574

Post » Thu Jun 19, 2014 7:02 am

Hey @DevDan : You can find a commented capx example attached to this post.
Jumping is kind of a trigger. You only want to fire it at the start of a touch, and not continuously. And according to your code, the character will continuously move if the player is touching the object.

Good luck going forward,
Nathan
You do not have the required permissions to view the files attached to this post.
B
79
S
22
G
4
Posts: 311
Reputation: 12,844

Post » Thu Jun 19, 2014 7:41 am

Ahh perfect. Thanks @Valerien. Will be a good start for my kangaroo hopping :)
B
26
S
6
Posts: 39
Reputation: 1,574


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests