The Interactivity behind the tutorials is done with logic, it controls the flow of the tutorial. Variables can be created, read and executed easily with the visual editor. As an example, the tutorial might direct the flow on different steps after checking how many players are playing.
The Logic Editor can be accessed in different ways, depending on the need.
- To add logic to the flow of the tutorial: Double clicking a logic step
- To add logic to a Smart Object inside a step: click the object in the Editor and select "Logic Editor" in the inspector
- To add logic to the animation segment: RMB a trigger point on the animation timeline
Logic allow the usage of Actions and Conditions and are not seen by the user. Logic Steps in the flow are also invisible to the user as the tutorial progresses through them immediately after executing the logic.
Each Action is one task, like change the value stored in a variable or go to a step. Conditions simply allow actions to be run depending if the conditions are True (or False).
Conditions and Actions are run from top to bottom. With certain actions it’s possible to cancel the rest of the logic from being run.
How to Read the Logic Editor
See the example above that checks to see if the current round is finished or if the player should be prompted to score their turn:
IF these are True
IF the value stored in variable $turn EQUALS the value stored in variable $playersCount
AND IF the value stored in variable $scoring EQUALS the value True
THEN do these
Increment the value of $round by 1
AND
Set the next step to be “Step 3-B”
ELSE, do that
Flip the value of $scoring between True and False