OnContinue once makes all subtitles play superfast

Announcements, support questions, and discussion for the Dialogue System.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: OnContinue once makes all subtitles play superfast

Post by nicmar »

Great, thanks I'll try that!
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: OnContinue once makes all subtitles play superfast

Post by nicmar »

Thanks, but the problem here is that I need to run the custom close function of the current open subtitle, which has dotween.

Is there any way to get a reference to the current subtitle, or should I use events to broadcast to all subtitles?
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnContinue once makes all subtitles play superfast

Post by Tony Li »

nicmar wrote: Mon Feb 01, 2021 2:27 pmIs there any way to get a reference to the current subtitle[?]
Yes:

Code: Select all

Subtitle currentSubtitle = DialogueManager.currentConversationState.subtitle;
StandardDialogueUI ui = DialogueManager.dialogueUI as StandardDialogueUI;
DialogueActor currentDialogueActor;
StandardUISubtitlePanel currentPanel = ui.conversationUIElements.standardSubtitleControls.GetPanel(currentSubtitle, out currentDialogueActor);
Debug.Log("Current subtitle panel is: " + currentPanel);
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: OnContinue once makes all subtitles play superfast

Post by nicmar »

Brilliant, it worked perfectly! Sorry if I asked this question before, when I read the code I recognize it.. :)

Now i just need to figure out how to show/hide the full screen skip button, but I think I have everything i need to do that. Thanks again Tony, you're the best! :)
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnContinue once makes all subtitles play superfast

Post by Tony Li »

Glad to help!

Can you show/hide it using the dialogue UI's Dialogue Panel > OnOpen() and OnClose() events?

If not, perhaps you can use the OnConversationStart and OnConversationEnd script messages or equivalent UnityEvents on the Dialogue System Events component.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: OnContinue once makes all subtitles play superfast

Post by nicmar »

I made it using a combination of those, and now it works great! Thanks again :)
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnContinue once makes all subtitles play superfast

Post by Tony Li »

Happy to help!
Post Reply