Adding a Rule Path


Adding a rule path is a bit more complex than the regular path. there are two types of rule paths:
Item possession - checks the possession of an Item in the players inventory.
Variable check - validate a simple equation between a variable an integer number ( for number variables) or Boolean value ( for switches)

Adding Rule Path
Description - the textual presentation of the path which the player will see
(required field)
Correct Destination - the page number or a unique destination  which the path will lead when the player chooses this path, and the condition specified is validated as true. (required field)
Wrong Destination - the page number or a unique destination  which the path will lead when the player chooses this path, and the condition specified as false.
Hide path if failed - when checked, if the rule path condition will validate the condition as false while playing the book, the path will hided from sight. When this option is checked, filling Wrong Destination is blocked since it serves no purpose.
Type - You must choose which type of condition is applied - Item Possession or Variable Check.
Item - if the condition type is Item Possession you must choose an Item.
Possession Type - if the condition type is Item Possession you must choose whether the selected item is supposed to be in the player's possession or if it's supposed to be missing.
Variable - if the condition type is Variable Check you must choose a Variable.
Equation - When Switch is selected from the variables list all you got to do is decide whether to validate it true or false. When Numerical Variable is selected you must first decide the operator (>,<,=,<=,>=) and then write a proper math equations.



Rule Path Syntax
In the list Rule paths are shown in the following syntax:
[Description] = [Correct Destination] : [Wrong Destination]
* wrong destination = 0 when hiding the path it's failed.
for example:
give mike the letter = 10 : 12