...
As described above, Events are like flags or markers that allow an author to note when things have happened and then trigger new parts of the scenario based on those events. In this script, we will use Custom Events to trigger when scripts open in the scenario. This is a simple example - but there may be any number of situations where you want to use the custom event to trigger something while authoring.In this script, I want to create an Event that happens after the setup items are spawned in the environment. This is so that I can trigger the next script to run after the items are spawnedis triggered by the learner watching an instructional video. Once I have this Event, I can use it throughout the script as a Condition.
Step 1: Create the Event
Open the appropriate script
Click on the Events tab. It is in a tab beside Resources:
...
Click +Add New
Name the Event - “Assets Spawned” “Cleaning Procedures Reviewed” (in this example)
Make the Event Global (this means it can be used in any script in this Project)
Click the checkmark to save:
...
View file | ||
---|---|---|
|
Step 2: Add this Event to the script
Now that the Event has been created, we want to add it to the script after the assets have video has been spawnedviewed.
In this example, I will click on the Spawn Assets FrameUnder the Workshop Props, the frame where the video is located.
At the bottom of the Screen Media Resource, I’ll click on the Event Link Shortcut
Choose Complete Close Event:
...
Choosing complete close will open a new child frame under the “Spawn Assets” frame with the video.
I’ll Rename the child frame - Assets Spawned Event“Event”:
...
Drag and drop the Event we just created into the Resources pane of the Assets Spawned Event frame:
...
Now, when the assets have spawned, we have marked it learner views the video it is marked with an Event.
Step 3: Use Custom Event to trigger new Script or Frame Opening
Open the next script or frame to be run in the Scenario. In this example, it is a PPE Script where a video will be playedit’s Instructions on what to do next.
Drag and drop the Global Event you created into the Conditions pane of the script - Not the Resources:
...
Save
In the environment, you’d see the props in the scene spawn and then the video script will runThis now says when the event is triggered, the Screen Message with Instructions can fire.