Storyboards

Posts: 785
A Storyboard can be used to easily control a flow of consecutive actions at specific time intervals. You can add several storyboard Items to a Storyboard, where each item has its own configurable Start time, and a list of Actions to execute at that specific time.

A Storyboard is meant to replace complex control flows involving multiple timers. Instead the control flow is contained in a single Storyboard.


When you start a Storyboard, it will periodically check if it is time yet to start the next item. Once an item has reached its start time, all the Actions defined in that item will execute. The storyboard continues until all items have been executed, at which point it stops.

You can also give each item a name, but this is only used for your convenience so you can find items in long lists easier.

Finally, each item also knows the duration of the actions it will execute. Not all actions have a duration, but especially animations (as well as fading when showing or hiding widgets) know how long they play for so the items will reflect that time. This can further help you decide how long to delay each item for.


Storyboard editor
Below screenshot shows the editor where you control your Storyboard:



You can change the order of items by dragging/dropping them in place.


Storyboard actions
Storyboards can be started and stopped via the Restart and Stop storyboard actions. When you Restart a storyboard, any running instances are stopped first to ensure only one instance of the storyboard is running.

If you wish to start a storyboard from within itself (for a recursive infinite loop of the same storyboard), you can use the "Start new instance" action instead of the "Restart" action. Start new instance will play a new copy of the storyboard independently of any already running copies and allows you to run multiple copies of the same storyboard simultaneously, as well as allowing infinite recursively looping storyboards. Note that stopping a storyboard will immediately stop all instances.


Timing resolution
Please note: for performance reasons, the start time of an item is only accurate to about 100 ms. If you specify start times with greater resolution (like actions starting 10 ms apart), then they will be grouped together at 100 ms intervals. For more precision use timers.
Edited (5 times)
Posts: 46
Nice feature. This will replace all my timers that are used for my camera rotation!
Posts: 46
So I've created a little Storyboard for testing purposes, but there's a little porblem





This little storyboard should be an infinite loop between TV1 and Cockpit cam.
The Problem is, that the storyboard ends, the second time it has been executed.

I've attached, the event log, maybe that will give you some additional information.

16:23:12 Camera Rotation Storyboard finished and stopped.
16:23:12 Camera Rotation Changing camera group to Cockpit
16:23:11 Camera Rotation Changing camera group to TV1
16:23:11 Camera Rotation Storyboard started playing.
16:23:11 Camera Rotation Storyboard stopped manually.
16:23:09 Camera Rotation Changing camera group to Cockpit
16:23:08 Camera Rotation Changing camera group to TV1
16:23:08 Camera Rotation Storyboard started playing.
16:23:08 CamerRotON Button clicked.
Edited (2 times)
Posts: 785
Hmm. Perhaps there is some issue with a storyboard starting itself, I think that needs a bit more logic under the hood perhaps. I'll try to fix it. Meanwhile, you can get around it by starting a timer in the last storyboard item, and make sure that timer triggers after the storyboard has finished. Then the timer can restart the storyboard. As long as that does not happen at the same time (restarting should be after the storyboard has finished) it should work.
Posts: 785
A storyboard can now start itself. Please read the release notes carefully as you probably need to change the way you start the storyboard from within the storyboard:

  • Storyboard Actions now include two different ways to start a storyboard:
    • "Start new instance": this starts a new instance of a storyboard independent of any already running instances of the same storyboard. Running this action multiple times will start multiple instances of the storyboard which run simultaneously.
    • "Restart": this stops any already running instances, and starts a single instance of the storyboard. Using this action ensures you cannot accidentally start multiple copies of the storyboard.
  • The "Restart" action should be the normal way to start a storyboard, to ensure you don't accidentally click the button twice and start it multiple times.
  • The "Start new instance" action should be used if you want to start a storyboard from within itself (meaning: your storyboard contains an item with an action that starts the same storyboard). This results in a storyboard of infinite duration (as it will keep calling itself).
  • Please note that a storyboard calling itself will report an incorrect duration; this has no effect on the functionality.
  • The "Stop" action will stop all running instances of a storyboard.

For you, long story short:
  • The button to start the storyboard for the first time should use "Restart"
  • The action to start the storyboard recursively from within itself should use "Start new instance"

I had to change the way storyboards work a bit so please check if all works OK.
Posts: 46
Thanks Nick for the Update!

I've restarted the storyboard today with a timer, that worked well.

I'm updating this evening, and i'll give you a short feedback !

But anyways, awesome work, keep it up like that :)
Edited (2 times)
Posts: 61
Storyboard so far with testing my theme works wonderfull, replaces a bunch of timers for me! And it's very easy to recall certain widgets to appear/hide again!
Posts: 287
Do you think you can add a STOP ALL action in StoryBoard action to do like HIDE ALL in Widget action.
I do a HIDE ALL button wich use HIDE ALL and watch again my logo, but if a story board is running, part of Scene or Widget comes again.

I know how do to stop story board, but just to have an easy general action ;)
Edited (1 time)
Posts: 785
Yes, will be in next update.
Posts: 287
I see :)
Thanks