What can set "Is Playing" to False other than Stop Animation?

0 favourites
  • 5 posts
From the Asset Store
This Student Workbook uses both Construct 3 & 2 encoding. It supplies client-side & php "back-end" encoding.
  • I have this long standing, very random bug in my game I am trying to pinpoint with no luck.

    The short version is that when an enemy switches to their attack animation, very occasionally their animation freezes. Through the debugger I discovered this happens because SOMETHING is setting "Is Playing" to False.

    But here's the thing, to my knowledge the only action that can do that is "Stop Animation", and I do not use that action anywhere for any object (including these enemies) in my project.

    Searching the entire project for "stop animation" only gives me results for some disabled code I kept around for reference.

    Is there something else that can manipulate "Is Playing" that I am not aware of? Anything that might help me here would be greatly appreciated, this bug has been sitting there, randomly occuring, for months now.

  • is playing is false if a different animation is playing

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lionz sorry, I should clarify, this is in regards to the current animations "Is Playing" value, specifically the one the debugger displays when inspecting the instance in question:

    My understanding is that the debugger value is always updating to the current animation in real time, that is what it appears to be doing at least, and while "Is Playing" remains true most of the time, randomly it does turn false when switching to the attack animation.

    Bandaid Solution in case anyone has this same issue in the future

    While I have no clue what is setting this value to false and stopping my animation from playing, I was able to "fix" the problem by putting a "Start Animation from Current Frame" action after the "Set Animation" action.

    To be clear, this shouldn't be necessary. The existing code works 95% of the time, but after adding this "Start Animation" action and running the game at 10x speed for an hour with an AI controlled enemy attacking a dummy, I haven't seen the issue pop back up. The debugger still shows the "Is Playing" value being set to false randomly, but this bandaid bypasses that.

  • Looks like this is down to events if you are saying the attack animation stops playing when it should, there could be 2 conflicting animations trying to play at the same time, this is a common issue with animations.

  • That could be, the AI accepts instruction mostly from one source (a general "AIUpdate" Function) but does occasionally have to get instruction outside of that routine, which might be the culprit. Glancing through my events I don't see any that should be updating the animation externally, but that doesn't mean its not there.

    I'll keep that in mind if this rears its head again, for now the force "Start Animation" is working with no consequences.

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