Logic & Decision Making¶
Scenegraph is not just a static tree, it’s a dynamic graph. Since an educational pipeline can lead to multiple paths according to user’s actions and decisions, Scenegraph does it so. There are times in a procedure where the user needs to choose between two predefined paths or an error they made leads to a completely different path.
These functionalities are implemented in such a way to support real time decision making and as a result Scenegraph can change its structure (Nodes) as the procedure goes on. Any logic node that is provided by Unreal for blueprints can be used to change the behavior of the graph according to the user’s decisions.
Alternative Paths - An Example¶
Since the Live Scene Graph is now a simple blueprint with the SDK’s custom functionalities added on top, code logic can be applied to implement decision handling. The simplest manner in which this can be done is by making use of the Sequence node by Unreal.
The Sequence node, unlike the Lesson node (provided by the SDK), will not wait for the previous action or lesson group to be completed in order to execute the next stage. Instead, all actions within the sequence will be created simultaneously, but only one of them will execute logic after it has been performed by the user.
As illustrated above, if the user chooses to assemble Knossos by completing the corresponding action, the logic linked to the pin labelled “Performed” will be executed, setting the boolean variable of “Chose Knossos” to true. Afterwards, this boolean can be examined by the graph, with different logic for either case: