Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

For an overview of Resources, click here.

Panel
panelIconId1f393
panelIcon:mortar_board:
panelIconText🎓
bgColor#4C9AFF

Deep Learning on Resources is found in Motive Academy. Click here to see the course this lesson is in.

Table of Contents
minLevel1
maxLevel7

Overview

The Custom Event resource Resource emits an event Event within a scriptScript. Frames can conditionally play if the custom event Custom Event is specified using the Custom Event conditionCondition. This resource Resource can be used for branching out a scriptScript

The Custom Event resource Resource is different from the System State or Story Point resources Resources in that it does not use an enumEnum. Furthermore, the author can specify the scope in which the custom event Custom Event is called out. For example, the event Event can be local to the scriptScript, or global (in the session).

Required Fields

...

Field Name

Description

Custom Event

Specifies the name of the

custom event

Custom Event.

Events

OpenActivate, Activate Close, and Custom Event.

Example

...

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 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 scriptScript, 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

  1. Open the appropriate

...

  1. Script

  2. Click on the Events tab. It is in a tab beside Resources:

...

  1. Click +Add New

  2. Name the Event -

...

  1. “Cleaning Procedures Reviewed” (in this example)

  2. Make the Event Global (this means it can be used in any script in this Project)

  3. Click the checkmark to save:

...

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.

  1. In this example, I will click on the

...

  1. Frame

...

  1. where the video is located

  2. At the bottom of the Screen Media Resource, I’ll click on the Event Link Shortcut

  3. Choose

...

  1. the Close Event:

...

Choosing complete close will open a new child frame Frame under the “Spawn Assets” frameFrame with the video.

  1. I’ll Rename the child

...

  1. Frame -

...

  1. “Event”:

...

  1. Drag and drop the Event we just created into the Resources pane of the Assets Spawned Event

...

  1. 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

  1. Open the next

...

  1. Script or Frame to be run in the Scenario. In this example,

...

  1. it’s instructions on what to do next.

  2. Drag and drop the Global Event you created into the Conditions pane of the script - Not the Resources:

...

  1. Save

In the environment, you’d see the props in the scene spawn and then the video script will run.This now says when the Event is triggered, the Screen Message with instructions can fire.

Related Articles

Resources: An Overview

Replay Frame Resource

Close Frame Resource