Touch, Play Animation, Stop Animation.

0 favourites
  • 10 posts
From the Asset Store
This Student Workbook uses both Construct 3 & 2 encoding. It supplies client-side & php "back-end" encoding.
  • Okay, so here's what I'm trying to accomplish, every time I touch the screen I want a specific sprite to play it's animation every time you touch the screen, but when you lift your finger or thumb off the screen the animation of the sprite will stop and go back to the animation beginning.

  • Hello,

    You should do the tutorial if you didn't already.

    That being said, you want something like this, where the "dancing" animation is looping :

    example

  • Yeah,

    Already did the tutorial, this is my account for the forums.

    Anyway, what you gave me, thanks btw, did not help.

    I need the one frame to play every time the player taps anywhere on the screen. And then every time their thumb or finger is lifted off the screen I want the frame to go back to the original frame it started out with or a specific frame.

  • Only one frame should play ? Just add a variable on the sprite so you can store the current frame (for later) before changing it. Instead of using "Play animation from beginning", start it from a given frame. Use the same triggers, but at the end, start playing from the original frame, using the variable you set at the start.

  • Yes, so for example, every time a player touches their mobile screen, or tablet, the characters (sprite) eyes well widen, then and only then will the eyes of the character (sprite) will widen, and as soon as the player takes their finger off the screen the characters (sprite) eyes will return to a normal non-widened state. Okay, I'll try, thanks but what should I call the variable, and should it be, 0, 1 or 2

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You call the variable as you like, it's your program and has no influence on anything else than you understanding your code.

    Should it be 0, 1 or 2? I don't understand that question. If you are talking about the initial value of the variable, there is no need to set one, as it will be overwritten as soon as you use it.

  • Okay thank you

  • not working for some reason, tried everything.

  • Have you tried using the "on any touch start" and "on any touch end" to just set the animation frame from 0 to 1?

    Check the attached capx for an example of using these.

  • Try this demo it's same as dracogriff but with real sprite movements

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