How do I make the sprite jump by tapping on the screen?

Get help using Construct 2

Post » Fri Dec 02, 2016 9:23 pm

Hey everyone.

I have a sprite that I want to Jump everytime you tap on the screen of your Phone.

I also want it to start flying when you keep the finger on it.

I hope to get some help.

Thanks
B
14
S
2
Posts: 47
Reputation: 751

Post » Fri Dec 02, 2016 9:40 pm

you'll need the "touch" object, the sprite with platform behavior and a solid ground where it will be placed.

on the event page put:
Condition: On any touch;
Action: Simulate Control -> Jump

To fly, set falling speed to 0 or sustain the jump for a local variable who will be counting while the touch is active and fill the sustain instance with this variable.

see the flapbird sample file inside the construct2 sample files.
Image
B
104
S
23
G
17
Posts: 1,350
Reputation: 22,028


Return to How do I....?

Who is online

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