How do I Make Jump Button?

Get help using Construct 2

Post » Tue Mar 17, 2015 10:18 pm

I'm creating an android game therefore requires no mouse or keyboard, just touch.
I want a button to be on the screen which when touched causes the player to jump.

I created the button which is a 'sprite' and used the touch system which is as follows;

On touched object (button) - action = simulate platform - pressing jump

This doesn't seem to work????
B
8
S
2
Posts: 146
Reputation: 1,132

Post » Wed Mar 18, 2015 12:28 am

Try every tick, check if the button is being touched then call the same action.
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Wed Mar 18, 2015 1:01 am

How should i code that? I'm slightly confused
B
8
S
2
Posts: 146
Reputation: 1,132

Post » Wed Mar 18, 2015 9:35 pm

1. create an event every tick
2. add a condition "Object is in touch"
3. add the event Platform:SimulateControl(Jumping)
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Wed Mar 18, 2015 10:49 pm

The capx below shows a jump simulated via platform behavior and a touch or click of a button.
You do not have the required permissions to view the files attached to this post.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
63
S
17
G
8
Posts: 629
Reputation: 9,269

Post » Thu Mar 19, 2015 2:44 am

Thanks so much guys. I Figured out what the problem was. The platform that the player was standing on was a moving platform (i created a scrolling background with 'solid' behaviour to give off the impression that the player was running. For some reason this stopped the player from jumping (not a clue why).

So i solved it by keeping everything the same except i created another solid object with '0' opacity making it invisible. I placed the object just above the moving platform so that the player was ever so slightly above the moving platform stopping him from interacting with it. The player now Jumps :D :D :D thanks so much for your help as well!!!
B
8
S
2
Posts: 146
Reputation: 1,132


Return to How do I....?

Who is online

Users browsing this forum: abman, Hex27, morti, supervanz and 2 guests