-
Notifications
You must be signed in to change notification settings - Fork 7
Branching Narrative
For this example, I am using the "FindTheStones" blueprint - it has a very simple and basic dialogue tree:

Here, the start node basically starts with a dialogue that introduces you to the game, and then you are given a choice - do you ask about the shadow path, or the light path:

This is done with a "Dialogue" order, and two "Choice" orders. As you can see, there are two nodes, "Shadow Path" and "Light Path" - those two nodes are the ones we select in each of the choices:

This simple way to branch the narrative then lets us do things like add 1 to a variable, or unlock a different path, etc. In this game's case, we just show a different dialogue based on the choice, and then converge to the same node.
This is the most basic example, and you can start building on top of it, thinking of how you could have two completely separate branches throughout the game, or keep track of some background variable, and so on.
This next example will showcase how you could use a variable to track and display different dialogue.
Using the "FindTheStones" blueprint, we can see how each of the stones has basically two parts:

If the player has visited 0 to 4 stones, then the first dialogue option pops up. This is using a variable that was created in the "Flow Engine" window:

Once the variable is created, it can be accessed throughout the orders. In the order itself, you can see how an "if" and "else" orders are used to track how many stones the player has visited, and display the correct dialogue based on that number. As the game only needs 4 stones, there is a special dialogue for when you go out of the way to visit the last 2 stones:

At the end of the "if" and "else" orders, I add one to the StonesVisited variable. At the end, once 4 or more stones have been visited, you are told you can go to the final one. Once there, there is a final check if you have gone to all stones, or not:
