How do I : Touch Controls - buttons behaviour

Get help using Construct 2

Post » Sat Jan 10, 2015 1:14 pm

Hi
I have a problem with my buttons on touch screen. When i touch buttons, they change to frame 1 (clicked/pushed) but when i touch two buttons in the same time (e.g. left and jump) and release one (jump) he is still in the frame 1. It's logical because event 2 tell: Touch-> Is touching Buttons->Buttons->Set animation to 1 (I still touch left).
I want to touch/push two buttons but when i one release i want he back to frame 0.
Could someone help me or explain how do this ?
Thanks and Greetings

P.S. Sorry for my english
You do not have the required permissions to view the files attached to this post.
B
5
S
1
G
1
Posts: 9
Reputation: 566

Post » Sat Jan 10, 2015 1:36 pm

@darekk I cannot understand what you really looking for but I will say if you want to change your button on touch , change frames not animations , also set animation to zero, that means when your game launched the animation will be stopped at the start.

Since I am using Version 190 so I cannot open your file, sorry for this.

Hope it helps, if not let us know what you are trying to do.
Bye bye tc.
B
96
S
20
G
15
Posts: 198
Reputation: 14,571

Post » Sat Jan 10, 2015 3:23 pm

OK
Could you look at my capx for Construct r190 now ?
It's very simple code (see below). Like You see when i touch screen my buttons change from frame 0 to frame 1.
Event 3 tell that buttons should back to frame 0 when they are no touch. When I press/touch the two buttons (e.g. left and jump) on my phone/tablet and I let one (jumpButton) after my game character jump, my jumpButton is still in frame 1. How to change the code to jumpButton that he returned to frame 0, even if I still to touch leftButton or rightButton?
Greetings
You do not have the required permissions to view the files attached to this post.
B
5
S
1
G
1
Posts: 9
Reputation: 566

Post » Sat Jan 10, 2015 8:46 pm

@darekk

why are you using family , do you want it to be done with family , or you want it to be done any way.

I am not sure, but might be due to family, Since i never used them so not sure, try to use all button individually as i also did it without family and for me working fine, i mean in my game.

you need to make two events for each button, that's touching and not touch and set the animation frame there, and i think that will work , if not let us know again.

like for Example :-

touching right button > set animation frame to 0 or 1
not touching right button > set animation frame to 0 or 1

same for all buttons you want to make.

Will try to help you if we can . That's C2 community. :)

Edited :- Did some spelling mistakes and added example.
B
96
S
20
G
15
Posts: 198
Reputation: 14,571

Post » Mon Jan 12, 2015 10:33 am

Yes, I want to be done with family. Imho with family is more elegant, but for now I do like You advise :)
Thanks for Your help.
B
5
S
1
G
1
Posts: 9
Reputation: 566


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo and 22 guests