Page 1 of 1

Delay Scene Event

Posted: Mon Nov 29, 2021 12:18 pm
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!

Re: Delay Scene Event

Posted: Mon Nov 29, 2021 12:56 pm
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

Re: Delay Scene Event

Posted: Mon Nov 29, 2021 7:42 pm
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.

Re: Delay Scene Event

Posted: Mon Nov 29, 2021 7:52 pm
by fr4231
Nevermind, should have tried the setdialoguepanel sequence, now it seems to be working.

Thanks!

Re: Delay Scene Event

Posted: Mon Nov 29, 2021 8:23 pm
by Tony Li
Glad you got it working the way you want!