How do I switch direction of platform player on tap?

Get help using Construct 2

Post » Sun Aug 24, 2014 10:59 pm

How do I switch direction of platform player on one tap?
left to right or vice versa
B
8
S
2
Posts: 54
Reputation: 1,001

Post » Mon Aug 25, 2014 3:37 am

Suggestion would be to check the x value of the touch. You could then simulate a left movement if touch x is less than player x. Opposite of course would be that a touch x greater than player x would simulate a right movement.
B
12
S
3
G
1
Posts: 35
Reputation: 838

Post » Mon Aug 25, 2014 6:07 am

If you'd like to toggle on tap you could use a boolean variable on the player and toggle boolean on tap..

then have an event
if boolean = true - platform simulate pressing right
else - platform simulate pressing left
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Aug 25, 2014 2:19 pm

Awesome thanks the boolean works perfect.
B
8
S
2
Posts: 54
Reputation: 1,001


Return to How do I....?

Who is online

Users browsing this forum: camtray, DevinMurray, Joannesalfa, Lancifer, marcoscodas, Yahoo [Bot] and 12 guests