Create Branching Dialogue Choices
Add Multiple Entries
Create several dialogue entries in your JSON file, each with a unique ID. These will serve as different conversation nodes:
`json
"entries": {
"greeting": {
"text": "Hello there! What brings you here?"
},
"option_a": {
"text": "I'm exploring the area."
},
"option_b": {
"text": "I'm looking for treasure."
}
}
`
Link Entries with Actions
Add an actions array to create clickable buttons that lead to other entries:
`json
"greeting": {
"text": "Hello there! What brings you here?",
"actions": [
{"text": "I'm exploring", "next": "option_a"},
{"text": "I'm seeking treasure", "next": "option_b"}
]
}
`
Test Your Branches
Start the dialogue and click the action buttons to navigate between entries. Each action will display its text as a clickable option, and selecting it will transition to the specified next entry, creating an interactive conversation flow.