I have a question about ConditionObserver.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Ryoh
Posts: 9
Joined: Wed Jul 28, 2021 1:46 am

I have a question about ConditionObserver.

Post by Ryoh »

Hi, I have a question about ConditionObserver.

I attached ConditionObserver to object.
I set a variable as a condition, like Variable["something"] == true.
Then I set a sequence like AnimatorBool(AnimParameterName, true).
The object ConditionObserver attached has Animator, so I think AnimParameterName becomes true
when variable "something" is true, but it doesn't.

Do I miss something?
Maybe the object should be speaker or listener? Then how should I set the object as speaker or listener?

Thanks.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: I have a question about ConditionObserver.

Post by Tony Li »

Hi,

ConditionObserver doesn't provide a way to specify a default subject, so you'll need to provide the subject to AnimatorBool(). Example:

AnimatorBool(AnimatorParameterName, true, SomeGameObjectName)
Ryoh
Posts: 9
Joined: Wed Jul 28, 2021 1:46 am

Re: I have a question about ConditionObserver.

Post by Ryoh »

It worked!
Thanks Tony!
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: I have a question about ConditionObserver.

Post by Tony Li »

Glad to help! :-)
Post Reply