Page 2 of 2

Re: Wait for hide animation before showing line

Posted: Tue Aug 20, 2019 8:27 pm
by Tony Li
Someone asked a related question in email, so I thought I'd post another example:

DS_FadeBetweenNodesExample_2019-08-20.unitypackage

This example scene shows two ways to hide subtitle panels with a pause between each node:

1. Using SetDialoguePanel() to hide the dialogue UI and then show it. The conversation properties override the Dialogue Manager's Default Sequence to do this.

2. Using an empty node to delay between each text node, and setting the subtitle panel to only show during content. The conversation properties also override the Dialogue Manager's settings, and it uses an Override Dialogue UI component to use a dialogue UI whose subtitle panel's Visibility is set to Only During Content.

Re: Wait for hide animation before showing line

Posted: Wed Aug 21, 2019 2:40 pm
by alfa995
Oh the SetDialoguePanel() solution is pretty interesting, thank you! The option to choose between hiding instantly or playing the hide animation is relatively new, right?

I ended up creating my own custom solution though, since I needed a bunch of other specific things. For example, I only wanted to hide the panel when the character who's speaking changes. I also needed the text to only start typing after the show animation is done, not when it starts. That seems to be the standard in most games like Paper Mario and Celeste, but there were no settings for that in DS. My solution works but it's honestly hacky and limited, it only works with a single subtitle panel shared by PC and all NPCs, and I can't have custom panels for specific NPCs or anything like that.

Re: Wait for hide animation before showing line

Posted: Wed Aug 21, 2019 3:06 pm
by Tony Li
alfa995 wrote: Wed Aug 21, 2019 2:40 pmOh the SetDialoguePanel() solution is pretty interesting, thank you! The option to choose between hiding instantly or playing the hide animation is relatively new, right?
The 'immediate' keyword was added in version 2.1.8 (released July 1).
alfa995 wrote: Wed Aug 21, 2019 2:40 pmI ended up creating my own custom solution though, since I needed a bunch of other specific things. For example, I only wanted to hide the panel when the character who's speaking changes. I also needed the text to only start typing after the show animation is done, not when it starts. That seems to be the standard in most games like Paper Mario and Celeste, but there were no settings for that in DS. My solution works but it's honestly hacky and limited, it only works with a single subtitle panel shared by PC and all NPCs, and I can't have custom panels for specific NPCs or anything like that.
To make the panel hide only when the speaker changes, set the Visibility to Until Superceded. In the upcoming version 2.2.0, there's an option to delay the typewriter until the Show and Focus animations are done.

Re: Wait for hide animation before showing line

Posted: Wed Aug 21, 2019 6:12 pm
by alfa995
The Until Superceded option seems to work well but not if several NPCs share the same generic subtitle panel. I guess a workaround would be to add several copies of the panel and assign one to each NPC if there's several of them in a conversation?
Looking forward to the delay functionality in the next version! Hopefully it will be easy to extend for Super Text Mesh too, if it's a delegate like with the {{end}} keyword it'd just be a matter of calling a method to rebuild the mesh so it wouldn't be a problem.

Re: Wait for hide animation before showing line

Posted: Thu Aug 22, 2019 3:31 am
by nicmar
I'll be using this for the StandarddUISubtitlePanel, so I don't think I can use the code above for this, but it seems to have similar functions, so I'll try my best to make a custom subclass of that and post it here if it works. :)

Re: Wait for hide animation before showing line

Posted: Thu Aug 22, 2019 8:36 am
by Tony Li
@nicmar - What post are you referring to? The example in this post doesn't use any custom code. It just uses built-in Dialogue System features.

Re: Wait for hide animation before showing line

Posted: Thu Aug 22, 2019 9:26 am
by nicmar
Sorry, I think i confused it with another post about adding a Skipbutton. I'm getting very close to this working now. Now it's just some tweaking where the typewriter starts before the bubble is open, but I think you mentioned that there will be a feature for that in the new version?

And you're right, currently everything works without any code, just the sequence.
If I want to add a slight delay after the text is presented, but before it hides, should this work for a 2 second delay?

Code: Select all

SetDialoguePanel(false)@{{end}}->Message(Wait); 
Delay(2)@Message(Wait)->Message(Hid); 
Delay(1)@Message(Hid)->Message(Delayed); 
SetDialoguePanel(true)@Message(Delayed)
Btw, it wouldn't hurt if the sequence editor was a multiline editor. I usually copy/paste between another text editor. :)

Re: Wait for hide animation before showing line

Posted: Thu Aug 22, 2019 10:09 am
by Tony Li
Yes, that should work. And I noticed that Override Display Settings > Default Sequence was only a single-line text field while adding 2.2.0 updates. It drove me crazy, so I fixed it. :-)