From Small dialogue UI to larger UI

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: From Small dialogue UI to larger UI

Post by Tony Li »

As a debugging measure, try adding this line to the dialogue entry's Sequence:

Code: Select all

Delay({{end}})
So the Sequence might look like this:

Code: Select all

AnimatorPlay(Fullscreen,Dialogue Panel);
Delay({{end}})
ricjonsu098
Posts: 45
Joined: Sat Jul 30, 2016 8:37 am

Re: From Small dialogue UI to larger UI

Post by ricjonsu098 »

The Delay works, can you explain what does this do?? I know that it means that it will do nothing even if there is no sequence, but it magically plays the animation on my case. Thank you, you're the man :D :)
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: From Small dialogue UI to larger UI

Post by Tony Li »

Hi,

When the Dialogue System gets to a dialogue entry, it waits until the entry's Sequence is done. When the sequence is done, the conversation progresses to the next entry.

If the Sequence field is blank, it uses the Dialogue Manager's Default Sequence, which is initially "Delay({{end}})". The Delay() command just delays for a duration. The special keyword "{{end}}" is a duration based on the length of the entry's Dialogue Text.

When your Sequence field was just this:

Code: Select all

AnimatorPlay(Fullscreen, Dialogue Panel)
it told the Dialogue Panel's Animator to play the "Fullscreen" state, and then it immediately progressed to the next entry in the conversation. This probably meant that your fullscreen state flashed onscreen for one frame (or something like that) and then was immediately hidden by the next entry.

By adding the Delay({{end}}), it also waits for a duration based on the Dialogue Text, giving your Fullscreen animation time to play. After this duration has passed, it progresses to the next entry.

A lot of sequencer commands have "Wait" variants, such as AnimatorPlayWait(). These Wait variants wait until the operation is done before ending the sequence. For example:
  • Dialogue Text: "Bro, check out my parkour!"
  • Sequence: AnimatorPlayWait(JumpAcrossBuilding)
In the example above, the conversation will wait until the speaker's JumpAcrossBuilding animator state has finished playing before progressing to the next entry in the conversation.
ricjonsu098
Posts: 45
Joined: Sat Jul 30, 2016 8:37 am

Re: From Small dialogue UI to larger UI

Post by ricjonsu098 »

Oh I see. Very informative. Thanks as always! :D
Post Reply