Info |
---|
For an overview of Conditions, click here. |
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Deep Learning on Conditions is found in Motive Academy. Click here to see the course this lesson is in. |
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
This example shows how to give the learner a message after a certain amount of time has passed. This can be a useful way to give the learner a hint.
We will create a simple script with a screen message. If the learner does not click the “OK” button on the message after three seconds, a voice-over will play asking the learner to click “OK”.
This method will work for any type of hint that uses a timer.
Step 1 - Add a Screen Message a Script
1. In a new Script, drag a Playable Content Screen Message into a Frame:
...
2. Give the Screen Message a title and some text:
...
Step 2 - Add a Notification After the Welcome Message Closes
When the learner does click the “OK” button, the welcome Screen Message will close. Let's make a Notification appear in that case.
1. Click the Event Link Shortcut at the bottom of the Screen Message and select Close:
...
A new child Frame will be created. The Condition will be an Object Event Condition checking to see if the Screen Message has closed:
...
2. Add a Notification to the Resources area and add “Done!” in the Message field:
...
When the learner closes the Screen Message, a Notification will appear that says “Done!”.
3. Save
Step 3 - Add a Frame with a Timed Message
At the moment, the script looks like this:
...
1. Add a new child Frame by clicking the + button on the Welcome Frame:
...
2. Name the new Frame “Timed Hint”. We'll add a voice-over that will remind the learner to click the “OK” button. If you haven't yet created a voice-over audio file, you can do that by following the steps in this article.
3. Add an Audio Resource to the Frame and add your voice-over audio file to the media Frame:
...
We only want this audio to play when:
Three seconds have passed since the Welcome screen appeared
AND
The Welcome screen has not been closed (the button has not been pressed)
For the first part, we can use a Timer Condition.
4. Add a Timer Condition
5. Add 3 Seconds into Timer Condition Delay:
...
We want to add a second Condition to this Frame. If you'll remember, the Frame with the Notification has a Condition that is waiting for the Welcome message to close. We want the opposite of that for our second Condition in this Frame.
6. Drag an Object Event Condition into this Frame. This will create a Compound Condition with the Timer Condition we just added and the Object Event Condition:
...
A. Operator: This is set to AND. This means both Conditions must be true for the audio to play.
B. Script Object: Welcome message
C. Event: Close
D. Negate Result: Checked. This means, for the Object Event Condition check the opposite. The Object Event Condition is checking if the Welcome message is closed but since this box is checked, it means, anything except closed.
Recap
In plain language, this Condition asks:
"Have three seconds past and is the welcome message is not closed?"
If that is true, the voice-over audio will play. That might be enough. There is one final step that can be used or not.
As it is, if the voice-over audio starts playing and the learner clicks the “OK” button before the audio has finished, the audio will play until it is done. If you want the audio to stop immediately when the “OK” button is clicked, go to the next step.
Step 4 - Close the Timed Hint Frame
If the learner clicks the “OK” button, the timed hint isn't needed anymore. We can close the Frame that contains the hint once we know the learner has passed that point. Once the Notification is displayed, we know that the “OK” button has been clicked.
1. In the Notification frame, add a Close Frame Resource:
...
2. Select Timed Frame in the Frame drop-down:
...
3. Save
Now the Timed Hint frame will close as soon as the Welcome screen “OK” button is clicked.
A closed Frame will never activate. It will also close the Frame immediately. If the learner clicks the “OK” button while the voice-over hint is playing, the close Frame will stop the audio from finishing.