Play the speaker animation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Play the speaker animation

Post by hrohibil »

Hey Tony


Two questions

1:
When I enter a conversation I want to Play the speaker animation?

2:
Can I control the closeup camera of the speaker? It’s to close I want a bit back
Br Hamid
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Play the speaker animation

Post by Tony Li »

hrohibil wrote: Wed Oct 04, 2023 1:50 pm1: When I enter a conversation I want to Play the speaker animation?
What kind of animation? An intro animation? Lipsync animation? In general, you'll use the Animator***() sequencer commands such as AnimatorPlay(). But if you're doing lipsync, it might be SALSA() or LipSync() or something similar.
hrohibil wrote: Wed Oct 04, 2023 1:50 pm2: Can I control the closeup camera of the speaker? It’s to close I want a bit back
Yes. You can define a new camera angle or adjust the existing Closeup angle. More info: Camera Angles
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: Play the speaker animation

Post by hrohibil »

Thank you Tony.

Its just the animator already on the speaker running i want to play.

Also how do i add two statemetns in the script?
So in below code i add the varialbel to true but i also want to add item to the invector player?

Code: Select all

Variable["hasKey"] = true
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: Play the speaker animation

Post by hrohibil »

Tony see image

My play animation on from node do not work. NPC is just stationary.
I have only have a one animation on it i called convo.

When player enters trigger zone the conversation starts and in a node i want the NPC to play


User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Play the speaker animation

Post by Tony Li »

The Animator window shows that "convo" is the default animation state, so it should already be playing on FemaleGunSeller as soon as you start the scene. If it's not, then the problem is with the animation or the Animator, not with the Dialogue System.
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: Play the speaker animation

Post by hrohibil »

Yes it is the default animation which runs in the beginning of the scene, but i have a trigger that disables the NPC gameobject if Player is not near it.

And the animation plays fine right up until the player starts the conversation, then NPC is just stationary
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Play the speaker animation

Post by Tony Li »

On your Dialogue System Trigger, is Actions > Start Conversation > Pause Game During Conversation ticked? If so, this will pause the game, including animations. You could set the NPC's Animator > Update Mode to Unscaled, but then it would animate whenever you pause the game, such as when you open a pause menu. Instead, it might be better to UNtick Pause Game During Conversation.
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: Play the speaker animation

Post by hrohibil »

Tony I tested on a dialogue system trigger where I add the command in the add action then add a sequence, that worked.

But when I add the command inside a node in a conversation it does not.

During conversation I do want to pause game just not the NPC or maybe even another GameObject animation..

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

Re: Play the speaker animation

Post by Tony Li »

When you pause the game, it pauses the game -- including everything, except Animators whose Update Modes are set to Unscaled. You will need to choose whether you want to pause the game or change your Animator(s) to Unscaled.
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: Play the speaker animation

Post by hrohibil »

Thank you.
Seems like un-scaled is the way to go here.
Post Reply