No Animator component found

Announcements, support questions, and discussion for the Dialogue System.
bloud
Posts: 10
Joined: Mon Oct 28, 2024 9:30 am

No Animator component found

Post by bloud »

I use DS_AnimatedPortraitExample_2020-03-29 and add a new conversation
I want each actor's animations to be assigned at once(now only Talk&Idle)
But something went wrong

in Dialogue Manager
24110301.png
24110301.png (24.02 KiB) Viewed 121 times
in new conversation, Sequence is null


It can't be found like this
24110302.png
24110302.png (20.82 KiB) Viewed 120 times
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: No Animator component found

Post by Tony Li »

When you animate portraits, you must specify the portrait image (speakerportrait), not the character (Yellow Wizard):

speakerportrait.png
speakerportrait.png (38.71 KiB) Viewed 118 times

Use this sequence:

Code: Select all

AnimatorPlay(Talk, speakerportrait);
required AnimatorPlay(Idle, speakerportrait)@Message(Typed)
bloud
Posts: 10
Joined: Mon Oct 28, 2024 9:30 am

Re: No Animator component found

Post by bloud »

The animation is ok now!
But the event can't run :?

I use this in Default Sequence:
  • AnimatorBool(isTalk, true, speakerportrait);
    required AnimatorBool(isTalk, false, speakerportrait)@Message(Typed);
I set it up like this
24110301.png
24110301.png (44.53 KiB) Viewed 98 times
but when my conversation finish , GameObject is not setactive
bloud
Posts: 10
Joined: Mon Oct 28, 2024 9:30 am

Re: No Animator component found

Post by bloud »

Besides, can the next conversation inherit the changes about animation from the previous one?

For example:I change Idel animation to SmileIdel , I want the next one's Idel also becomes SmileIdel (still use bool to control its own idel and talk)
Attachments
24110402.png
24110402.png (15.61 KiB) Viewed 96 times
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: No Animator component found

Post by Tony Li »

Hi,
bloud wrote: Mon Nov 04, 2024 4:26 amThe animation is ok now!
But the event can't run :?
Move the Dialogue System Events component to the conversation actor or conversant GameObject. (See Character GameObject Assignments.) Only these two GameObjects and the Dialogue Manager GameObject will receive "OnConversationStart" and "OnConversationEnd" messages.
bloud wrote: Mon Nov 04, 2024 4:52 am Besides, can the next conversation inherit the changes about animation from the previous one?
I recommend using the animator controller for this. For example: create a Boolean animator parameter. Configure the animator state transitions to check this parameter.
bloud
Posts: 10
Joined: Mon Oct 28, 2024 9:30 am

Re: No Animator component found

Post by bloud »

Move the Dialogue System Events component to the conversation actor or conversant GameObject. (See Character GameObject Assignments.) Only these two GameObjects and the Dialogue Manager GameObject will receive "OnConversationStart" and "OnConversationEnd" messages.
It can run but not after the end
I want the gameobject setactive after the conversation finish,but now it happened when the last one running
2024110501.png
2024110501.png (83.15 KiB) Viewed 57 times
I recommend using the animator controller for this. For example: create a Boolean animator parameter. Configure the animator state transitions to check this parameter.
Do you mean changing the bool value in the same animator controller?
I write it like this
2024110502.png
2024110502.png (24.6 KiB) Viewed 57 times
  • AnimatorBool(smile, true, speakerportrait);
  • AnimatorBool(isTalk, true, speakerportrait);
  • required AnimatorBool(isTalk, false, speakerportrait)@Message(Typed)
But the animation's changing need a little time,so it looks like that the animation changes when the actor is talking(maybe so ,I'm not really sure)
2024110505.png
2024110505.png (13.97 KiB) Viewed 57 times
And when the new conversation begin,it still NormalIdel animation ,not the SmileIdel one

Should I change the actor's animator controller to new one?
If I should ,how can I get the components?
I can't get Portrait Animator Controller to change by using Animator
2024110503.png
2024110503.png (49.87 KiB) Viewed 57 times
When I write public Animator animator ,only thing I can chose are the following
2024110504.png
2024110504.png (8.26 KiB) Viewed 57 times
And if I chose Portrait Image 1 to change ,the program report says it's null,I still can't get it
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: No Animator component found

Post by Tony Li »

bloud wrote: Tue Nov 05, 2024 8:42 am
Move the Dialogue System Events component to the conversation actor or conversant GameObject. (See Character GameObject Assignments.) Only these two GameObjects and the Dialogue Manager GameObject will receive "OnConversationStart" and "OnConversationEnd" messages.
It can run but not after the end
I want the gameobject setactive after the conversation finish,but now it happened when the last one running
A dialogue entry's OnExecute() event will run as soon as the conversation gets to that dialogue entry.

If you want to do something when a conversation has ended, you must use OnConversationEnd. To do this, you can put a Dialogue System Events components on the actor or conversant GameObject.

Alternatively, you can make a blank node at the end for the OnExecute() event:

sceneEventAtEndOfConversation.png
sceneEventAtEndOfConversation.png (138.75 KiB) Viewed 52 times

Note that I used "Continue()" in the Sequence field.

For the animator, this looks correct:

Code: Select all

AnimatorBool(smile, true, speakerportrait);
You may need to do it at the beginning of the conversation when starting a new conversation.

If it's not happening immediately, check the animator controller's transition arrow. UNtick Has Exit Time.

If you want to remember that this animator parameter is true, create a Boolean variable in your dialogue database -- for example: "Smile".

Then use this sequence:

Code: Select all

AnimatorBool(smile, [var=Smile], speakerportrait);
You can set the value of Smile to true or false in the Script field:

Code: Select all

Variable["Smile"] = true
bloud
Posts: 10
Joined: Mon Oct 28, 2024 9:30 am

Re: No Animator component found

Post by bloud »

If you want to do something when a conversation has ended, you must use OnConversationEnd. To do this, you can put a Dialogue System Events components on the actor or conversant GameObject.

Alternatively, you can make a blank node at the end for the OnExecute() event:
Note that I used "Continue()" in the Sequence field.
Because I set the continue button always,so I use both SetContinueMode(false) and Continue()
So should I write SetContinueMode(true) on next conversation or I can change it on this one?
Or is there any way to make only this one's continue button disappear?
20241106000813.png
20241106000813.png (49.65 KiB) Viewed 47 times
20241106000940.png
20241106000940.png (31.48 KiB) Viewed 47 times
This is mainly used to control player's moving( use public enum CharacterState ,only when CharacterState is
isMove ,the player can move.When the conversation begin, let the value to isTalk. When it finish, let the value to isMove.)
Is there any other simpler way to do it besides assigning values?(For example, setting it once on Dialogue Manger without having to set it for every conversation
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: No Animator component found

Post by Tony Li »

If you want to stop the player's movement during conversations, I recommend that you use Dialogue System Events as shown at 07:00 of the Interaction Tutorial.
bloud
Posts: 10
Joined: Mon Oct 28, 2024 9:30 am

Re: No Animator component found

Post by bloud »

Tony Li wrote: Tue Nov 05, 2024 1:49 pm If you want to stop the player's movement during conversations, I recommend that you use Dialogue System Events as shown at 07:00 of the Interaction Tutorial.
Oh I forget it :?
Its runnung now
But how can I do to hid the bark & stop the trigger's checking?

About the bark:
20241109163335.png
20241109163335.png (4.9 KiB) Viewed 15 times
About the checking:
Now if I set the space button down when the conversation is running,it will report this error
20241109163916.png
20241109163916.png (68.54 KiB) Viewed 15 times
Post Reply