How do I : Touch Controls - buttons behaviour

0 favourites
  • 5 posts
From the Asset Store
Supports keyboard, mouse and gamepads. Supports several gamepads at once.
  • 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

  • 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.

  • 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?


  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)