mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-26 03:06:17 -05:00
Created Switch scenes randomly (markdown)
49
Switch-scenes-randomly.md
Normal file
49
Switch-scenes-randomly.md
Normal file
@@ -0,0 +1,49 @@
|
||||
Depending on what your requirements are different approaches can be used to randomly switch to one scene of a list of scenes.
|
||||
|
||||
* If you want to switch to each scene for the same or a random amount of time before continuing to the next one using [Scene Groups](Scene-groups) would be recommended.
|
||||
* If you instead want to switch to each scene for a predetermined amount of time using the "Random" macro action is likely the best approach.
|
||||
|
||||
## Scene Groups
|
||||
|
||||
As first step you will have to set up a [Scene Groups](Scene-groups) containing all the scenes you want to randomly switch to.
|
||||
Make sure to set the type to "Random".
|
||||
|
||||

|
||||
|
||||
Next [create a macro](Macros#creating-a-new-macro) to switch to switch to this scene group.
|
||||
|
||||
As a condition chose whatever best fits your needs. In this example we will continuously switch scenes randomly so we choose the "Plugin state" condition type.
|
||||
|
||||
The action will consist of a scene switch action (1) and a wait action (2).
|
||||
As the scene switch target select the previously created scene group.
|
||||
Finally configure the wait action to your needs.
|
||||
In this example it was set to wait for a random duration between 5 and 10 seconds.
|
||||
|
||||

|
||||
|
||||
This macro will now continuously switch to a scene from the [Scene Groups](Scene-groups) wait for a random duration between 5 and 10 seconds before triggering the next scene switch.
|
||||
To not interfere with other macros you might have created you can mark this macro to run in parallel to other macros (3).
|
||||
|
||||
## Random macro action
|
||||
|
||||
This approach is more tedious to set up than the one using [Scene Groups](Scene-groups) but will allow you configure how long to stay on each particular scene before continuing to the next one.
|
||||
|
||||
First [create macros](Macros#creating-a-new-macro) for each scene you want to randomly switch to.
|
||||
These macros will not require any conditions as they will be executed by another macros.
|
||||
The actions list should consist of a scene switch action and a wait action, similar to the following:
|
||||
|
||||

|
||||
|
||||
Note that you can create a copy of macros by right clicking on the macro you want to copy.
|
||||
|
||||

|
||||
|
||||
Once you have created all these scene switch macros you will have to create one final macro which will execute the scene switch macros in a random order.
|
||||
To do so first set up the conditions to your requirements. (In this example we will continuously run this macro so the "Plugin state" condition is chosen)
|
||||
Add a new action of type "Random" (1) to the action list of this macro.
|
||||
Next add each of the previously created scene switch macros to the Random action by pressing the plus button (2).
|
||||
|
||||

|
||||
|
||||
This macro will now continuously execute the scene switch macros in a Random order.
|
||||
To not interfere with other macros you might have created it might be a good idea to mark this macro to run in parallel to other macros (3).
|
||||
Reference in New Issue
Block a user