Although Opus provides a wide variety of triggers and actions, you may decide that you want some other unique event to trigger a list of actions. For this reason, Opus allows you to create your own customised triggers and actions.
There are two reasons why you may want to create your own customised trigger and action:
One action starts a series of actions – for example, a user clicks a button that contains a Custom Action named Show Images, this will search for a Custom Trigger on the current page also named Show Images; when it finds the trigger it then runs its list of actions.
Different triggers on different objects start the same list of actions – for example, you can have the same list of actions happen when a user: clicks a button object; moves over an image object; or types the correct answer in a text object – by simply adding the Custom Action to each object’s trigger, which will then activate the Custom Trigger.
Once you understand the purpose of the Custom Action, it is quite easy to understand how the Custom Trigger works. Quite simply, it is a two-step process:
1. The Custom Action is like any other action, it is added to a trigger. However, the sole purpose of the Custom Action is to activate a Custom Trigger.
2. The Custom Action has one option, the Action Name box. This box is used to type the name of a CustomTrigger. For this example, the trigger is named Show Images.
3. When a Custom Action is activated, it will search the current object for a Custom Trigger with the same name (e.g. Show Images). If it does not find one, it will search every object on the current page and the page itself for the Custom Trigger.
4. When a Custom Action finds a Custom Trigger with the same name, the trigger is activated.
5. If there are other actions underneath the Custom Action, these are run.
Note:
This means that actions under the Custom Action and actions under the Custom Trigger will be playing at the same time.
1. When a Custom Trigger is activated, it runs its own custom action list.
2. The Custom Trigger can only be activated when a Custom Action calls it, as described in Step 1 above.
Note:
You can also activate a Custom Trigger using OpusScript – see TriggerComponentEvent for more information.