Page 1 of 1

Sequence at the end of conversation

Posted: Mon Apr 03, 2017 12:30 pm
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!

Re: Sequence at the end of conversation

Posted: Mon Apr 03, 2017 1:48 pm
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)

Re: Sequence at the end of conversation

Posted: Mon Apr 03, 2017 4:33 pm
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.

Re: Sequence at the end of conversation

Posted: Tue Aug 29, 2017 11:04 pm
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?

Re: Sequence at the end of conversation

Posted: Wed Aug 30, 2017 5:33 am
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}};

Re: Sequence at the end of conversation

Posted: Wed Aug 30, 2017 3:03 pm
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.

Re: Sequence at the end of conversation

Posted: Wed Aug 30, 2017 3:34 pm
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.

Re: Sequence at the end of conversation

Posted: Wed Aug 30, 2017 4:17 pm
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

Re: Sequence at the end of conversation

Posted: Wed Aug 30, 2017 6:56 pm
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.