1. Help Center
  2. Tutorials
  3. Office Sandbox Authoring Tutorials

Office Tutorial 2 - Using a Condition

Use a condition to control the flow of frames in a script

Training Notes

In this tutorial, we will learn about Conditions and use a Notification Resource.  To prepare, review these resources:

Quick Links

Step 1: Create a New Subframe

Step 2: Add a Notification Resource

Step 3: Add a Condition

In the Headset

Key Takeaways

In our last tutorial, we added a Welcome Message that the user clicks "ok" on the screen to clear.  Now, let's create a notification, with a sound, to say "Scenario has started".

Step 1: Create a New Subframe

  • Open the "Welcome Message" script. You can do this by clicking on the tab at the top of the editor:

Or, if you have closed the "Welcome Message" script, you can find it by clicking on the scroll icon on the right-hand side of the screen and choosing it from your script catalog.


  • Once your "Welcome Message" script is open, add a subframe to the script by clicking on the '+' on the "Welcome Message" frame.
  • Re-name this frame "Notification".
  • Click outside the text box to save:

Add a new frame

Step 2: Add a Notification Resource

  • Search the Resources for a "Notification".
  • Drag "Notification" into your frame.

2021-01-15_09-30-25 (1)

  • Add text to the notification in the "Message" area:

Notification text

Let's add a sound to this notification.

  • Click on the '+' beside the "Sound" field.
  • The media catalogs will open. Choose the "Sound Effects" catalog. 
  • Choose the sound that you would like to use. In this example, we chose "Action_Login 01.ogg":

pick a media file

  • Finally, let's add an icon to the "image" field using the same process. Click the '+' beside the "Image" field
  • Select the "Icons" media catalog.
  • Choose an appropriate icon. In this case, we chose the checkmark:

completed notification

  • STOP:  Save and test in the headset.  When you start the scenario, you will notice that the screen message and the notification try to play at the same time. Let's fix this.

Step 3: Add a Condition

When a frame opens, all of its subframes open and run as well. In order to control the flow of frames, we use conditions. In this case, we want the notification to play after the user has clicked 'ok' on the screen message. When the user clicks 'ok' on the screen message, it "closes". We can create a condition that listens for the "close" of the screen message.

  • With the "Notification" frame active, click over to the "Conditions" panel in the editor:


  • Use the search bar to look for "Object Event".
  • Drag and drop the condition into the top blue condition frame. This allows you to say "when the resource I choose fires a specific event, open this frame". 
2021-01-15_09-44-44 (1)
  • To complete the condition, select the "Welcome to the Demo Scenario" script object (this is our screen message).
  • Select "Close" as the event:

create object event condition


In the Headset

Here is what your scenario will look like so far:


Training Notes

Key Takeaways from Tutorial 2

  • A resource like Notification has many ways to draw the learner's attention.  Text, sound, image, and vibrate can all be used together or individually.  Be sure to check out the options on each resource you use.  
  • Conditions are used to control the flow of a frame.  A common use is to dictate the order of when items fire in the scenario.


Next Up:  Office Tutorial 3 - Add Ambience