Animation does not start

This forum is currently in read-only mode.
  • Left mouse button is down

    + sprite: set animation to "Shooting".

    When I click left mouse button, it only shows the 1st frame.

    When I let go and click left mouse button again, it shows another (seemingly random) frame.

    • sprite has Animation called "Shooting".
    • This animation has angle 0 degrees.
    • 0 degrees-angle has 4 frames.
    • Animation has turned on option "loop".

    I would like to start the animation, by clicking on the mouse button running the frames, but it doesn't.

  • That is because "mouse is down" condition triggers continuously as long as the mouse button is down, thus starting the animation over and over and over each tick.

    Add "trigger once while true" condition or use "mouse button pressed"

  • That is because "mouse is down" condition triggers continuously as long as the mouse button is down, thus starting the animation over and over and over each tick.

    Add "trigger once while true" condition or use "mouse button pressed"

    Thanks, I'll try that out.

    Stupid me.

  • That is because "mouse is down" condition triggers continuously as long as the mouse button is down, thus starting the animation over and over and over each tick.

    That's exactly what I want.

    I don't understand the following: when I set animation speed to 10 or 20, I only see 1 frame.

    Animation speed set at 50, it jumps, seemingly random, from the 1st to the 2nd frame. In a non-constant way. (completely destroying the illusion of animation/movement)

    I wish to achieve the following result:

    As long as mouse button left is down, animation of 2 frames starts (gun-shooting animation).

    Mouse button released: frames of gun-shooting animation are no longer seen.

  • Just use On Click to set the animation.

    On left mouse button clicked => set animation to "shooting"

    Since it's looped, it will repeat itself from now on of course.

    Now make a new event like this:

    Left mouse button is NOT down (inverted condition) => set animation to "default" (or whatever your idle animation is called).

    That should work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply.

    While testing your suggestion, I found out that a previous ELSE-condition was interfering with this new shooting-animation-condition, resulting in unpredictable behaviour.

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