Delay Scene Event

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fr4231
Posts: 20
Joined: Sun Nov 28, 2021 9:44 am

Delay Scene Event

Post by fr4231 »

Hi,

Is there any way to delay the execution of scene events?
Right now when the node starts to play the linked scene events are getting executed, but I would like the node to play then wait a second and execute the events, is it possible?

A simple example:
During conversations would hide the game UI and turn it back on once the conversation is over, but only after the last node has played and the dialogue UI disappeared.

Thanks in advance!
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Delay Scene Event

Post by Tony Li »

Hi,

You can add an empty node that waits 1 second, then link that to the node with the scene events.

If that doesn't fit your needs, you could use a sequencer command instead of scene event. Sequencer commands can be timed, such as this command to play an audio clip named "beep" after 1.5 seconds:

Code: Select all

Audio(beep)@1.5
fr4231
Posts: 20
Joined: Sun Nov 28, 2021 9:44 am

Re: Delay Scene Event

Post by fr4231 »

Hi,

Thanks for your reply.
Yes, I could set everything with the sequencers (most likely a better way than setting scene events), but the specific problem stays.

If I add a delay to the sequences then the dialogue manager panel stays on until all the sequences are executed.
I think the main "issue" is that I use the built in letterbox template with animations. What I would like to achieve is to first play the hide animation of the letterbox template, make the dialogue manager UI completely disappear and once done, execute the sequences.

The basic flow what I would like to make:

- player starts with minimap, UI on
- enters conversation, hide minimap and UI
- conversation with only the dialogue canvas
- end conversation
- play hide animation of the letterbox template and make the dialogue UI completely disappear
- once done, enable and display the original minimap and UI again

Everything is working, except the last part as the dialogue canvas stays on until all the sequences are executed, the original in-game UI appears while the black bars of the letterbox template are still on.

I tried to add animation sequencers to first play the hide animation of the letterbox template and execute the sequences after, but so far no luck, the black bars stay until the sequences are all executed.

Maybe it's a pretty specific issue, so thanks for the help.
fr4231
Posts: 20
Joined: Sun Nov 28, 2021 9:44 am

Re: Delay Scene Event

Post by fr4231 »

Nevermind, should have tried the setdialoguepanel sequence, now it seems to be working.

Thanks!
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Delay Scene Event

Post by Tony Li »

Glad you got it working the way you want!
Post Reply