In Toto there are different events that are fired when a user plays a session. These are defined on the different content entities. For instance the event
on task solve can be defined on an element of type task.
For each trigger event you can define:
There are currently 11 different events available for defining a trigger:
||Fires when a story has been initialized.|
||Fires when another player joined a game session.|
||Fires when the story has been started.|
||Fires when a story has been canceled which means the user quits the story before finishing it.|
||Fires when a story has been finished. As soon as the last element of the last story is done, the user can finish the story regardless if there are still unsolved elements.|
||Fires when a challenge has been released.|
||Fires when a challenge has been finished which means the last element of that challenge has been processed successfully, even if there are other elements in the challenge graph which haven’t been processed successfully by the user yet.|
||Fires when a task has been released.|
||Fires when an info element has been released.|
||Fires when a choice has been released.|
||Fires when a dynamic element has been released.|
||Fires when a task has been solved (processed successfully).|
||Fires when a user skipped a task.|
||Fires when a user entered a wrong solution.|
||Fires when an info element has been acknowledge (processed successfully).|
||Fires when a coin has been collected.|
||Fires when a choice has been made (processed successfully).|
||Fires when a dynamic element has been processed successfully.|
||Fires when a dynamic element couldn’t be processed successfully.|
The order of this list determines the order in which these events will be fired.
You have a story with two challenges C1 and C2. In C1 you’ve created two tasks T1 and T2 and in B there are two tasks as well: T3 and T4. If the user solves T2, then the following events are fired:
on element success
on challenge finish
on challenge release
on element release
For each defined variable you can execute a script and change the value of a particular instance of that variable. Depending on the scope there are instances for the repository, the user or the session.
Variable scripts are always executed and updated before payloads are sent to TotoObjects.
Please see section variables for more information.
You can sent arbitrary payloads to TotoObjects. The payload is just a simple string and the data depends on the object which is referenced. There are different TotoObjects available:
You can of course create your own TotoObject.
Please see section objects for more information.