> For the complete documentation index, see [llms.txt](https://hsv-studio.gitbook.io/tutorial-factory/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hsv-studio.gitbook.io/tutorial-factory/guides/events.md).

# Events

Corresponding events are executed respectively when Stage Objects/Tutorial Objects change their playing states.

![Picture 1. Stage Events](https://2526158861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FG18qhsfnlekFiCYWyYsZ%2Fuploads%2FyiFH2i38JfpOEhfLXRgF%2FScreen%20Shot%202022-05-27%20at%2011.39.41%20PM.png?alt=media\&token=71ac8c3a-c5f4-478f-aed6-7d6a51ed6d08)

![Picture 2. Tutorial Events](https://2526158861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FG18qhsfnlekFiCYWyYsZ%2Fuploads%2FGBr37S1uXk8XFR75Rybv%2FScreen%20Shot%202022-05-27%20at%2011.40.08%20PM.png?alt=media\&token=f2ce02f1-b7ee-40a7-9be2-a3eec92b635d)

In version 1.2, the event system are redesigned to encapsulate more events into Stage and Tutorial Objects. **Users could enable individual events by clicking on different buttons in the Inspector.**

* **OnStart**: Event would be invoked when Stage/Tutorial starts.
* **OnUpdate**: Event would be invoked every frame when Stage/Tutorial are in 'Start' or 'Executing' state.
* **OnExecuting**: (Stage version)Event would be invoked when Stage completes starting Tutorial and adding trigger configuration. (Tutorial Object Version)Event would be invoked when all of Tutorial Object's modules are done showing.
* **OnEnding**: Event would be invoked when StopStage/StopTutorial are called.
* **OnComplete**: Event would be invoked when Stage/Tutorial Objects are completed.

### Global Events

public event HSVGlobalStageEvent OnStageStart;&#x20;

public event HSVGlobalStageEvent OnStageUpdate;&#x20;

public event HSVGlobalStageEvent OnStageExecuting;&#x20;

public event HSVGlobalStageEvent OnStageEnding;&#x20;

public event HSVGlobalStageEvent OnStageComplete;

{% hint style="info" %}
Please use these events to listen to different state of running Stage Objects. The parameter in the callback contains running Stage Objects.
{% endhint %}

public event HSVGlobalTutorialEvent OnTObjStart;&#x20;

public event HSVGlobalTutorialEvent OnTObjUpdate;&#x20;

public event HSVGlobalTutorialEvent OnTObjExecuting;&#x20;

public event HSVGlobalTutorialEvent OnTObjEnding;&#x20;

public event HSVGlobalTutorialEvent OnTObjComplete;

{% hint style="info" %}
Please use these events to listen to different state of running Tutorial Objects. The parameter in the callback contains running Tutorial Objects.
{% endhint %}

public event HSVUIMaskEvent OnDisplayTextChange;

{% hint style="info" %}
Please use this event to change display text for certain tutorial object during runtime. The module parameter in the callback contains the tutorial object information.&#x20;
{% endhint %}
