Forum rules - please read before posting.

Animated portrait runs once, then never again...

I've been having some difficulty of late with the animated portrait. I've gotten it working in previous projects, so I'm not exactly sure what's going on.

The portrait I've added to the character has 25 frames, and I've told it to use five rows and five columns. However, on starting the game, the animation only plays once (and then, only if the animation speed is over 60), then never again for the rest of the game. Every dialogue line after that, same image.

Other characters will also get their one-shot of animated line, then it stops forever. Any thoughts on what might be happening here?

Comments

  • In which version of AC?  A recent update introduced the caching of sprites in menus - which could have had this knock-on effect by accident.
  • 1.52a is the version I've got on the go for this project.
  • I'll look into it.
  • Nope, can't reproduce.
    • You've got "End on last frame?" unchecked?
    • Are you using lip-syncing?
    • What happens if the animation speed is below 60?
    • Are you using AC or Unity UI to draw your Subtitles Menu?
    • Are you using expression tokens in your dialogue?
  • edited July 2016
    Hm, that's odd.

    - "End on last frame" is unchecked
    - Lip-syncing is off
    - If the speed is below 60, the animation sticks on its first frame
    - I'm using the Unity UI prefab to draw the subtitles
    - I have not, thus far, implemented expressions or used the tokens in dialogue yet.

    I've just rebuilt the project from scratch, reimporting only the sprites, animations and animator controllers from the previous version. I built a new character to serve as player, tested a speech line, and it's still behaving the same way.

    I opened up a backed-up version of the project, built with 1.51g, almost identical in every respect with the exception of a bit of UI art changes, and the speech animation works there.

    If you'd like to take a look at the simplified version, here's an upload of the asset folder.


    I altered the subtitle menu's source to AC Prefab, and now it appears with the animation. Just seems to be the Unity UI one that causes problems.
  • Your use of Unity UI was probably the missing detail - I shall try to recreate again.
  • Open up Speech.cs, and find the function named GetPortraitSprite.

    Just before the line:
    return portraitIcon.GetAnimatedSprite (true);

    Insert the line:
    portraitIcon.GetAnimatedRect ();
  • Perfect! Thank you!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.