Warmuptill
Active Member
Unfortunately, I don't think you can access the current state of JS code running inside of an OBS browser source.With a countdown that I found on github, I managed to create a button in adv ss that allows me to create it with a popup.. What I can't do is change the scene when the countdown ends.
https://github.com/AstroCorp/OBS-Countdown
View attachment 96082
The next thing I try is to create another macro where it evaluates If the Countdown Variable is equal to 0, change the scene.
but it doesn't work because the value of the variable it saves (for example: 10 sec.) is the one that is entered in the popup.
how could i achieve it? any ideas?
View attachment 96085
View attachment 96083
Maybe you can tweak the script to do the scene switching? (I don't have experience how to do that in JS)
To switch the scene once the timer in the Browser source runs out you will have to start a separate timer in the advanced scene switcher plugin at the same time as starting the countdown in the browser source and hope that they sync up.
You can achieve this using the "Timer" action and condition (which also supports the use of variables).
Hope that helps!
Alternatively one of the existing countdown scripts / plugins might already do what you are looking for.
Last edited: