Hi everyone,
I am trying to achieve this but for some reason not being able to make this work.
I basically want to play the talking animation while the speaker is talking.
When I use AnimatorBool() or Play or PlayWait it plays the talk for like a split second and then goes back to idle. I am clearly doing something wrong, can you guys help me out!
Also, I'm using this integrated with Adventure Creator, not sure it matters.
Cheers,
Trigger animations?
Re: Trigger animations?
Hi,
If you're using AC, you have a lot of options. If you've set up your characters with any of AC's lipsync configurations, you can use the ACSpeech() sequencer command described in the AC section of the Dialogue System documentation.
Otherwise, let's say you have two animation states, "Idle" and "Talk", where Talk moves the character's mouth up and down, with no transition arrow from Talk to Idle. Try this Sequence:
This plays the Talk state right away. After a duration based on the text length, it plays the Idle state. The required keyword guarantees that it plays the Idle at the end even if the player skips ahead.
Since there's no transition arrow from Talk to Idle, it won't automatically switch back to Idle before you explicitly tell it to.
If you're using AC, you have a lot of options. If you've set up your characters with any of AC's lipsync configurations, you can use the ACSpeech() sequencer command described in the AC section of the Dialogue System documentation.
Otherwise, let's say you have two animation states, "Idle" and "Talk", where Talk moves the character's mouth up and down, with no transition arrow from Talk to Idle. Try this Sequence:
Code: Select all
AnimatorPlay(Talk); required AnimatorPlay(Idle)@{{end}}
Since there's no transition arrow from Talk to Idle, it won't automatically switch back to Idle before you explicitly tell it to.
Re: Trigger animations?
Hi Tony,
Thanks for the quick feedback as usual.
I have create a duplicate talking state (as I need one for arrows) with no connections and it works, however it transitions very abruptly to the idle state now as it's not using the mecanim config with transition.
I looked into the docs and it seems this play function takes a crossfade argument but it's not working for me.
Any idea what it might be?
Thanks!
Thanks for the quick feedback as usual.
I have create a duplicate talking state (as I need one for arrows) with no connections and it works, however it transitions very abruptly to the idle state now as it's not using the mecanim config with transition.
I looked into the docs and it seems this play function takes a crossfade argument but it's not working for me.
Any idea what it might be?
Thanks!
Re: Trigger animations?
Okay so it seems that what's happening is that both talking and idle are running at the same time.
Doesn't AnimatorPlay stop the other state after the call?
Doesn't AnimatorPlay stop the other state after the call?
Re: Trigger animations?
More investigation.
It like there is some sort of caching going here. Before it wasn't working but now it's changing to idle. However once I update the crossfade time nothing happens.
It's as if the changes take a while to take effect. Am I doing something wrong probably?
It like there is some sort of caching going here. Before it wasn't working but now it's changing to idle. However once I update the crossfade time nothing happens.
It's as if the changes take a while to take effect. Am I doing something wrong probably?
Re: Trigger animations?
Hi,
Double check the syntax. The crossfade duration is the third parameter:
It may be useful to temporarily set the Dialogue Manager's Debug Level to Info. When it gets to the sequencer command, it will report what it's using as the value of each parameter.
Double check the syntax. The crossfade duration is the third parameter:
Code: Select all
AnimatorPlay(Talk, speaker, 0.5)
Re: Trigger animations?
Hi Tony,
I managed to workaround this.
Basically for some reason, it seems that DS settings don't get saved sometimes, although I see them in the UI.
Say for example I change crossfade to 10 and I see no difference. I mess around trying to find out what's wrong and when I get to the inspector of that item (after a while) it still shows me the old config. I change it to 10 again and it now works. This has happened to me several times with DS on a number of occasions. The Editor shows me the change applied but it's actually not and only after a while will I see it's not applied in the editor.
That's why I thought it was cache initially. Any idea why this happens?
Cheers
I managed to workaround this.
Basically for some reason, it seems that DS settings don't get saved sometimes, although I see them in the UI.
Say for example I change crossfade to 10 and I see no difference. I mess around trying to find out what's wrong and when I get to the inspector of that item (after a while) it still shows me the old config. I change it to 10 again and it now works. This has happened to me several times with DS on a number of occasions. The Editor shows me the change applied but it's actually not and only after a while will I see it's not applied in the editor.
That's why I thought it was cache initially. Any idea why this happens?
Cheers
Re: Trigger animations?
Hi,
Please make sure you're using version 1.6.5+ of the Dialogue System. There was a bug in earlier versions that caused this issue in the Dialogue Editor window.
Please make sure you're using version 1.6.5+ of the Dialogue System. There was a bug in earlier versions that caused this issue in the Dialogue Editor window.