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:
Create a Script called Instructions Template
Open the new Script
Add a Playable Content > Screen Message Resource
Enter Instructions into the Resource
Click the Dynamic icon next to the Text field (it looks like an atom)
Click the "+" button at the end of the Text field
This is our Variable name. You can use the default or enter your own name. Then click the checkmark.
On the right hand side, click the Variables tab and click the three dots next to your Variable name
Select “Edit”
Check the “isInput” box and save the Script. The Variable is now an input Variable.
On the Screen Message, click the "+" and select “close”
Add an End Script Resource in the new Frame
Give the Frames readable names and click “Save”
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.
Create a Frame and call it First Instruction
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.
Type This is my first instruction
Click the "+" button on the Launch New Script Resource and select close
Name the new frame - Second Instruction
Add a Launch New Script Resource and choose the “Instruction Template” Script
Enter This is my second instruction into the field and save the Script
Click the Project tab, create a Scenario and assign the “Many Instructions” Script