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
3
Posts: 50
Reputation: 907

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
108
S
24
G
18
Posts: 1,376
Reputation: 22,830


Return to How do I....?

Who is online

Users browsing this forum: work3 and 8 guests