Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 11 Next »

For an overview of Resources, click here.

Overview

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).

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 Shortcut at the bottom and choose the Close event:

  • In the child frame that opens, go to the Event tab on the right side and click on Add New:

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

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

  • 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):

  • 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 event resource.mp4

  • No labels