For an overview of Conditions, click here.
The Object Event condition is met if a resource emits the specified event. This is a very commonly used condition.
An example of this would be a Screen Message firing off “Option 1” when a user answers an on-screen question. Or a “Close” event when a Screen Message is closed.
Required Fields:
Field Name | Description |
---|---|
Script Object | Specifies the object to listen to that will fire the event. |
Event | Specifies the event being listened for. This is the event that must be fired in order for this Condition to be true. |
Optional Fields:
Field Name | Description |
---|---|
Negate Result | Specifies if the result is negated. If the object does not emit the specified event, then the condition is met. For example, if there is a Screen Message resource and the learner does not close the message then the event would fire because the message was never closed. |
Ignore Previous | Specifies if the condition is listening only for the most current event emitted by the object. |
Example
I want to create a script that will welcome the learner to the training session and show them a video.
Create a Screen Message with instructions:
Create a sub-frame for the Welcome Message.
Add an Object Event Condition with the Script Object = Welcome message and the Event = Close.
Add the resource, in this case, Screen Media, to play once the Object Event Condition has been met:
What we've done is created a script that says "When the screen message fires and the learner clicks the OK button, then play the video".
There are options on scripting to handle situations where the learner doesn't click the ok button and therefore the scenario can't proceed. See a solution at the end of this article.