Sequences without requiring dialogue

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Sequences without requiring dialogue

Post by MilziPPG »

Hi Tony,

I've got a follow up question about sequences that I asked the other day. So it all works swimmingly well, but I have got an example that I'd like to try out and not sure if it's possible.

Is it possible to play a sequence without any dialogue attached to it? Or would I have create a timeline for that to happen? So the example I had in mind would be the player presses a switch, then the camera pans over to a door, the door then plays its animations to open, then the camera returns to the player.

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

Re: Sequences without requiring dialogue

Post by Tony Li »

Hi,

Sure, use a Dialogue System Trigger, and select Add Action > Play Sequence.

To control the camera, use CinemachinePriority() sequencer commands. For example, the sequence could be something like:

Code: Select all

CinemachinePriority(DoorCam, 99);
AnimatorPlay(Open,Door)@1;
Audio(DoorCreakOpen)@1;
CinemachinePriority(DoorCam, 0)@2
Or, if you want to use the Cinemachine Camera Priority On Dialogue Event component, set the trigger dropdown to OnSequence.
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Sequences without requiring dialogue

Post by MilziPPG »

That's exactly what I thought you could do but it just turned out that I had forgotten to put a semi-colon at the end of one of the sentences so none of it was working! It's both a joy and a curse when you fix something super small like that!

There's actually a follow up to this, thinking about it. When the player is in the middle of dialgoue, they are unable to move. Is it possible to have the player unable to move while a sequence without dialogue is playing?

Thank you for your help!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Sequences without requiring dialogue

Post by Tony Li »

Hi,

Try this:

1. Add a Pause TopDown During Conversation component to the Dialogue System Trigger GameObject.

2. Use this sequencer command to pause:

Code: Select all

SendMessage(Pause)
and this one to unpause at the end:

Code: Select all

SendMessage(Unpause)
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Sequences without requiring dialogue

Post by MilziPPG »

Gosh Tony,

You've clearly thought of everything! I have a couple of more questions that I'd like to ask you which I'll do in and then I think I should be good for a while! But I'll do that in a new post later.

Thank you again!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Sequences without requiring dialogue

Post by Tony Li »

Sounds good! Glad to help.
Post Reply