Wintermute Engine Forum

Wintermute Engine => Bug reports => Not a bug => Topic started by: greg on April 04, 2008, 07:51:44 PM

Title: Actor.TalkAnimName
Post by: greg on April 04, 2008, 07:51:44 PM
I'd posted about this in the Technical forum, and it looks like a bug (rather than user error on my part), so I'm posting it here:

=

When using TalkAnimName to change the talk animation for a character, whatever value I set TalkAnimName to, the character still speaks with the default talk animation.

Code: [Select]
Game.Msg(Ego.TalkAnimName);     // This prints "talk" which corresponds with the TALK animation set in ego.actor
Ego.Talk("Hello.");             // Ego should (and does) say this with the TALK animation set
Ego.TalkAnimName = "talk2";     // talk2 is another animation set in ego.actor
Game.Msg(Ego.HasAnim("talk2")); // This prints "true"
Ego.Talk("Hello, again.");      // Ego says this with the TALK animation set, not talk2

I can change the talk animation with Actor.ForceTalkAnim(), just not Actor.TalkAnimName.

Thanks!
Greg
Title: Re: Actor.TalkAnimName
Post by: Mnemonic on April 05, 2008, 01:52:34 PM
I tried it and it works ok. Keep in mind you must not combine the old and the new way of defining talking animations. Your .actor file should contain something like this:

Code: [Select]
  ...
; ----- this is the default talking animation 
  ANIMATION
  {
    NAME       = "talk"
    ...   
  }

; ----- this is the special talking animation 
  ANIMATION
  {
    NAME       = "talk2"
    ...
  }
  ...

If you use the old way of definiting actor animations (TALK { ... }), the actor switches back to the old behaviour (for backward compatibility) and the actor.TalkAnimName property will have no effect. I assume that's your case.