I just started using Dialogue System, when I want to start a conversation first I disable the input, then I start the conversation with DialogueManager.StartConversation(_conversationName);
But it seems I have no known way to know when the conversation ends and enable the input, I tried checking out OnConversationEnd but I can't seem to figure out the API I need, what can I do to?
Edit: I tried registering lua functions for that and I sort of got close to what I want to do but I can't really find a good way to trigger the input unlock script after the last node rather than ON it
Edit2: the Dialogue System Events component on the dialogue manager seems to be doing what I need, I just needed to link it to my game manager
How to get notified when a conversation ends?
-
- Posts: 1
- Joined: Thu Nov 09, 2017 3:20 am
Re: How to get notified when a conversation ends?
Hi,
Sounds like you're all set now. Here's more info if you're interested. Under the hood, the Dialogue System Events component listens for the OnConversationEnd message. The Dialogue System sends this message to the Dialogue Manager GameObject and both primary participants (i.e., the GameObjects assigned to the Conversation Trigger's Actor and Conversant fields) as described on the Script Messages page.
If you want to cut out the middle man (Dialogue System Events), you can put your script on the Dialogue Manager -- or the player -- and add an OnConversationEnd(Transform) method to it.
Or, if you don't want to do any scripting at all, you can add a Set Component Enabled On Dialogue Event component to your player. Set the Trigger to OnConversation, and assign your input script(s) to the OnStart and OnEnd sections.
Sounds like you're all set now. Here's more info if you're interested. Under the hood, the Dialogue System Events component listens for the OnConversationEnd message. The Dialogue System sends this message to the Dialogue Manager GameObject and both primary participants (i.e., the GameObjects assigned to the Conversation Trigger's Actor and Conversant fields) as described on the Script Messages page.
If you want to cut out the middle man (Dialogue System Events), you can put your script on the Dialogue Manager -- or the player -- and add an OnConversationEnd(Transform) method to it.
Or, if you don't want to do any scripting at all, you can add a Set Component Enabled On Dialogue Event component to your player. Set the Trigger to OnConversation, and assign your input script(s) to the OnStart and OnEnd sections.