Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

QS0 trigger cmd

maybites edited this page Oct 23, 2021 · 1 revision

home/reference v0.x/<trigger>

<trigger>(string) {expr}</trigger>

Simple Example

<trigger>nextCue</trigger>

Content

Any List of Strings, numbers and {expr}

Attributes

  • None

Child Commands

  • None

Explained

The main difference to the other messages is it creates also an internal 'trigger' message that is send to all the currently playing ques of this script. this allows to trigger <wait> cmds in other ques. Example:

<que name="Start" loop="no">
    <play name="Reset"/>
    <wait trigger="resetDone"/>
    <print>Reseted. Ready for action</print>
</que>
<que name="Reset" loop="no">
    <print>Executing Reset</print>
    <trigger>resetDone</trigger>
</que>

When <que> 'Start' is played, first thing it does is start playing <que> 'Reset' and <wait> for a trigger called 'resetDone'. When <que> 'Reset' plays, it first <print>s out the message Executing Reset and then sends a <trigger>-message 'resetDone'. Which the <wait> cmd inside 'Start' will pickup and carry on with <print>ing Reseted. Ready for action.

Like all messages, <trigger> will create a Max-message that exits at the left outlet of the QueScript Max-object. With the above example it would be a list that looks like this:

trigger nextCue

It is up to the implementing programmer to decide what to do with it. It is intended to send it to a 'route' - object in order to separate it from the other messsages and could be used to trigger other QueScript-objects.

Clone this wiki locally