For our basketball productions we use StreamDecks with Bitfocus Companion.
We trigger vMix scripts from the StreamDecks.
One such script is found below.
Comments are after the # and probably need to be taken out of the script.
We have multiple (7) replay cameras, e.g. a main camera (mid court) and cameras on each baseline.
We want a replay event to only have a checked camera for ONE of the two baselines (nearest the scored basket).
We also want the event to exist both in Bank 1 (main camera checked) AND in Bank 2 (one of the two baselines checked).
Confusingly, replay Banks are referred to in vMix scripts from 0 up, so 0 = Bank 1, 1 = Bank 2 etc.
However, the command 'ReplaySelectEvents2' selects Bank 2 (and not 3).
We register replay events after each scored basket.
There are 4 scripts for scored baskets: 2 per team: for each half of the game (since teams switch sides after halftime).
The Guest (away / road) team always scores on the Left (L) basket in the first half in our arena, from the main camera's stand point.
The scripts also add tags to the replay events and their angles.
Script for 1st half (1eh) when the visiting (Guest) team scores, capturing the 5 seconds before the StreamDeck button press:
script name: s031_-5_Guest_scores
Function=ReplaySelectEvents2 # activate replay Bank 2
Sleep 20
Function=ReplayACamera1 # optional
Sleep 20
Function=ReplayBCamera1 # optional
Sleep 20
Function=ReplayMarkInOutLive&Value=5
Sleep 20
Function=ReplayToggleLastEventCamera3 # checks ON Cam 3, Baseline Left / Toggle on or off playing back the Camera 1,2,3 or 4 of the last event.
Sleep 20
Function=ReplayToggleLastEventCamera1 # checks OFF Cam1, main cam
Sleep 20
Function=ReplaySetLastEventTextCamera&Value=3,Score_Guest_1eh_BaseL
Sleep 20
Function=ReplaySetLastEventTextCamera&Value=1,Score_Guest_1eh_Main
Sleep 20
Function=ReplaySetLastEventTextCamera&Value=2,Score_Guest_1eh_Close
Sleep 20
Function=ReplaySetLastEventTextCamera&Value=4,Score_Guest_1eh_SlamL
Sleep 20
Function=ReplaySetLastEventTextCamera&Value=5,Score_Guest_1eh_BaseR_far
Sleep 50
Function=ReplayCopyLastEvent&Value=1 # copy the last event to Bank 2 (we are already in Bank 2) / you hereby get two identical events in Bank 2
Sleep 50
Function=ReplayToggleLastEventCamera1 # this checks Cam 1 ON for the second of these two identical events
Sleep 20
Function=ReplayToggleLastEventCamera3 # this checks Cam 3 OFF for the second of these two identical events
Sleep 50
Function=ReplayMoveLastEvent&Value=0 # move the last event (from Bank 2) to Bank 1
[end of script]
We now have an event in Bank 1 with Cam 1 checked on,
plus an event in Bank 2 with Cam 3 (Baseline Left) checked on.
Bank 1 serves to quickly make a highlight reel in post-production, using only Cam 1 (main cam),
and Bank 2 serves to play replays during the livestream, using the baseline angles.
Script for the Home team ("LEI") scoring in the 1st half (Baseline Right):
script name: s032_-5_LEI
Function=ReplaySelectEvents2
Sleep 20
Function=ReplayACamera1
Sleep 20
Function=ReplayBCamera1
Sleep 20
Function=ReplayMarkInOutLive&Value=5
Sleep 20
Function=ReplayToggleLastEventCamera5
Sleep 20
Function=ReplayToggleLastEventCamera1
Sleep 20
Function=ReplaySetLastEventTextCamera&Value=5,Score_Lei_1eh_BaseR
Sleep 20
Function=ReplaySetLastEventTextCamera&Value=1,Score_Lei_1eh_Main
Sleep 20
Function=ReplaySetLastEventTextCamera&Value=2,Score_Lei_1eh_Close
Sleep 20
Function=ReplaySetLastEventTextCamera&Value=6,Score_Lei_1eh_SlamR
Sleep 20
Function=ReplaySetLastEventTextCamera&Value=3,Score_Lei_1eh_BaseL_far
Sleep 50
Function=ReplayCopyLastEvent&Value=1
Sleep 50
Function=ReplayToggleLastEventCamera1
Sleep 20
Function=ReplayToggleLastEventCamera5
Sleep 50
Function=ReplayMoveLastEvent&Value=0
To capture defensive highlights, create 2 extra scripts, replace "Score_Guest" with e.g. "Defense_Home" etc.
To capture scores in the second half, create 2 extra scripts, replace "Score_Guest_1eh_BaseL" with e.g. "Score_Home_2eh_BaseL" etc.
Hopefully, this is of some help.