Launch a topic when another topic is finished

You can launch another topic through a step callback.

Implementing the callback

Developers can prepare a function that will be within the application source code. Here we have defined imLaunchTopic function, which can be called as my_callbacks.imLaunchTopic from within the Authoring tool.

window.my_callbacks = {
    imLaunchTopic: function(player_id, topic_id, step_id, custom_data) {

Using the function in the Authoring tool

In the Authoring tool, you can re-use the callback wherever necessary and pass the parameter topic_id. The topic_id is the id of the topic you want to launch. Take a look at this article to learn how to find it.

In the Authoring tool:

  1. Within the Callbacks panel, add a callback my_callbacks.imLaunchTopic in On deactivate section.

  2. Click + under Custom data tab.

  3. Provide name topic_id and value the id of the topic

  1. This will result in On deactivate callback being called when the step has been deactivated and it will pass the custom data to the function itself, making it very flexible and reusable.
Was this article helpful?