Director Scripts: An Overview
For an overview of Scripts, click here.
Deep Learning on Scripts is found in Motive Academy. Click here to see the course this lesson is in.
Quick Links
All Scenarios typically 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. Note that Director Scripts are not mandatory, it's simply a best practice for organizing your content.
To understand how Director Scripts play a role in Storyflow, please watch this video:
For full screen please view on Vimeo at this link
As you create your Scenario, you may have several or many individual Scripts - but they all link back to the original Director Script. In my example, I’ve created five:
Each of my five Scripts does different things. The "Welcome Message" puts a message to the learner on the wall. The "Ambience" Script directs music to come out of a speaker. The "Video Content" Script plays a video for the learner. The "Equip Hard Hat" allows the learner to interact with a hard hat in the Scene, pick it up, and put it on her head. The “Spray Workbench” Script instructs the learner to pick up items in the environment. I’ve set up Conditions so that each Script runs after the one previous.
When they all come together in the Director Script, I have a flowing Scenario.
Creating Director Scripts
Create a Director Script the same as any other Script with two exceptions:
1. Name the Script - Director Script, to make it clear
2. Attach the Director Script to the Scenario - this is what makes it control the flow
Linking Scripts to the Director Script
Once you’ve created a Director Script, you need to link every other Script you want to run in the Scenario to it.
1. Open the Director Script
2. Change the name of the New Frame to the name of the Script you will add. In this example, I have a Script named “Prompts” that I want to link:
3. Click on the Scripts Shortcut icon at the top right and find the Script you want to link in
4. Drag and drop the Script into the Resource area:
5. Save
6. Repeat for all Scripts you want to run in the Scenario
Advantages of the Director Script
Using a Director Script has a few advantages:
It helps you break up your Scenario into several smaller, potentially reusable Scripts.
This makes it easier for you to rearrange the steps of your Scenario if needed.
If an additional step is later required in your Scenario, you can easily add it without impacting the steps that come before or after it.
Related Articles