Summary
We started this chapter by creating an ink template. By defining variables and a progress
knot in ink, we can move through the various sections of a quest as individual stitches within a larger knot. Next, we looked at the ChoosePathString()
method, which can forcibly move a story to a new section.
In the second section, we broke away from single files and developed a Quest
class. Each object based on the Quest
class contained an ink Story
object based on different files and a method named Progress()
, which calls the ChoosePathString()
method internally. As part of this section, we learned how the Quest
and Dialogue
classes can help organize functionality into different classes.
Finally, we displayed the name and values of variables. First, we added new methods to detect variable changes in any quest using an events-based approach. This triggered other variables with the same name in other quests to have their values updated. Then, we added the ShowStatistics()
method...