The flags system allows us to add narrative behavior to our games. However, the use becomes too hard in various situations. For example, suppose we want to limit the number of times a player can perform a certain action (like catch upthe fish) to 3. To allow remember numbers with flags we should have a flag for each possible value (0, 1, 2 and 3 in this case).
Therefore <e-Adventure> also includes variables. On an intuitive way we can define variables as elements that always have an associated value, the default is 0, and that we can change during the games. To add a reference to the value of a variable we just have to perform a process similar to the flags. Let's see an example.
We have a book we created earlier. To do that we create a variable NumberOfTimesBookWasChecked which counts the number of times the book has been examined. Afterwards we add to the action examine of the book one condition: NumberOfTimesBookWasChecked must be less than 3.
The process is as follows: