Typewriter effect continues to play after StopConversation()
Posted: Tue Jul 24, 2018 7:08 am
by devalus
Hi Tony!
I came across a bug in my game I haven't been able to solve so I'm hoping you can help direct me to the right place.
I'm using the Textline extra and added the typewriter effect to NPC and Player subtitles.
On top of that I also included a smooth scrolling script during JumpToBottom() so the transition occurs smoothly instead of instantly.
The problem I'm having is that when I exit the dialogue scene (while the text is still being generated & typewriter still in effect) to the title scene (calling StopConversation() and LoadScene()), I get multiple warnings of "cannot play a disabled audio source" and error from my smooth scrolling script: "Coroutine couldn't be started because the game object 'Scroll Rect' is inactive!"
Is there a way to disable the typewriter effect, or have it complete instantly when stopping the conversation?
Please let me know if you need me to include any scripts or information. Thank you as always
Cheers,
Amy
Re: Typewriter effect continues to play after StopConversation()
Posted: Tue Jul 24, 2018 8:15 am
by Tony Li
Hi Amy,
I'll be publishing a patch today that adds a "Stop On Conversation End" checkbox to the typewriter effect. The change will also be in the next full release (2.0.3). If you'd like to download the patch and don't yet have access to the Pixel Crushers customer download site, please PM me your Unity Asset Store invoice number.
Re: Typewriter effect continues to play after StopConversation()
Posted: Tue Jul 24, 2018 11:20 pm
by Tony Li
The patch is available on the customer download site. After backing up your project and importing the patch, inspect the subtitle text elements. On the typewriter effect, you should see a new checkbox that you can tick called Stop On Conversation End. If that doesn't resolve the issue, let me know.
Re: Typewriter effect continues to play after StopConversation()
Posted: Wed Jul 25, 2018 2:08 pm
by devalus
Thanks Tony,
So I''m in the process of updating my Dialogue System to V2 (and also the new Textline addon) so I can try out the patch, but I'm running into a bug. Note on top of Textline I'm also using the process you helped me with a while back to load the next conversation:
This is so that the player can navigate to logs of past conversations and come back to the live one. This was working well before I updated. However now when I navigate to past conversations then back to live, it will show all the past conversations PLUS the most recent one.
In other words what I want is:
[convo1 btn] -> convo1
[convo2 btn] -> convo2
[convo3 btn] -> convo3
Did the new TextlineDialogueUI.cs include a change that could have caused this effect?
Sorry for all the problems, thanks for your ongoing help
Cheers,
Amy
Re: Typewriter effect continues to play after StopConversation()
Posted: Wed Jul 25, 2018 2:47 pm
by Tony Li
Hi Amy,
I dropped the lobby example from the new Textline. I'll need to update it.
I don't think anything should have changed that behavior, but the new TextlineDialogueUI did change pretty significantly. It's not based on the Standard Dialogue UI system, not Unity UI Dialogue UI.
I'll check this out when I investigate the other issue.
Re: Typewriter effect continues to play after StopConversation()
Posted: Thu Jul 26, 2018 3:54 pm
by Tony Li
Hi Amy,
Sorry that took so long! You can download the 2018-07-26 version from the Extras page or right here.
Please also import the menu framework version 2018-07-20 if you haven't already.
At the bottom of the Textline documentation, I included the steps I used to set up a lobby scene in a test project.
Re: Typewriter effect continues to play after StopConversation()
Posted: Fri Jul 27, 2018 7:06 am
by devalus
Hi Tony,
Not a problem, thanks for the patch
This solved the "WaitForMessage(Forever)" issue and I can now include sequences on the same entry!
Regarding the dialogue accumulation problem, it's solved for the most part except for a bug I was able to continuously reproduce. I can't explain it well so I made a recording of the effect, it starts to happen from 00:24 onwards:
The dialogue line seems to duplicate when you navigate back and forth from different conversations. It shows up more consistently when you change conversations while one is still running... I think? I''m also getting a warning when I switch convos, but this doesn't happen in my main game so not sure what's causing it.
Re: Typewriter effect continues to play after StopConversation()
Posted: Fri Jul 27, 2018 9:57 am
by Tony Li
Hi Amy,
I think we're just having some version issues. Would you be willing to use the latest versions of the Dialogue System, Menu Framework, and Textline, and set up the Dialogue Manager GameObject to use the latest scripts? If so, I'll send you an example lobby scene that's set up for those versions. The latest Textline now uses SaveSystem instead of GameSaver, and AutoSaveLoad moved into the PixelCrushers namespace (not PixelCrushers.DialogueSystem).
Otherwise, I think these steps might work:
1. Import any Dialogue System 2.x, Menu Framework 2018-07-20, and Textline 2018-07-26.
2. Edit LobbyMenuButtons.cs and replace this line:
I'll go ahead and put together a lobby example in the hope that you'll be able to use it.
Re: Typewriter effect continues to play after StopConversation()
Posted: Fri Jul 27, 2018 10:57 am
by devalus
Hey Tony,
I am on Dialogue System 2.0.2 with latest versions of Menu Framework and Textline.
However I didn't realize there's a new SaveSystem so I updated my set up to the new configuration, the bug is still present though:
01-min.jpg (238.27 KiB) Viewed 988 times
This is what I'm using to navigate between conversations:
public void LoadNewConvo(string convo) {
var dialogue = FindObjectOfType<DialogueSystemController>();
dialogue.GetComponent<SaveSystem>().SaveGameToSlot(0);
dialogue.StopConversation();
DialogueLua.SetVariable("Conversation", convo);
dialogue.GetComponent<LevelManager>().LoadLevel(1);
}
Let me know if there's something wrong with it, or if I should upload my new package.
Cheers,
Amy
Re: Typewriter effect continues to play after StopConversation()