How do I stop an animation from not going away? (please answer, I am going insane)

1 favourites
  • 5 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • In the Snubs Fight I am making, for some reason after the mantis shrimps are destroyed (which would normally just set Snubs to "smirk" animation), the "throw down" animation, which should have been deactivated after the mantis shrimps disappeared, keeps flashing while the other animation plays at the same time and it would not obey the rest of the coding like the "animal fact" should have disappeared

    I also don't know if you can see the code from my game and if you do, can you help me figure out why the animation is glitching?

    construct.net/en/free-online-games/snubs-fight-test-need-help-12046/play

    from, and overly stressed 14 year old

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's really hard to understand what's going on in your code. The biggest mistake is that events 10, 16, 24 and some others may be executed multiple times. When the condition is true, all actions inside these events are repeated 60 times per second. What's even worse is that you have "Wait" actions inside these events. This creates hundreds of wait-threads which cause a complete chaos.

    An easy and dirty fix is to add "Trigger once" to such events, but you should be really careful with this, because when used incorrectly "Trigger once" can cause more problems than you already have.

    The correct solution is to stop using so many "Wait" actions and use Timer behavior instead. "On Timer" events are triggered only once, not on every tick. And with Timer you will have complete control over the sequence of events. You can pause or stop timers, which will allow players to skip intro text etc. (Because unskippable intros are bad!)

  • can you give me an example of what I should do?

  • Here is how I would probably do it.

    .

    Here I use "On typewriter finished" event as a signal to start displaying a new message. And instead of "Wait 10 seconds", use Timer behavior.

    This way you have full control over your events. You know exactly in which order they will be executed, you have an option to skip typewriting, you can pause or cancel the Timer if needed etc.

  • THANK YOU SO MUCH, IT REALLY HELPS!! :)

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