/
Basic Template Script: A Walkthrough

Basic Template Script: A Walkthrough

 

For an overview of Template Scripts, click here.

Deep Learning on Scripts is found in Motive Academy. Click here to see the course this lesson is in.

 

This is a very basic example which demonstrates the concept of a template script.

In Storyflow:

  1. Create a Script called Instructions Template

  2. Open the new Script

  3. Add a Playable Content > Screen Message Resource

  4. Enter Instructions into the Resource

  5. Click the Dynamic icon next to the Text field (it looks like an atom)

  6. Click the "+" button at the end of the Text field

  7. This is our Variable name. You can use the default or enter your own name. Then click the checkmark.

  8. On the right hand side, click the Variables tab and click the three dots next to your Variable name

  9. Select “Edit”

  10. Check the “isInput” box and save the Script. The Variable is now an input Variable.

  11. On the Screen Message, click the "+" and select “close”

  12. Add an End Script Resource in the new Frame

  13. Give the Frames readable names and click “Save”

  14. Now let's use the template Script from another Script. Click the Projects tab, create a new Script, call it Many Instructions and open it.

  15. Create a Frame and call it First Instruction

  16. Add a Launch New Script Resource and choose the “Instruction Template” Script

Notice that there is a field with the name of the Variable that was created in the template Script. It appears here because isInput was checked. That action made it an input Variable. It is also of the correct type, a text field in this case.

  1. Type This is my first instruction

  2. Click the "+" button on the Launch New Script Resource and select close

  3. Name the new frame - Second Instruction

  4. Add a Launch New Script Resource and choose the “Instruction Template” Script

  5. Enter This is my second instruction into the field and save the Script

  6. Click the Project tab, create a Scenario and assign the “Many Instructions” Script

 

Related Articles

Basic Template Script: A Walkthrough

Template Scripts to Replace Repetitive Authoring

Related content

Template Scripts: An Overview
Template Scripts: An Overview
More like this
Your First Look at the Storyflow Script Editor Guide
Your First Look at the Storyflow Script Editor Guide
More like this
Template Scripts to Replace Repetitive Authoring
Template Scripts to Replace Repetitive Authoring
More like this
Create a Script Catalog
Create a Script Catalog
More like this
Director Scripts: An Overview
Director Scripts: An Overview
More like this
Authoring Example: How to Display Content Based on the Learner's Preference
Authoring Example: How to Display Content Based on the Learner's Preference
More like this