Custom Event Resource

Overview of the Custom Event resource

The Custom Event resource emits an event within a script. Frames can conditionally play if the custom event is specified using the Custom Event condition. This resource can be used for branching out a script. 

The Custom Event resource is different from the System State or Story Point resources in that it does not use an enum. Furthermore, the author can specify the scope in which the custom event is called out. For example, the event can be local to the script, or global (in the session).

2021-04-15_10-08-28

Required Fields:

Field Name Description
Custom Event Specifies the name of the custom event.

Events:

Open, Activate, and Custom event.

Example in the Headset:

I have two scripts.  I want an event in one to trigger something in the second.  In this case, there is a Welcome Message that plays for the learner.  When it is closed, I want it to trigger a second script to run where Ted is spawned.

  • In the first script, go to the resource and click on the blue + event link at the bottom and choose the Close event:
2021-04-15_10-13-12

  • In the sub-frame that opens, go to the event tab on the right side and click on Add New:

2021-04-15_10-16-28

  • Name the event and click on the checkmark to save.  Click "Global" to save this event across all of your scripts:

2021-04-15_10-18-01

  • Drag the event to the Resource area of your frame to create the Custom Event resource:

2021-04-15_10-19-51

  • Save changes.
  • Navigate to the second script and open the frame that you want the event to trigger.  In this example, it's the script where I Spawn Ted.
  • Open the Events tab again and this time drag the Custom Event to the Conditions (not Resources):
2021-04-15_10-22-53


  • Now what will happen is that the Resource in this second script will not play until that event is complete.  This is what it would look like in the headset:
custom e - HD 720p (1)