0

TImeout Event and Variable Decrement

Hi. I'm building an interactive presentation. I have a video in zone one, that after an UDP message activates the second zone. The second zone runs its video, and if there is no new interactivity, after 30 seconds it hides and the first zone shows and runs its video (with a timeout event). No trouble there.

Thing is, when running the video on zone 2, i can get another interactivity. I need the second video to continue running hidden (it needs to keep the timeline) and show a third zone over it. I did set up a variable (0 or 1), that checks if the third zone is running (set variable to 1) or already finished (set to 0). And conditionally i check in the timeout of 30 seconds the variable value.

I was expecting with the conditional that the timeout does nothing if value is 1, and "waits" another 30 seconds to run again. But it doesnt seem to start over, it wont check again after passing throught the event the first time. I also tried to set a variable with a value of 30, and have the timeout with 1 second, to use that variable to go from 30 to zero and then check at zero. But well, its the same overall idea, and the problem is the same.

The question, how can i have a checking loop of variable value? I cant use the timeout to go back to the same state cause it restarts the video...

3 comments

  • Avatar
    Brandon Official comment

    The Timeout event in particular is set only once upon entry to the state.  In other words, on entry to a state, it will trigger zero or one time until that state is re-entered.

    Add an additional Control or Image zone and put an Event Handler in it to handle the Timeout event, and have it transition back to the same Event Handler.  If it needs to communicate with states in other zones, for example for Pause/Resume, have it send a Zone Message and use a Zone Message event in the other zone.

    Note that state exit/entry does take non-zero time, so setting a 1s Timeout that decrements a variable will take slightly longer than 1 second round-trip, so you may need to adjust the Timeout value based on player model it's running on as newer players tend to have faster processing.

  • 0
    Avatar
    Heinz Susaeta Jenssen

    If i understand correctly, you mean leave the video running on its own on his zone, and have another fake zone with the handlers to manage the logics on every other zone, is that right?

     

    I made it work like you said, with an image zone that stays hidden, filled with Event Handlers that move the logics with zone messages. Thank you very much for your help!

  • 1
    Avatar
    William C. Albertson

    It sounds like you've successfully implemented a solution where you have a video running in one zone while using handlers in another zone to manage the logic for other zones. This approach can help separate concerns and make your application more modular and easier to manage.

    Using an image zone filled with event handlers to manage logic across different zones is a clever way to organize your application. This allows you to keep the main functionality and logic separate from the visual elements, making it easier to maintain and update in the future.

    I'm glad to hear that the solution worked for you, and you were able to achieve the desired functionality. If you have any further questions or need additional assistance, feel free to ask!

Please sign in to leave a comment.