Page 1 of 1

Pause a conversation, run an AC cutscene, then resume a conversation?

Posted: Wed Dec 22, 2021 8:56 pm
by LostTrainDude
[Unity v2019.4.34f1 - DS v2.2.23 - AC v1.74.5]

Hi Tony!

I wanted to momentarily pause a conversation to run a specific Adventure Creator ActionList, then resume it after the ActionList is over, without having to split it in two different conversations.

Another - I assume - important thing to mention is that I'm importing Articy (v2) XML files and that In my conversation there's a Dialogue Fragment, attributed to an actual Actor, but that it's only used to start an AC ActionList from its "Stage Direction" field, with the following Sequence "required AC(ShowCoin)" (I also tried without including the "required" keyword)

The ActionList (ShowCoin) is non-skippable and what it does is:
  1. Shows an object on the screen
  2. Waits for 3 seconds
  3. Hides the object
Nevertheless, if I click the left mouse button (which is also the input that skips lines), the conversation proceeds, while the "ShowCoin" ActionList keeps running its natural flow in the background. I would be ok with either forcing to wait the end of the Cutscene or stop

Is there a way to do this? I tried registering a custom function that would run DialogueManager.Pause()\Unpause() when switching between the conversation and the Cutscene\ActionList, but it didn't work as I thought it would.

Thanks a lot in advance!

Re: Pause a conversation, run an AC cutscene, then resume a conversation?

Posted: Wed Dec 22, 2021 9:49 pm
by Tony Li
Hi,

Try this is the Stage Directions field:

Code: Select all

SetContinueMode(false);
AC(ShowCoin)->Message(Done);
SetContinueMode(true)@Message(Done)
The first line turns off the continue button, which should prevent left mouse clicks from advancing the conversation.

The second line plays your AC ActionList. When it's done, it sends the message "Done" to the sequencer.

The third line waits for the message "Done". Then it turns the continue button back on.

If you wanted to automatically advance when the ActionList is done, use this in Stage Directions:

Code: Select all

SetContinueMode(false);
AC(ShowCoin)->Message(Done);
required SetContinueMode(true)@Message(Done);
Continue()@Message(Done)
The last line simulates a continue button click as soon as the ActionList is done.

I added 'required' in front of the next-to-last line just in case Continue() runs before SetContinueMode(true).

Re: Pause a conversation, run an AC cutscene, then resume a conversation?

Posted: Thu Dec 23, 2021 7:46 am
by LostTrainDude
Hi Tony, thanks for the reply!

I tried using the last Sequence block you posted, but as you can see from the console log below, it won't just wait for the AC Cutscene to finish (it should last 3 seconds):

Image

It seems that it immediately goes to the "SetContinueMode(true)" part.

Just in case: here's the ShowCoin Cutscene ActionList

Image

EDIT:

just in case:
- The Cutscene still runs completely: I can't skip it, and it runs in the background.
- I am also using the new Unity Input System

Re: Pause a conversation, run an AC cutscene, then resume a conversation?

Posted: Thu Dec 23, 2021 8:44 am
by Tony Li
Hi,

In your screenshot of the Console window, the 3 lines that contain "Dialogue System: Sequencer.Play" are just reporting how the Dialogue System has parsed the sequence, but it isn't playing those commands yet.

The next to last line, "Dialogue System: Sequencer: AC(...", indicates that it's playing the AC actionlist at 13:39:32.

The actionlist should wait for 3 seconds, so you should see the next line, "Dialogue System: Sequencer: SetContinueMode(true)", at ~13:39:35.

I just tested the AC() sequencer command here, and it does indeed wait for the actionlist to finish before sending the "Done" message to the Dialogue System's sequencer.

It is possible that the actionlist is actually finishing early for some reason?

If not, would it be possible for you to send a reproduction project to tony (at) pixelcrushers.com?

Re: Pause a conversation, run an AC cutscene, then resume a conversation?

Posted: Thu Dec 23, 2021 12:36 pm
by LostTrainDude
Hi Tony!
I have sent you an email at that address just now.

Thanks a lot and, please, take your time!

Re: Pause a conversation, run an AC cutscene, then resume a conversation?

Posted: Thu Dec 23, 2021 9:22 pm
by Tony Li
Hi Chris,

Thanks for sending the reproduction project. I checked it and replied to your email.