-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Dynamic Story Scripting with the ink Scripting Language
By :

Variables in ink are global. Once they are created, they can be accessed at any point in the story. In Chapter 8, Story API – Accessing ink Variables and Functions, we learned how this functionality can be used with the variablesState
property to access or change their values. However, instead of directly interfering in a running ink from Unity, we can also wait for something to happen in ink and then react in Unity. The verb used for this type of approach, as part of the Story API, is called observing.
When we observe an ink variable, we can write our own rules regarding what should happen when its value changes or meets a certain threshold. We are merely observing its value. What we do because of this observance is up to the developer.
In this topic, we will explore the ObserveVariable()
method.
Recommendation
It is recommended that you create a new Unity 2D project for this topic. Instructions regarding how to create a new Unity...