Looks like the DOF issue has been addressed above, so I will throw this idea out there for fun as something to think about.
When I released Scooby Doo 2022 (and thanks JP for Wooly and your coaching/contributions on SCOOBY), I wanted to approach DOF in different way such that all the literal dof commands could be quickly stored, managed, retrieved or modified depending whatever DOF control boards people may be using where the DOF codes may be different
1) DOF variable names were created in a TABLE with values set to exact DOF trigger commands. Codes don't get buried deep in the script.
2) Created a DOF testing subroutine so you can TEST which DOF solenoid/toy are triggering F1-F8 in my case.
3) Swapped in a variable name (ex. dof_flipper_left instead of the DOF command code 101) when the actual call is made to the Left Flipper Solenoid in my example.
The idea here with my code is for any future VPX tables I work on, a lot of the heavy lift of DOF management can be done in the translation table.
1) DOF TRANSLATION TABLE & VARIABLES DEFINDED:
'***** DOF DEVICE TRANSLATION TABLE ***** SCOOBY code added initialization and variables for DOF
'** Initial Configuration for 8 Channel Control board (Your DOF trigger codes may be different just fix them here)
'** Fold these variables into the table script when the DOF commands trigger.
Dim dof_off : dof_off = 000
Dim dof_plunger : dof_plunger = 000
Dim dof_autoplunger : dof_autoplunger = 141 'SCOOBY triggers right slingshot??
'** Primary DOF Devices 8 Channel Sainsmart Board
Dim dof_flipper_left : dof_flipper_left = 101
Dim dof_flipper_right : dof_flipper_right = 102
Dim dof_slingshot_left : dof_slingshot_left = 103
Dim dof_slingshot_right : dof_slingshot_right = 104
Dim dof_popbumper_left : dof_popbumper_left = 105
Dim dof_popbumper_right : dof_popbumper_right = 106
Dim dof_shaker : dof_shaker = 132 'SCOOBY code Shaker motor (119/128/132) triggers on Mystery Machine Magnasave
Dim dof_knocker : dof_knocker = 108 'SCOOBY used in FREE GAME award (107/108)
'** Additional DOF Triggers Physical Objects and useful variables
Dim dof_spinner_left : dof_spinner_left = 000 'SCOOBY code making the call to the shaker motor
Dim dof_spinner_right : dof_spinner_right = 000 'SCOOBY code making the call to the shaker motor
Dim dof_gear : dof_gear = 000
Dim dof_blower : dof_blower = 000
Dim dof_magnet : dof_magnet = 132
'** Additional DOF Triggers Games specific variables and alias names to trigger DOF activity
Dim dof_add_credit : dof_add_credit = 000
Dim dof_captive_ball : dof_captive_ball = 132 'SCOOBY code captive ball triggers shaker motor pulse code 119
Dim dof_test_channel : dof_test_channel = 105 'SCOOBY code test problematic DOF Channel Cmds105=LeftPopBumper
2) DOF CHANNEL TRIGGER TESTING SUBROUTINE F1-F8
'** DOF Key Code & Channel testing ' SCOOBY code for testing Sainsmart 8 control board
IF sd_doftesting = "ON" THEN
If keycode = "59" Then DOF dof_flipper_left, DOFOff 'F1
If keycode = "60" Then DOF dof_flipper_right, DOFOff 'F2
If keycode = "61" Then DOF dof_slingshot_left, DOFOff 'F3
3) ACTUAL TRIGGER CALL MADE TO LEFT FLIPPER using DOF Variable Names (JP's literal line is above my "variablized" line)
Sub SolLFlipper(Enabled)
If Enabled Then
'WOOLY PlaySoundAt SoundFXDOF("fx_flipperup", 101, DOFOn, DOFFlippers), LeftFlipper
PlaySoundAt SoundFXDOF("fx_flipperup", dof_flipper_left, DOFOn, DOFFlippers), LeftFlipper 'SCOOBY code DOF