How do I change animation every touch

0 favourites
  • 4 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • hi friends, How do I Change the animation and if you pressed again this is returned to the initial animation and so on

    sorry by my bad english.

    thanks.

  • hi friends, How do I Change the animation and if you pressed again this is returned to the initial animation and so on

    You can use a variable to register/control the "touch" order. For example:

    > on touched sprite  
                       varTouch = 1 > play "animation1"
                                                 wait 0.1
                                                 varTouch = 2
                                     else >  play "animation2"
                                                  wait 0.1
                                                  varTouch = 1[/code:25lfjzuc]
  • on touch

    add one to global

    if global = set animation

    ------------------------------------

    maybe try some thing like this

    on touch

    trigger once while true

    set animation frame +1

    animation frame = 12

    set animation frame 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • on touch

    add one to global

    if global = set animation

    ------------------------------------

    maybe try some thing like this

    on touch

    trigger once while true

    set animation frame +1

    animation frame = 12

    set animation frame 0

    ---------------------------------------------

    could also look at toggle animation if you only have 2 images

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