Sequence at the end of conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
kim258
Posts: 5
Joined: Sun Apr 24, 2016 12:39 pm

Sequence at the end of conversation

Post by kim258 »

Hi there!

I was wondering if there's any way to have a sequence at the end of a conversation without showing the NPC subtitle panel? I was trying to use the "SetContinueMode" and the "SetActive" on the Subtitle panel, which worked except the animation to hide the panel still triggered, so the panel flickered on and off at the end.

Is there any way to not trigger that hide animation for specific nodes only? Or to add a sequence to something like a group node so it wouldn't have any dialogue to show? There might be an easier way around this, I was just hoping to have a sequence play for a second or two at the end of a conversation without any panels showing.

Thank you!
User avatar
Tony Li
Posts: 21080
Joined: Thu Jul 18, 2013 1:27 pm

Re: Sequence at the end of conversation

Post by Tony Li »

What about triggering the sequence based on the "OnConversationEnd" event -- that is, when the conversation actually ends. You can use Start Sequence On Dialogue Event for this. Add this component to the NPC, and set the Trigger to OnConversation. Add an element to On End. Expand that element and type in your sequence. You can also set the Condition if you only want the sequence to play under certain conditions.

Alternatively, if you want to define the sequence inside your conversation, can you add it as a sequence that plays during the player's response? (This assumes that the Dialogue Manager's Show PC Subtitles During Line checkbox is unticked.) For example:
  • NPC: "Nice meeting you."
    • Player: "You, too."
    • Sequence:

      Code: Select all

      AnimatorPlayWait(shake_hands)
kim258
Posts: 5
Joined: Sun Apr 24, 2016 12:39 pm

Re: Sequence at the end of conversation

Post by kim258 »

I also have Adventure Creator so I ended up doing something similar with that instead. But thank you for the quick reply! And somehow I missed that sequence trigger feature, so thank you for pointing that out as well! I'm sure it'll come in handy later on.
Xpyke
Posts: 13
Joined: Sun May 22, 2016 11:29 am

Re: Sequence at the end of conversation

Post by Xpyke »

Sorry for bringing this topic back from the dead but I'm facinng a similar problem, I use this

Code: Select all

SetEnabled(SelectorFollowTarget, flip, listener); SetEnabled(PController, flip, listener); 
to keep my player from moving during dialogue (PController is my control script), but every last pane the player will regain control before the sentence ends, is there some way to play a sequence after the conversation ends?

I tried to do something like you said in the post above but without much success, and I tried to put the sequence on auto mode instead of forcing the continue button and creating a blank message at the end with the commands but it just ignored my blank message... So I'm dead in the water, could you help me in this?
User avatar
Tony Li
Posts: 21080
Joined: Thu Jul 18, 2013 1:27 pm

Re: Sequence at the end of conversation

Post by Tony Li »

Hi,

I think it would be much easier to use the Set Component Enabled On Dialogue Event component.

If for some reason you can't do that, you could tell the sequencer commands to run at the end of the sentence by adding "@{{end}}":

Code: Select all

SetEnabled(SelectorFollowTarget, flip, listener)@{{end}; SetEnabled(PController, flip, listener)@{{end}};
Xpyke
Posts: 13
Joined: Sun May 22, 2016 11:29 am

Re: Sequence at the end of conversation

Post by Xpyke »

That kind of worked, but I think I found a bug, when I'm using

Code: Select all

SetEnabled(SelectorFollowTarget, flip, listener)@{{end}}; SetEnabled(PController, flip, listener)@{{end}};
I have to wait for it to reactivate my components, if I spam click it will exit before doing the commands, but as I found out it could be because @{{end}} waits for some seconds before firing, not on actual conversation end, am I correct?

If that's the case I could try to use the "Set Component Enabled On Dialogue Event" component but I found it difficult to understang, am I supposed to put that on my player? And checking whenever there's a conversation ending for me to reactivate my components? Can I put to fire a sequencer command or I have to create another conversation reactivating my components?

Sorry to bother you so much, and thanks for the amazing support you've been providing.
User avatar
Tony Li
Posts: 21080
Joined: Thu Jul 18, 2013 1:27 pm

Re: Sequence at the end of conversation

Post by Tony Li »

Hi,

If you add the 'required' keyword in your sequence, it will guarantee that the commands run even if the player cancels early:

Code: Select all

required SetEnabled(SelectorFollowTarget, flip, listener)@{{end}}; 
required SetEnabled(PController, flip, listener)@{{end}}
If you decide to use Set Component Enabled On Dialogue Event, try these steps:
  • Add a Set Component Enabled On Dialogue Event to the player.
  • Set the Trigger dropdown to On Conversation.
  • Expand On Start.
    • Set Size to 2.
    • Expand Element 0. Assign the player's SelectorFollowTarget component to the Target field. Set the State to False.
    • Expand Element 1. Assign the player's PController component to the Target field. Set the State to False.
  • Expand On End.
    • Set Size to 2.
    • Expand Element 0. Assign the player's SelectorFollowTarget component to the Target field. Leave the State at True.
    • Expand Element 1. Assign the player's PController component to the Target field. Leave the State at True.
Whenever the player receives an OnConversationStart event, it will automatically do what's specified in On Start. Whenever the player receives an OnConversationEnd event, it will automatically do what's specified in On End. These events are sent automatically by the Dialogue System when conversations start and end. You don't need to use any sequencer commands for this.
Xpyke
Posts: 13
Joined: Sun May 22, 2016 11:29 am

Re: Sequence at the end of conversation

Post by Xpyke »

I used the "Set Component Enabled On Dialogue Event" and it worked wonders, I wish I knew this earlier! Thank you again for the amazing support you've been giving, if I might suggest you could put some use cases like this on the documentation, when I first read I couldn't grasp the concepts behind it, with an example everything is just easier :D
User avatar
Tony Li
Posts: 21080
Joined: Thu Jul 18, 2013 1:27 pm

Re: Sequence at the end of conversation

Post by Tony Li »

Thanks! I really appreciate feedback like that because it lets me know where more documentation will be helpful. I'll make sure to include some explanation like this in the next release.
Post Reply