Some OBS commands are not as simple as switching a scene or making a source visible.
If you want to use scenes becoming dynamic default state but you have exceptional scenes you could get easy a heartache as the app has no memory which was the last dynamic default scene.
With Raw OBS JSON Data commands you can trick OBS though.
For this scenario you need at least Lumia Version 5.3 beta!
In this scenario I want to have several scenes the viewer can switch with a ! chat-command. All scenes should become dynamic default state to stay but one scene with a content should after it is finished switch back to the last dynamic default scene. I.e. I have 4 scenes named: Blue, Red, Green and Yellow. Yellow is a videosequence and should return after its finished. So !Blue triggers a blue background scene and overwrites the last default state and stays as it is. If !yellow is triggered it should remove to blue though as it is the last dynamic default state.
At first you have to tick in Default State setting the checkbox on “Turn On Dynamic Default”!
Now you set your chat-commands. We dont need any studio creations for this. But of course you could also use that inside your command. So to set up the first scene switch we go
Name the command: Here we take blue. As type you can use every type which lets you tick the “Permanent Default” checkbox. I have chosen Type Color and put a blue in it. All other settings are to your own favor. Duration doesn’t matter as it will stay perm.
Don’t forget to tick the checkbox
! Do the same steps with “Red and Green”. Now comes the magic
The next command you can set everything to your favour BUT DO NOT TICK THE “PERMANENT DEFAULT” CHECKBOX!
Now go to OBS on the top tab and choose
Type “Send Raw OBS JSON Data”
Put in the editor box:
Press save. And select again Type “Send Raw OBS JSON Data”
Same procedure… select Raw OBS
Now you choose
and put there your duration of the scene you want to have it on the screne
Save and choose again Raw OBS:
And a last time:
Now the trigger !yellow will trigger all this code after each other and start Studiomode in OBS where it allows Lumia to switch to the previous scene. After all is done correctly Studiomode will close again until it is triggered.