...

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:

...

As described above, Events are like flags or markers that allow an author to note when things have happened and then trigger new parts of the scenario based on those events. In this script, we will use Custom Events to trigger when scripts open in the scenario. This is a simple example - but there may be any number of situations where you want to use the custom event to trigger something while authoring.

In this script, I want to create an Event that happens after the setup items are spawned in the environment. This is so that I can trigger the next script to run after the items are spawned.

Step 1: Create the Event

  • Open the appropriate script

  • Click on the Events tab. It is in a tab beside Resources:

...

  • Click +Add New

  • Name the Event - “Assets Spawned” (in this example)

  • Make the Event Global

  • Click the checkmark to save:

...

Step 2: Add this Event to the script

Now that the Event has been created, we want to add it to the script after the assets have been spawned.

  • In this example, I will click on the Spawn Assets Frame

  • Under the Workshop Props, click on the Event Link Shortcut

  • Choose Complete Event:

...

Choosing complete will open a new child frame under the “Spawn Assets” frame.

  • Rename the child frame - Assets Spawned Event:

...

  • Drag and drop the Event we just created into the Resources pane of the Assets Spawned Event frame:

...

Now, when the assets have spawned, we have marked it with an Event.

Step 3: Use Custom Event to trigger new Script Opening

  • Open the next script to be run in the Scenario. In this example, it is a PPE Script where a video will be played.

  • Drag and drop the Global Event you created into the Conditions pane of the script

...

  • Save

In the environment, you’d see the props in the scene spawn and then the video script will run.