Advanced Scene Switcher

Advanced Scene Switcher 1.31.0

Laczkó

Member
Hi,

I've a logic that I couldn't find an automation with ASS for, maybe somebody have an idea.
I've a bunch of scenes:
Scene 1, scene 2, scene 3, ..., scene n
I make a loop of some of the scenes in the following way: a macro starts "scene 1" at a specific time, than an other macro switch to "scene 2" after "scene 1" was played for 10 seconds, after another 10 seconds comes "scene 3" and so on, until "scene m" is played for 10 seconds (m=<n), than a macro not switch to "scene m+1", but to scene 1. This way I can easily change the length of the loop which is necessary, I want to change it quite frequently.
I want the loop to goes on for 1 minute except if more time needed to all the scenes showed at least once (so if more than 6 scenes are in the loop). Currently I have a macro, that cut off the loop at a specific time by switching to a scene that isn't part of the loop, so I have to set up the cut off time manually to one minute later than the loop starts if it has 6 or less scenes in it and to 10 seconds times the number of scenes in the loop later than the loop starts if it has more than 6 scenes in it. Is there a way to define a macro that adjust the cut off time to match the criteria above automatically?
 

Warmuptill

Active Member
Scene 1, scene 2, scene 3, ..., scene n
I make a loop of some of the scenes in the following way: a macro starts "scene 1" at a specific time, than an other macro switch to "scene 2" after "scene 1" was played for 10 seconds, after another 10 seconds comes "scene 3" and so on, until "scene m" is played for 10 seconds (m=<n), than a macro not switch to "scene m+1", but to scene 1. This way I can easily change the length of the loop which is necessary, I want to change it quite frequently.
This part I would implement like so:
  • Setup variables:
    One to handle the counting. (counter)
    One to store the current scene check. (current scene name with counter suffix)
    One to store the name of the scene to switch to (next scene name with counter suffix)
    Optionally one to store the point at which to restart the loop. (restart) This could be hardcoded in the later macro, but you mentioned you will change it frequently.
    1761338671578.png
  • Setup a helper macro to populate the scene name variables based on the counter value:
    1761339047230.png
    It won't need any conditions as we will trigger it from another macro.
  • Add the macro which does the scene switching based on the variable values we set up earlier:
    1761339099431.png
  • Add a final macro to restart the loop:
    1761339936783.png
You can import these example macros using this code:
Code:
AABGGnic7Vzdb9s2EP9XBKIPW2d5kuXESt62NMMMNG0Wp+3DWgy0dJK5ypRBUm5aI//7jtS38+UsbdN1fCigHO+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fEs0v4+tT5Y55m4S345GrvXlo3a23vWtrGdndNvK2lb2O2ll/6cXkb7FNottFtsstn2vH8nc1EtbqLNQZ6HOQt2XhzpA5o8V0H3AiXjNJOsz3hfbtA0WzCyYWTD7vsFsx59X3rVI0vs/SHbusSRdV5uUV6eQ0CJTzWd4nd9vdhtJd9fXXs51ZUZXZPyuUNvSbcn5g9qjZI/cuu/NmHyX7c21KYa5gCooTcyIPwxGQ8+dg6Jo8z9BL/GH

Note that the helper macro is not strictly necessary and you could put that part of the logic in the scene switch macro.
It just think it makes it a bit cleaner to have that part separated and you might want to reuse it to setup up initial values one OBS startup.

I want the loop to goes on for 1 minute except if more time needed to all the scenes showed at least once (so if more than 6 scenes are in the loop). Currently I have a macro, that cut off the loop at a specific time by switching to a scene that isn't part of the loop, so I have to set up the cut off time manually to one minute later than the loop starts if it has 6 or less scenes in it and to 10 seconds times the number of scenes in the loop later than the loop starts if it has more than 6 scenes in it. Is there a way to define a macro that adjust the cut off time to match the criteria above automatically?
For this I would introduce another variable which tracks if all scenes have been visited.
This is the case if the "Restart" macro was executed at least once.
So, simply append something like this to the end of the action list:
1761340171949.png


Then introduce another macro which pauses the scene switch macro if more than 60 seconds have passed or the "every scene was visible" was set to "true".

Hope that helps!
 
Top