How to skip executing sequence and script when jumping to a specific node (entry).
Posted: Sun Sep 24, 2023 8:25 am
Hi.
Thank you for the great asset.
I would like to know how to prevent the execution of a sequence and script when jumping to a specific entry.
I am currently working on a system to interact with animals.
If I pat its head at any point during the conversation, it will interrupt the conversation and respond in a special entry, but if I remove my cursor from its head, I want it to return to the original entry.
I can do just going back and forth between Entries, but I would like to know how to return to the display of choices without executing any sequence and script in the entry to which I return.
Specifically, what I would like to achieve is like the following.
Dog :ruff ruff! (I picked up the item you asked for!)
↓
Player (Show selections): [Praise and feed] [Praise and give a new toy]
↓
Then the player strokes its head. Jump to the entry that has been pre-determined.
Dog: whine whine (Pet me more!)
↓
The player removes his/her hand. Return to the original entry.
Dog :Woof! (I picked up the item you asked for!)
*I would like to avoid playing this again. I think it looks unnatural to repeat the same line.
↓
Player (Show selections again): [Praise and feed] [Praise and give a new toy]
The code for moving between Entries by player interaction is as follows.
How to skip executing sequence and script when GotoState()?
Thank you.
Thank you for the great asset.
I would like to know how to prevent the execution of a sequence and script when jumping to a specific entry.
I am currently working on a system to interact with animals.
If I pat its head at any point during the conversation, it will interrupt the conversation and respond in a special entry, but if I remove my cursor from its head, I want it to return to the original entry.
I can do just going back and forth between Entries, but I would like to know how to return to the display of choices without executing any sequence and script in the entry to which I return.
Specifically, what I would like to achieve is like the following.
Dog :ruff ruff! (I picked up the item you asked for!)
↓
Player (Show selections): [Praise and feed] [Praise and give a new toy]
↓
Then the player strokes its head. Jump to the entry that has been pre-determined.
Dog: whine whine (Pet me more!)
↓
The player removes his/her hand. Return to the original entry.
Dog :Woof! (I picked up the item you asked for!)
*I would like to avoid playing this again. I think it looks unnatural to repeat the same line.
↓
Player (Show selections again): [Praise and feed] [Praise and give a new toy]
The code for moving between Entries by player interaction is as follows.
How to skip executing sequence and script when GotoState()?
Code: Select all
private void JumpNode(int entryID)
{
var entry = DialogueManager.masterDatabase.GetDialogueEntry(DialogueManager.lastConversationID, entryID);
var state = DialogueManager.conversationModel.GetState(entry);
DialogueManager.conversationController.GotoState(state);
}