Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Lion on December 01, 2006, 10:57:34 AM

Title: How to make that the animation of conversation consisting of 3 parts?
Post by: Lion on December 01, 2006, 10:57:34 AM
How to make that the animation of conversation consisting of 3 parts was play:

- the beginning of conversation,

- looped animation of conversation

- and the termination of conversation?
Title: Re: How to make that the animation of conversation consisting of 3 parts?
Post by: Mac on December 01, 2006, 03:33:07 PM
You mean talk sprites, right?

There is a method called ".ForceTalkAnim()". So if you want to have your actor using special animations at the start and the end of your dialogue try something like this:

Code: [Select]
actor.SetTalkSprite("LoopedAnimation.sprite");
actor.ForceTalkAnim("BeginningAnimation.sprite");
actor.Talk("This is the start.");
actor.Talk("Here I talk using the looped animation.");
actor.Talk("Here again.");
actor.ForceTalkAnim("EndAnimation.sprite");
actor.Talk("This is the end. Good bye.");

It only works for the talkline directly following the ".SetTalkAnim" call.
I hope that's what you wanted to know.

Mac
Title: Re: How to make that the animation of conversation consisting of 3 parts?
Post by: Drax on December 01, 2006, 03:50:19 PM
Quote
It only works for the talkline directly following the ".SetTalkAnim" call.

Mac means the .ForceTalkAnim call. just to avoid misunderstandings.

I used to define own functions like Talk_wildarticulation('text') or Talk_reallysad('text') to capsulate the two function calls and not allways have to remenber my sprite names (but my functionnames  ::) , maybe I have to reconsider this  ;))
Title: Re: How to make that the animation of conversation consisting of 3 parts?
Post by: Lion on December 01, 2006, 03:59:13 PM
The beginning + a cycle, works.

actor.ForceTalkAnim("BeginningAnimation.sprite");
actor.Talk("Text");
actor.PlayAnim("EndAnimation.sprite");

And with the end of talk of a problem, it is play any not correct animations.
Between actor.Talk("Text") and actor.PlayAnim("EndAnimation.sprite") probably stand animation shows...
Title: Re: How to make that the animation of conversation consisting of 3 parts?
Post by: Mac on December 03, 2006, 10:56:02 AM
Yes, WME flips back to the stand sprite between two animations. You have to create an extra temporary sprite with the start frame of your end animation. Then you change your code as follows:

Code: [Select]
actor.ForceTalkAnim("BeginningAnimation.sprite");
actor.SetSprite("TheNewSprite.sprite");   // Force a temporary stand sprite
actor.Talk("Text");
actor.PlayAnim("EndAnimation.sprite");
actor.SetSprite(null);  // The stand animation resets to your default

You may try it. In most scenes of our game it works. In some scenes not. Don't know why.

Mac
Title: Re: How to make that the animation of conversation consisting of 3 parts?
Post by: Lion on December 04, 2006, 11:41:24 AM
Yes, this scheme works, but only for entity. For actors, all the same does not work.

After of function Talk(), on a share of second appears the frame of animation "stand".
But only then sprite, which have established through SetSprite(). Looks very badly.

In general SetSprite() for the actor, works not absolutely correctly.

Old animation "stand", from time to time appears again on a share of second.

It is possible for something to make with it? The help of the guru is necessary.