I made a simple script for skipping the flipper solenoids for games with the easy solenoids (most tables up to WPC 95' / Whitestar / Capcom)
add this to your keydown section, if the "keycode = LeftFlipperKey" part isn't there, copy it in
If keycode = LeftFlipperKey Then
flipnf 0, 1
end if
If keycode = RightFlipperKey Then
flipnf 1, 1
end if
and this to key up
If keycode = LeftFlipperKey Then
flipnf 0, 0
end if
If keycode = RightFlipperKey Then
flipnf 1, 0
end if
Find the old solenoid callback subs and comment out the flipper-related stuff.
SolCallback(sLRFlipper) = "SolRFlipper"
SolCallback(sLLFlipper) = "SolLFlipper"
Sub SolLFlipper(Enabled)
If Enabled Then
' PlaySound "flipperup",1,0.1:LeftFlipper.RotateToEnd
Else
' PlaySound "flipperdown",1,0.1:LeftFlipper.RotateToStart
End If
End Sub
Sub SolRFlipper(Enabled)
If Enabled Then
' PlaySound "flipperup",1,0.1:RightFlipper.RotateToEnd
Else
' PlaySound "flipperdown",1,0.1:RightFlipper.RotateToStart
End If
End Sub
Then add this in it's own section nearby.
Make sure the solcallback is set to the correct solenoid number: solcallback(23) for System 11 / Data East, solcallback(31) for WPC-alphanumeric through WPC security, solcallback(32) for Gottlieb system 3. Change the flipper sounds in LeftFlipperSound and RightFlipperSound to match the table's sounds, add any upper flippers.
'*********
' Special Flippers
'*********
dim FlippersEnabled
SolCallback(31) = "TiltSol"
Sub TiltSol(Enabled)
FlippersEnabled = Enabled
if Enabled Then
' l131.state = 1
vpmnudge.solgameon true
Elseif not Enabled Then
' l131.state = 0
vpmnudge.solgameon false
if leftflipper.startangle > leftflipper.endangle Then
if leftflipper.currentangle < leftflipper.startangle then leftflipper.rotatetostart : leftflippersound 0 : end if
elseif leftflipper.startangle < leftflipper.endangle Then
if leftflipper.currentangle > leftflipper.startangle then leftflipper.rotatetostart : leftflippersound 0 : end If
end If
if rightflipper.startangle > rightflipper.endangle Then
if rightflipper.currentangle < rightflipper.startangle then rightflipper.rotatetostart : rightflippersound 0 : end if
elseif rightflipper.startangle < rightflipper.endangle Then
if rightflipper.currentangle > rightflipper.startangle then rightflipper.rotatetostart : rightflippersound 0 : end If
end If
end if
end sub
sub flipnf(LR, DU)
if LR = 0 Then 'left flipper
if DU = 1 then
If FlippersEnabled = True then
leftflipper.rotatetoend
LeftFlipperSound 1
end if
controller.Switch(swLLFlip) = True
Elseif DU = 0 then
If FlippersEnabled = True then
leftflipper.rotatetoStart
LeftFlipperSound 0
end if
controller.Switch(swLLFlip) = False
end if
elseif LR = 1 then ''right flipper
if DU = 1 then
If FlippersEnabled = True then
RightFlipper.rotatetoend
RightFlipperSound 1
end if
controller.Switch(swLRFlip) = True
Elseif DU = 0 then
If FlippersEnabled = True then
RightFlipper.rotatetoStart
RightFlipperSound 0
end if
controller.Switch(swLRFlip) = False
end if
end if
end sub
sub LeftFlipperSound(updown)'called along with the flipper, so feel free to add stuff, EOStorque tweaks, animation updates, upper flippers, whatever.
if updown = 1 Then
playsound SoundFX("Flipperup",DOFContactors) 'flip
Else
playsound SoundFX("Flipperdown",DOFContactors)'return
end if
end sub
sub RightFlipperSound(updown)
if updown = 1 Then
playsound SoundFX("Flipperup",DOFContactors) 'flip
Else
playsound SoundFX("Flipperdown",DOFContactors)'return
end if
end sub
Some troubleshooting:
Some tables will be using this solenoid for something already. You'll have to merge the existing sub with the new sub, TiltSol
Script error (line 1: Object not a collection) probably means cvpmNudge's tilt objects aren't set up. You can set them up like this in the table init sub:
vpmNudge.TiltObj = Array(Bumper1, Bumper2, Bumper3, LeftSlingshot, RightSlingShot) 'etc
or just comment out vpmnudge.solgameon.