Page 1 of 1

Triggering Script/Sequence When Conversation Terminates

Posted: Sun Sep 15, 2024 9:20 pm
by FiveAlive
Hi, newbie question here.

I'm wondering if there's a way to trigger a sequence or script, such as a character animation, directly after a conversation terminates, as in, when the final conversation node is over and no longer displayed onscreen, NOT as soon as the final node occurs.

For my specific cutscene, I want a character to walk forward AFTER the final node has been ended. I can get them to walk as soon as it occurs, but that's a problem, as I need them to stay on screen as long as the dialogue is on screen, otherwise they do as they do now and run off screen while the last dialogue node is still typing itself out.

I want to have this happen multiple times, and call multiple different animations/transforms upon the termination of conversations, so I'm wondering if there's a way to do this without making a brand new Dialogue System Trigger for the end of every single conversation where I want something to happen, as its something I'm going to be doing a lot and in a unique way each time.

I feel there must be a sequence and/or script command that can call things and exist after the end of the conversation in a similar way 'required Animation' can, but waits until the UI itself has closed. I can't find anything in the forums or documentation.

I'll mention that I progress my dialogue using the 'return' button, so conversation's are always ended by pressing return, just in case that's relevant to triggering a sequence/script when the conversation terminates.

Thank you for your help!

Re: Triggering Script/Sequence When Conversation Terminates

Posted: Sun Sep 15, 2024 9:30 pm
by Tony Li
Hi,

Add a dialogue entry at the end of your conversation. Leave the Dialogue Text field blank. In the Sequence field, include this command:

Code: Select all

SetDialoguePanel(false);
plus any other sequencer commands you want to use, such as (for example):

Code: Select all

SetDialoguePanel(false);
AnimatorPlay(Walk);
MoveTo(Door);
AnimatorPlay(Idle)@2;
Fade(stay)@2;