Touch Buttons.. Help!

Get help using Construct 2

Post » Sun Apr 27, 2014 12:24 am

There’s a bug in my touch sprite buttons. It’s simple: when you click the screen, hold the mouse button and go to one of the touch buttons, it works like you’ve clicked… and when you still holding the button, goes out of the touch sprite and come back, the ship engine sound repeats everytime…
any tips in that?

here is the test capx: https://db.tt/cUf1UJDm
B
20
S
4
Posts: 387
Reputation: 2,274

Post » Sun Apr 27, 2014 2:44 am

Hi Zathan, If I understand your problem correctly, you can use variables to solve your problem. This might not be the simplest solution but it should work.

On Touch Object "your button"
-Set Variable to 1

On any touch end
-set variable to 0

[Variable =1
Touch is touching "your button"
-Do your events here

The on touch object makes sure that it only activates when you specifically touch that button and now scroll to it but it only activates once and doesn't act like the touch is touching function which continously runs the events. So place a variable as a trigger and that should help solve your issue.

Hopefully this helps you out.
B
46
S
23
G
31
Posts: 693
Reputation: 20,637

Post » Sun Apr 27, 2014 6:23 pm

rekjl wrote:Hi Zathan, If I understand your problem correctly, you can use variables to solve your problem. This might not be the simplest solution but it should work.

On Touch Object "your button"
-Set Variable to 1

On any touch end
-set variable to 0

[Variable =1
Touch is touching "your button"
-Do your events here

The on touch object makes sure that it only activates when you specifically touch that button and now scroll to it but it only activates once and doesn't act like the touch is touching function which continously runs the events. So place a variable as a trigger and that should help solve your issue.

Hopefully this helps you out.

Works fine :)
thank you dude!
B
20
S
4
Posts: 387
Reputation: 2,274


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 24 guests