Hello.
I have a flow: node1 -> response node -> node2 -> ....
When user click on response node it goes to inventory screen. in node2 i have WaitForMessage(GotItem); So when user pick some item it return to quest and continue. But I have a button "inventory" in the game GUI (not in dialogue) and I'd like to run "response node" when user click on inventory button. The matter is that if user goes to inventory NOT from the quest, the dialogue system doesn't wait for message.
please advice how to do it better. I'd like to do something like: DialogueManager.currentConversation.gotoEntry(id); or something else.
Thank you
Evgeny.
Run response from code
Re: Run response from code
Hi Evgeny,
You can specify a dialogue entry node ID with DialogueManager.StartConversation(). To get the ID of a dialogue entry node, inspect it. The ID is listed at the top. Here's some example code:
You can specify a dialogue entry node ID with DialogueManager.StartConversation(). To get the ID of a dialogue entry node, inspect it. The ID is listed at the top. Here's some example code:
Code: Select all
using PixelCrushers.DialogueSystem;
...
void OnClickItem() {
DialogueManager.StopConversation(); // In case conversation is already running.
DialogueManager.StartConversation("Title", actor, conversant, node2ID); // Restart at node2 ID
}