Page 1 of 1

Sequences without requiring dialogue

Posted: Sun Jun 30, 2019 12:43 pm
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!

Re: Sequences without requiring dialogue

Posted: Sun Jun 30, 2019 3:19 pm
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.

Re: Sequences without requiring dialogue

Posted: Mon Jul 01, 2019 1:28 pm
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!

Re: Sequences without requiring dialogue

Posted: Mon Jul 01, 2019 3:09 pm
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)

Re: Sequences without requiring dialogue

Posted: Wed Jul 03, 2019 4:35 am
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!

Re: Sequences without requiring dialogue

Posted: Wed Jul 03, 2019 8:50 am
by Tony Li
Sounds good! Glad to help.