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

Office Tutorial 1 - Setting up

Set up your workspace and write your first script.

Training Notes

In this article, we will work with scripts and a resource.  As an overview, please review these two articles:

Quick Links

Step 1: Create a Director Script

Step 2: Create a New Scenario

Step 3: Attach the Director Script to the Scenario

Step 4: Create a new script called "Welcome Message"

Step 5: Rename the Frame

Step 6: Add a Screen Message

Step 7: Launch the Welcome Script from the Director Script

In the Headset

Key Takeaways

Step 1: Create a Director Script

All scenarios start with a director script. This is the script that will be launched when the scenario begins in VR. The director script is meant to control the flow of the scenario. 

  • Click "Add New Script" in the "Scenarios" tab of StoryFlow.
  • Re-name your script "Director Script".
  • Click on the checkmark icon to save your new script.

Create Director Script

Step 2: Create a New Scenario

Now, you need to create a scenario. This is the title that will show up in the Scenario Menu in VR.

  • Click on the "Create" button in the Scenarios panel.
  • Give your scenario a title. In this case, we have chosen "Demo Scenario".
  • Click on the green Save button.

Create Scenario

Step 3: Attach the Director Script to the Scenario

The scenario dictates which script will be launched to start the scenario. It is almost always the case that the scenario launches the Director Script in your project.

  • While your scenario is open, you can drag it over from the script panel to the area that says "Script +":

Attach scenario to script

  • STOP:  Save and test: To make sure your scenario is working, put on your VR headset, and launch the experience. You should be standing in an office and you will see a menu with the "Demo Scenario" in it. You can click the Demo Scenario and the menu will disappear. Nothing else will happen yet!

Step 4: Create a new script called "Welcome Message"

One of the powerful things about StoryFlow is the ability to generate a scenario from several scripts. It helps keep authoring organized and gives you control over the flow of the scenario and the order that things occur. It also makes troubleshooting a lot easier.

Let's create a new script to add a screen message.

  • Create a new script in the same way you created the Director Script. First, click on "Add New Script".

2021-01-15_08-58-16

  • Name the script "Welcome Message" and click on the checkmark to save it.

2021-01-15_08-59-12
Now we want to open the Welcome Message script so that we can edit it.  

  • Double click on the title "Welcome Message".

2021-01-13_09-43-58 (1)

You will see that it opens a Script Frame.  This is the frame for this specific script, the "Welcome Message".  Within this area is where we can make edits and add items to this script.

It's important to ensure you are in the correct script. You should see the script name in the active tab. If the script is open, but not active, click on the "Welcome Message" tab to make it the active script. You can navigate to other scripts that you currently have open, in the same way.

2020-12-07_20-57-15 Welcome tab

Step 5: Rename the Frame

On the left hand side of the editor, you can see the "frames" that make up the script you are working on. Frames process in order and you can control when they open and run by using conditions (which we'll see in the next tutorial).

Frames

  • To rename a frame, click the title on the frame (right now it says "New Frame") and enter the new name.  Click outside of the edit box to save the name:

rename frame

Step 6: Add a Screen Message

We'll start by adding a welcome message for the user that they will see when this scenario first starts. To do this, we will use a "Screen Message" resource.

When you are viewing a script you will see Resources on the right-hand side of the page:

2021-01-13_09-51-47

  • Type "Screen Message" in the search bar:

2021-01-13_09-53-52

Make sure you have chosen the "screen message" from the Playable Content section.  This is what we need for this particular action. There are also "screen message" resources under the Guide and Inspector sections.

  • To add a screen message to the first frame of the script, drag the resource into the center section of the screen:
2021-01-13_09-55-38 (1)

 

  • Add some text to the screen message.  The "Text" field is what the learner sees:
2021-01-15_09-05-02

Training Tip

By leaving Anchor blank, the message will appear in front of the user wherever they are in the scene.  To have the screen message appear above a specific item in the scene, you would anchor it.  We'll learn more about that later.

If you want the button text to say something other than "ok" you can define that in the space above.

  • Click the Save button in the upper left corner to save the script.

Step 7: Launch the Welcome Script from the Director Script

If you were to try the scenario now, you would not see this screen message. That is because the scenario launches the Director Script we made, not this one. Let's add this script to our Director Script so that we can see it in action.

  • Open the Director Script. There is an important icon you will use often: the Script icon.  Click on this button on the far right-hand side of the screen:

image-10

  • After you've chosen the script icon, click on your script catalog to see all of your scripts.
  • Choose the Director Script.
  • Click on the ">" icon to collapse the catalog.

2021-01-15_09-10-01 (1)

You should now see the empty director script open in your editor screen and the Director Script tab is the active one:

2021-01-13_10-12-16

  • Re-name the first frame "Launch Welcome Message":

2021-01-13_10-13-54

As mentioned, in order for the Welcome Message script to launch, we need to attach it to the Director Script.  There are a few ways to do this, but the quickest is to drag and drop the script directly on the center of your screen.

  • Click on the Scripts icon.
  • Open your Script catalog.
  • Choose the Welcome Message script and drag and drop it into your screen.
  • Collapse the scripts menu.

2021-01-15_09-15-38 (1)

  • STOP:  Save and test. Now, when you launch the scenario, you should see this message pop up!

In the Headset

Here is what your scenario will look like so far:

 

 

Training Notes

Key Takeaways from Tutorial 1

  • A Director Script is the script launched when a scenario starts and it controls the flow of the scenario.
  • Move between multiple scripts by using tabs within the Project.  You will see the script name in the active script tab that you are currently editing.
  • Anchors allow you to place resources within a scene at a specified place or can appear in front of the user wherever they are in the scene by leaving the Achor field blank.
  • Every script created should be launched from the Director Script and the fastest way to do so is to use the Scripts icon to drag and drop the script into your frame.

 

Next Up:  Office Tutorial 2 - Using a Condition