Choose the Right Object
In this scenario there will be a fire in the kitchen. The trainee will need to decide whether to put the fire out by smothering it with the pot lid or throwing water on it.
From the dashboard, select the “Choose the Right Object” script.
Add a new frame
Add a “Span Asset” resource
- Choose the “Kitchen Fire” asset from the Unity assets catalog that pops up
- Select “Relative Position” from the “Position” drop-down
- Position the fire by anchoring it to the Pot on the Stove
Add a screen message to prompt the user to take action
- Choose “Screen Message” for your content type
- Add the instructions to the text fields
Create an Inquiry to Have Trainee Decide the best way to Extinguish the Fire
Add an “Inquiry” resource
Drag and “Inquiry” resource into the new frame’s work area. Configure it as follows:
Select “Choose between multiple objects” for the inquiry type.
The first object you could use to put out the fire is the pot lid. Choose it. Add a text prompt that says “Put the fire out with the pot lid”
Add a second choice by clicking the ‘+’ button beside “choice” again. The second option for putting out the fire is the mug of water.
Create Option Outcomes by Branching
We will create branched outcomes using the same method we used in the last tutorial.
Option 1 – Pot Lid
Author outcome for option 1 – smother
In this scenario, the correct action is using the pot lid. For brevity, we will just have the fire go out when the pot lid is selected. It would be more realistic to have the user pick up the put lid and put it on the pot. This is possible, but for now, the fire will go out when the pot lid is clicked. We need to add a “Deactivate Resource” resource to stop the fire.
The “Deactivate Resource” resource will look like this:
Option 2 – Throw Water
Go back to the “Choose Object” frame and click the ‘+’ beside option 2 in the “Inquiry” resource in the work area. This creates a second branch with a new frame.
Author outcome for option 2- water
In the new frame for option 2 – throw water, let’s tell the trainee they got it wrong. We will attach a notification to the pot that says “The fire is still burning!”
Drag an “Object Playable” into the work area of the new frame. Configure as follows:
- Attach the object playable to the pot so that the notification shows up above it.
- Be sure that the object playable type is a “Notification”. Add the notification text to let the trainee know they made the wrong decision.
Save and Test
Save your script and try it in the app. Be sure to select “Reset” from the app menu, then select the “Choose the Right Object” scenario. If you haven’t already, you will need to navigate into the kitchen by tapping on the green navigation pads throughout the house. The kitchen is near the back of the house.