Hi Tony.
Some of my conversations have an Scene Event methods/functions on execute them.
But, while the function is executed, the Dialogue panel is still showing.
How can I close the panel or finish the conversation just an instant after calling the Scene Event?
Thanks in advance!
How to close a conversation by script
Re: How to close a conversation by script
Hi,
If the Scene Event is on the last dialogue entry node, the conversation will end as soon as that node's Sequence finishes. If you want the Sequence to end immediately, set it to: Continue()
If it's not on the last node and you want to force the conversation to stop anyway, set the Sequence to: StopConversion()
If the Scene Event is on the last dialogue entry node, the conversation will end as soon as that node's Sequence finishes. If you want the Sequence to end immediately, set it to: Continue()
If it's not on the last node and you want to force the conversation to stop anyway, set the Sequence to: StopConversion()
Re: How to close a conversation by script
Yes, the scene event is on the last node. Is an option that the player can choose. Have two On Execute Scene Events.
The problem is when I click the option which contains it, the convarsation it doesn't end like others. The Dialogue panel is still showing.
The problem is when I click the option which contains it, the convarsation it doesn't end like others. The Dialogue panel is still showing.
Re: How to close a conversation by script
Are there any errors or warnings in the Console window? If your Scene Event calls a method that runs into an error, it's possible that this might prevent the Dialogue System from continuing.
Otherwise, temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. When the Scene Event runs, look for this message in the Console:
Dialogue System: Conversation ending.
If you see that message, the conversation has ended. If you don't, then the conversation is still active.
Otherwise, temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. When the Scene Event runs, look for this message in the Console:
Dialogue System: Conversation ending.
If you see that message, the conversation has ended. If you don't, then the conversation is still active.
Re: How to close a conversation by script
Hi, Tony.
I have one more question.
I have a conversation with 4 possible answers.
each answer have other dialogue entry.
If the player doesn't respond within 10 seconds, how do I force the conversation to follow a specific dialogue entry?
I've already done the time thing.
I have one more question.
I have a conversation with 4 possible answers.
each answer have other dialogue entry.
If the player doesn't respond within 10 seconds, how do I force the conversation to follow a specific dialogue entry?
I've already done the time thing.
Re: How to close a conversation by script
Hi,
The easiest way is to:
1. Set the Dialogue Manager's Display Settings > Input Settings > Response Timeout to 10 and Response Timeout Action to Choose First Response.
2. Make the default response dialogue entry the first in the question node's Links To list.
Other options:
The easiest way is to:
1. Set the Dialogue Manager's Display Settings > Input Settings > Response Timeout to 10 and Response Timeout Action to Choose First Response.
2. Make the default response dialogue entry the first in the question node's Links To list.
Other options:
- If you don't want to make the entry the first in the Links To list, there are other Response Timeout Actions.
- If you don't want every player response menu to time out after 10 seconds, leave Response Timeout set to 0. Instead, use the SetTimeout() sequencer command.
Re: How to close a conversation by script
It worked very well. But I have a problem now. I shuffle my answers, so not picking first or last doesn't work for me. What I can do?
Re: How to close a conversation by script
You could set the Response Timeout Action to one of the other values (see ResponseTimeoutAction here). If you change it to Custom, assign a method to DialogueManager.customResponseTimeoutHandler. In this method, you can decide what to do. The list of responses is in DialogueManager.currentConversationState.pcResponses[]. You can call DialogueManager.standardDialogueUI.OnClick(Response) to choose a response, such as:
Code: Select all
DialogueManager.customResponseTimeoutHandler = ChooseFirstResponse;
...
void ChooseFirstResponse()
{
DialogueManager.standardDialogueUI.OnClick(DialogueManager.currentConversationState.pcResponses[0]);
}
Re: How to close a conversation by script
Works perfectly. Thanks!