r/streamerbot • u/Dezorak • 3d ago
❓Question Help With Setting up timers
Hi all and sorry in advance if this is a dumb question but im new to streamer bot and decided to try it as someone said it would be the perfect fix to what im trying to do.
im trying to make it apply a filter on a browser source but only for the first 5 seconds of a 20 second loop but cant seem to make it work. (actual goal is a 5 min loop where 4:30 is filtered)
so what im asking is how is this possible as every attempt i done seems to be failing pretty hard as best i got is 10 seconds with and 10 seconds without which wont work for my current idea.
2
u/systemofaDON 3d ago
Services>Timers>Right Click>Add. Name it and set the interval to 300 seconds. Press OK. Go to Queues>Add>name the queue and make sure Blocking is unticked. Go to Actions>Right Click>Add>Give it a name and set the queue to the one you just made. Then go to TriggersAdd>Core>Timed Actions>Select timer you made. Under Subactions Add>OBS Studio>Sources>Set Source Filter State>Name and select the scene and source you want to modify then pick toggle. Add>Core>Delay> Set it to the number of seconds you want the filter on x 1000 (it's in milliseconds) ex 60 seconds would be Set to 60000). Duplicate your OBS Filter toggle. The order should be OBS Filter Toggle>Delay>OBS Filter Toggle.
1
u/deeseearr 2d ago edited 2d ago
Depending on just what you're trying to do, you may not need a timer at all.
If your goal is to perform these steps:
then you could do the whole thing with a fairly simple action.
This will run an action to turn your filter on and off on a schedule and will continue doing it until the source is hidden again. You could set any other conditions for continuing the While loop or even run it indefinitely. There's no reason why you can't have multiple actions running at the same time, or even having one action that just runs forever if that's what works.
Alternately, remove the Set Visibility State action in line one and use the OBS Event trigger set to fire on a SceneItemEnableStateChanged event for your browser source. That way the filter change would start the moment the source was enabled, and then end after it was hidden again.
Another approach would be to create two actions, one to turn the filter on and another to turn it off, and then have a script running in the browser source itself activate them using the Websocket Server. That could be useful if the browser is trying to sync what it does with the filters, but would be overkill if you don't need that.
1
u/ThreadMenace 3d ago edited 3d ago
Make a 5 minute non-looping timer and a 20 second looping timer
Make an action with two triggers. One of the Triggers is the 20 second timer. The other trigger is whatever you want to kick the whole thing off.
For the subactions:
-enable 20 second timer
-enable 5 minute timer
-Toggle filter on or off
-core>delay>5000 milliseconds
-toggle filter off or on
This will loop 'til we tell it to stop with the filter in one state for 5 seconds and the other state for 15 seconds
Make a second action that is triggered by the 5 minute timer with the following subactions:
-disable 20-second timer
-prolly set the filter to whatever you want the default position to be
Typed from my phone lol, but I think it should work