Assigning characters for sequences

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
harelme2
Posts: 9
Joined: Wed Dec 15, 2021 11:37 am

Assigning characters for sequences

Post by harelme2 »

Hi,

I'm trying to use camera() in a sequence, but I can't seem to figure out how to assign the characters in the scene so that the camera() will know where to look at.
I figured that if I have the Dialogue Actor component with the Actor's name assigned to both characters, and since the Conversation has the Actor and Conversant specified, then that would be enough to get the loop closed, but it's not, and I'm kinda lost..

Please advise.

Thx!
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Assigning characters for sequences

Post by Tony Li »

Hi,

If the sequence is part of a conversation, it will be helpful to know which GameObjects are being used as the active conversation's Conversation Actor and Conversation Conversant. For info, see Character GameObject Assignments.

Each dialogue entry has a speaker (entry's actor) and listener (entry's conversant).

When you want to a sequencer command such as Camera() to refer to a character, you can use:
  • The special keywords 'speaker' or 'listener' such as: Camera(Closeup, speaker)
  • Or an actor name that matches a GameObject's Dialogue Actor component such as : Camera(Closeup, Player)
  • Or a GameObject name: Camera(Closeup, PlayerControllerObject)
You can also make the camera match the position of a GameObject in the scene, such as: Camera(Corner Of Room)
harelme2
Posts: 9
Joined: Wed Dec 15, 2021 11:37 am

Re: Assigning characters for sequences

Post by harelme2 »

I'm not sure, but I think the sequence is part of a conversation, yes -
Screenshot 2021-12-23 225354.png
Screenshot 2021-12-23 225354.png (80.4 KiB) Viewed 340 times
The Dialogue System Trigger which starts the conversation has the matching GameObjects for Ben and Seller assigned as the Conversation Actor and Conversation Conversant -
Screenshot 2021-12-23 225810.png
Screenshot 2021-12-23 225810.png (28.21 KiB) Viewed 340 times
What am I doing wrong?
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Assigning characters for sequences

Post by Tony Li »

Hi,

Thanks for the screenshot. Yes, that's in a conversation. The speaker is Ben, and you've assigned the Ben GameObject to the Dialogue System Trigger's Conversation Actor, so that's all good.

When the "Hi" dialogue entry plays, it will move the camera to this position relative to the Ben GameObject:

Image

A couple of notes:
  • If you're forcing response menus to show for player entries (blue nodes), the sequence won't play until the player clicks the "Hi" response button. If you don't want to do this, then:
    • Inspect the Dialogue Manager GameObject and UNtick Display Settings > Input Settings > Always Force Response Menu.
    • Tick Subtitle Settings > Show PC Subtitles During Line.
  • If your camera has a script that controls it position every frame, such as a typical Mouse Look script, you'll need to disable the script during conversations. To disable scripts during conversations, please see the bottom part of the Interaction Tutorial. (Briefly, add a Dialogue System Events component to Ben, configure OnConversationStart() to disable the script, configure OnConversationEnd() to re-enable it.
harelme2
Posts: 9
Joined: Wed Dec 15, 2021 11:37 am

Re: Assigning characters for sequences

Post by harelme2 »

Using a new camera as the Sequencer Camera solved it. Thx!

But how can I use the camera I already have as the Sequencer Camera if I'm using Cinemachine?
Alternatively, how can I have the new camera enabled when the Conversation starts and disabled when it ends?
harelme2
Posts: 9
Joined: Wed Dec 15, 2021 11:37 am

Re: Assigning characters for sequences

Post by harelme2 »

Noticed the SetActive() sequencer command. Used that for deactivating the camera at the end of the sequence.
Thx!
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Assigning characters for sequences

Post by Tony Li »

Glad you got it working! :-)
Post Reply