I'm having a problem with animations.

0 favourites
  • 8 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Hello, I wanted to make a setting that turned off animations, so I set it so if the setting was on, I ran the command "stop" and vice versa. The problem is that it will never start the animation. Thanks!

  • Could you share a screenshot of your code?

    Chances are you're running the command every tick, versus once, but it'd be easier to help with a look at what you're up to!

  • My guess would be it's an issue with your code were you call start animations again. Usually this happens cause you try to start on click then stop on click in another and the system reads both. You need to use an Else statement.

    Check this video out if you need more info:

    youtu.be/GFTS7efp_Cg

  • What winstreak shared is right, step one is adding an Else to the "Off" condition.

    However, this code is still checking the value of ReduceMotion every single tick. As long as it's "Off", it's constantly restarting the animation of Coin and Cloud — meaning it's displaying Frame 0 of those animations over and over and over.

    So your code, in a way is working: it's starting the animation. But it's starting it every single tick, and will never leave Frame 0.

    You need to find a way to check this code periodically. Ideally, you could put this code in a Function, and call that function whenever the ReduceMotion variable changes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for all the help! How would I use the else statement on this code (because for some reason I decided to use a string of "on" and "off" instead of a boolean)? Whenever I add an else statement it just turns red.

  • Nevermind, I got how to use the else statement correctly, I was just putting it in the wrong place. Thanks!

  • I think I got it working! Thank you so much for all your help!!!

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