touch problem

0 favourites
  • 4 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • i have a sprite that i use to be like a checkbox.

    so i give that sprite variable instance "selected" wich means value=1 if selected and value=0 if not.

    if the selected=0 the animation set "Default".

    if the selected=1 the animation set "Selected".

    when I touch/click the sprite, I set variable "selected=1", and animation turn to "Selected". But when I try to clicked it again, the sprite wouldn't turn back to "Default" animation.

    anyone can help me?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should post a .capx or a screenshot of your code.

    You may have the check for touch events happening one after the other which would happen in the same tick, thus negating the objective.

    Better to either use a variable to keep track of which option is touched, or use 'else'.

  • sometimes putting a "Wait" in the second Event will cause it to wait til the next tick, solving the problem. But it depends on how yours is setup.

  • wow! it's work! thank you :D

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