"Persistent" Scripted Value

Working with DMX Input Triggers, I have a few DMX Addresses, I'm notating them as DMX(Address) below:

I have a setup where I'm using a trigger for DMX(6) Input to set Timeline Rate for a Mosaic system. I Wrote a script that searches the Timelines that could be running, finds the Timeline that is onstage, and applies the DMX(6) Value as the :set_rate(DMX)

There is also a DMX Channel that will Start Timelines in Mosaic. A Script I wrote will set the Timeline from DMX(5) mapped to a range of Timelines.

The goal is any time I change to a new Timeline Selection, I want the New Timeline that is running to also :set_rate(DMX6) from the DMX Trigger.

I'm thinking it would be best to Set a variable in the Timeline Rate, that when the trigger for DMX(5) starts a new timeline, it should also set the Rate from this variable.

But I'm not quite sure I understand how to make a Variable that can be set in one Script, and then read in another script.

  • Can’t you just define a global variable and just use that?

  • Create a startup trigger and new script for that trigger. Define your variables there. This will allow the variables to initialize only on startup and you can get/set the variable values within that script from other scripts.

  • Ah that's the idea with a Startup Script.

    So if you set a Variable, say rate,

    Then My DMX Trigger can set rate, force that rate currently on the running timeline, AND the

    Selector DMX Trigger Can start a timeline using rate from the Startup Script.