Advertisement
Guest User

Untitled

a guest
Nov 7th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VBScript 45.68 KB | None | 0 0
  1. 'No Good Gofers by Bodydump
  2. 'Models by Dark
  3. Option Explicit
  4. Randomize
  5.  
  6. On Error Resume Next
  7. ExecuteGlobal GetTextFile("controller.vbs")
  8. If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
  9. On Error Goto 0
  10.  
  11. const UseVPMModSol = 1
  12. Const BallSize = 50
  13.  
  14. '***Apron Style***
  15. ' 0 = Standard apron
  16. ' 1 = Custom apron
  17. apronstyle = 0
  18.  
  19. '**************************
  20. 'Desktop/Fullscreen Changes
  21. '**************************
  22.  
  23. If Table.ShowDT = true then
  24.     Ramp15.visible = True
  25.     Ramp16.visible = True
  26.     Ramp17.visible = True
  27.     Light47.Intensity = 0
  28. else
  29.     Ramp15.visible = False
  30.     Ramp16.visible = False
  31.     Ramp17.visible = False
  32. end if
  33.  
  34.  
  35.    LoadVPM"01520000","WPC.VBS",3.1
  36.  
  37.  
  38.  
  39. '********************
  40. 'Standard definitions
  41. '********************
  42.  
  43.     Dim xx, apronstyle
  44.     Dim Bump1, Bump2, Bump3, RGoferIsUp, RightRampUp, LGoferIsUp, LeftRampUp
  45.     Dim bsTrough, bsLeftEject, bsPuttOutPopper, bsJetPopper, bsUpperRightEject, mTT, cbCaptive
  46.     LGoferIsUp = 0
  47.     LeftRampUp = 0
  48.     RGoferIsUp = 0
  49.     RightRampUp = 0
  50.     Const cGameName = "ngg_13"
  51.     Const UseSolenoids = 1
  52.     Const UseLamps = 0
  53.     Const UseGI = 0
  54.     Const UseSync = 0
  55.     Const HandleMechs = 1  
  56.  
  57.     Set GICallback = GetRef("UpdateGIon")
  58.     Set GICallback2 = GetRef("UpdateGI")
  59.  
  60.     Const SSolenoidOn="fx_Solenoid"
  61.     Const SSolenoidOff="fx_solenoidoff"
  62.     Const sCoin="fx_Coin"
  63.  
  64. '***********
  65. ' Solenoids
  66. ' the commented solenoids are not in used in this script
  67. '***********
  68.  
  69.         SolCallback(1)="vpmSolAutoPlunger Plunger1,3,"                  'Autofire
  70.         SolCallback(2)="vpmSolAutoPlunger KickBack,3,"                  'KickBack
  71.         SolCallback(3)="SolPuttOut"                                     'Clubhouse Kicker
  72.         SolCallback(4)="SolLeftGoferUP"                                 'Left Gofer Up
  73.         SolCallback(5)="SolRightGoferUP"                                'Right Gofer Up
  74.         SolCallback(6)="bsJetPopper.SolOut"                             'Jet Popper
  75.         SolCallback(7)="bsLeftEject.SolOut"                             'Left Eject (Sand Trap)
  76.         SolCallback(8)="bsUpperRightEject.SolOut"                       'Upper Right Eject
  77.         SolCallback(9)="SolBallRelease"                                 'Trough Eject
  78. '       'SolCallback(10)="vpmSolSound ""Sling"","                       'Left Slingshot
  79. '       'SolCallback(11)="vpmSolSound ""Sling"","                       'Right Slingshot
  80. '       'SolCallback(12)="vpmSolSound ""Jet3"","                        'Top Jet Bumper
  81. '       'SolCallback(13)="vpmSolSound ""Jet3"","                        'Middle Jet Bumper
  82. '       'SolCallback(14)="vpmSolSound ""Jet3"","                        'Bottom Jet Bumper
  83.         SolCallback(15)="SolLeftGoferDown"                              'Left Gofer Down
  84.         SolCallback(16)="SolRightGoferDown"                             'Right Gofer Down
  85.         SolModCallback(17)="SetModLamp 170,"                                    'Jet Flasher
  86.         SolModCallback(18)="SetModLamp 178,"                                    'Lower Left Flasher
  87.         SolModCallback(19)="SetModLamp 180,"                                    'Left Spinner Flasher
  88.         SolModCallback(20)="SetModLamp 122,"                                    'Right Spinner Flasher
  89.         SolModCallback(21)="SetModLamp 179,"                                    'Lower Right Flasher
  90.         SolCallback(24)="SolSubway"                                     'Underground Pass
  91.         SolModCallback(25)="SetModLamp 131,"                                    'Sand Trap Flasher
  92.         SolModCallback(26)="SetModLamp 190,"                                    'Wheel Flasher
  93.         SolCallback(27)="SolLeftRampDown"                               'Left Ramp Down
  94.         SolCallback(28)="SolRightRampDown"                              'Right Ramp Down
  95.         SolCallback(35)="SolSlamRamp"                                   'Ball Launch Ramp
  96.         SolModCallback(51)="SetModLamp 177,"                                    'Upper Right Flasher 1
  97.         SolModCallback(52)="SetModLamp 175,"                                    'Upper Right Flasher 2
  98.         SolModCallback(53)="SetModLamp 173,"                                    'Upper Right Flasher 3
  99.         SolModCallback(58)="SetModLamp 176,"                                    'Upper Left Flasher 1
  100.         SolModCallback(57)="SetModLamp 174,"                                    'Upper Left Flasher 2
  101.         SolModCallback(56)="SetModLamp 172,"                                    'Upper Left Flasher 3
  102. '       SolCallback(sLRFlipper)="vpmSolFlipper RightFlipper,Nothing,"
  103. '       SolCallback(sLLFlipper)="vpmSolFlipper LeftFlipper,Nothing,"
  104. '       SolCallback(sURFlipper)="vpmSolFlipper UpperFlipper,Nothing,"
  105.         SolModCallback(54)="SetModLamp 145,"
  106.         SolModCallback(55)="SetModLamp 146,"
  107. '
  108.     Sub SolBallRelease(Enabled)
  109.             If Enabled Then
  110.                 If bsTrough.Balls Then
  111.                     vpmTimer.PulseSw 31
  112.                 End If
  113.             bsTrough.ExitSol_On
  114.             End If
  115.     End Sub
  116.  
  117.     Sub SolPuttOut(Enabled)
  118.         If Enabled Then
  119.             If bsPuttOutPopper.Balls Then
  120.                 bsPuttOutPopper.InitKick sw44a,170,12
  121.                 PlaySound"scoopexit"
  122.             End If
  123.             bsPuttOutPopper.ExitSol_On
  124.         End If
  125.     End Sub
  126.     Sub SolSubway(Enabled)
  127.         If Enabled Then
  128.             If bsPuttOutPopper.Balls Then
  129.                 bsPuttOutPopper.InitKick subwaystart,180,3
  130.                 bsPuttOutPopper.ExitSol_On
  131.             End If
  132.         End If
  133.     End Sub
  134.  
  135.     Sub SolLeftGoferUP(Enabled)
  136.         If Enabled Then
  137.             LrampTimer.Enabled = 0
  138.             If LGoferIsUp = 0 Then
  139.                 Controller.Switch(41)=0
  140.                 Controller.Switch(47)=0
  141.                 LGofer.IsDropped=0
  142.                 LGoferUp.Enabled = 1
  143.                 LGoferDown.Enabled = 0
  144.                 Lramp.collidable=0
  145.                 Lramp1.collidable=1
  146.                 LeftRampUp = 1
  147.             Else
  148.                 Controller.Switch(41)=0
  149.                 Controller.Switch(47)=0
  150.                 LGoferUp.Enabled = 1
  151.                 LeftGoferBlock.collidable = 1
  152.                 LGPos = 6
  153.             End If
  154.         End If
  155.     End Sub
  156.  
  157.     Sub SolRightGoferUP(Enabled)
  158.         If Enabled Then
  159.             RrampTimer.Enabled = 0
  160.             If RGoferIsUp = 0 Then
  161.                 Controller.Switch(42)=0
  162.                 Controller.Switch(48)=0
  163.                 RGofer.IsDropped=0
  164.                 RGoferUp.Enabled = 1
  165.                 RGoferDown.Enabled = 0             
  166.                 Rramp.collidable=0
  167.                 Rramp1.collidable=1
  168.                 RightRampUp = 1
  169.             Else
  170.                 Controller.Switch(42)=0
  171.                 Controller.Switch(48)=0
  172.                 RGoferUp.Enabled = 1
  173.                 RGPos = 6
  174.             End If
  175.         End If
  176.     End Sub
  177.  
  178.     Sub SolLeftGoferDown(Enabled)
  179.         If Enabled Then
  180.             Controller.Switch(41)=1
  181.             LGoferDown.Enabled = 1
  182.             LGoferUp.Enabled = 0
  183.             LGofer.IsDropped=1
  184.         End If
  185.     End Sub
  186.  
  187.     Sub SolRightGoferDown(Enabled)
  188.         If Enabled Then
  189.             Controller.Switch(42)=1
  190.             RGoferDown.Enabled = 1
  191.             RGoferUp.Enabled = 0
  192.             RGofer.IsDropped = 1
  193.         End If
  194.     End Sub
  195.  
  196.     Sub SolLeftRampDown(Enabled)
  197.         If Enabled Then
  198.             RightRampUp = 0        
  199.             LrampDir = 1
  200.             Lramp.collidable=1
  201.             Lramp1.collidable=0
  202.             PlaySound "gate"
  203.             LrampTimer.Enabled = 1
  204.  
  205.         Else
  206.            
  207.         End If
  208.     End Sub
  209.  
  210.     Sub SolRightRampDown(Enabled)
  211.         If Enabled Then
  212.             RightRampUp = 0        
  213.             RrampDir = 1
  214.             Rramp.collidable=1
  215.             Rramp1.collidable=0
  216.             PlaySound "gate"
  217.             RrampTimer.Enabled = 1
  218.  
  219.         Else
  220.            
  221.         End If
  222.     End Sub
  223.  
  224.     Sub SolSlamRamp(Enabled)
  225.         If Enabled Then
  226.             For each xx in aslamramp:xx.IsDropped=0:Next
  227.             For each xx in aslamrampup:xx.IsDropped=1:Next
  228.             jumpramptrigger.enabled = 1
  229.             jumpramp.Collidable=1
  230.             slamrampup.Collidable = 0
  231.             Flipper1.RotateToEnd
  232.             rampshadow.visible = 0
  233.             SlamRampDownTimer.Enabled = 1
  234.         Else
  235.  
  236.         End If     
  237.     End Sub
  238.  
  239. Sub SlamRampDownTimer_Timer()
  240.         SlamRampUpTimer.Enabled = 1
  241.         SlamRampDownTimer.Enabled = 0
  242. End Sub
  243. Sub SlamRampUpTimer_Timer()
  244.         For each xx in aslamramp:xx.IsDropped=1:Next
  245.         For each xx in aslamrampup:xx.IsDropped=9:Next
  246.         jumpramp.Collidable=0
  247.         slamrampup.Collidable = 1
  248.         jumpramptrigger.enabled = 0
  249.         Flipper1.RotateToStart
  250.         rampshadow.visible = 1
  251.         SlamRampUpTimer.Enabled = 0
  252. End Sub
  253.  
  254. '************
  255. ' Table init.
  256. '************
  257.  
  258.   Sub Table_Init
  259.     vpmInit me
  260.     With Controller
  261.         .GameName = cGameName
  262.         If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description:Exit Sub
  263.         .SplashInfoLine="No Good Gofers" & vbNewLine & "VP Table by Bodydump"
  264.         .HandleKeyboard=0
  265.         .ShowTitle=0
  266.         .ShowDMDOnly=1
  267.         .ShowFrame=0
  268.         .HandleMechanics=1
  269.         .Hidden=0
  270.         On Error Resume Next
  271.         .Run GetPlayerHWnd
  272.         If Err Then MsgBox Err.Description
  273.         On Error Goto 0
  274.     End With
  275.     'Nudging
  276.         vpmNudge.TiltSwitch=14
  277.         vpmNudge.Sensitivity=1
  278.         vpmNudge.TiltObj=Array(Bumper1,Bumper2,Bumper3,LeftSlingshot,RightSlingshot)
  279.  
  280.     'Trough
  281.         Set bsTrough=New cvpmBallStack
  282.         With bsTrough
  283.             .InitSw 0,32,33,34,35,36,37,0
  284.             .InitKick BallRelease,105,5
  285.             .InitEntrySnd "fx_Solenoid", "fx_Solenoid"
  286.             .InitExitSnd SoundFX("fx_ballrel",DOFContactors), SoundFX("fx_Solenoid",DOFContactors)
  287.             .Balls=6
  288.         End With
  289.  
  290.     'Sand Trap Eject
  291.         Set bsLeftEject=New cvpmBallStack
  292.         With bsLeftEject
  293.             .InitSaucer LeftEject,78,78,20
  294.             .InitExitSnd SoundFX("fx_Popper",DOFContactors), SoundFX("fx_Solenoid",DOFContactors)
  295.         End With
  296.  
  297.     'Putt Out Popper
  298.         Set bsPuttOutPopper=New cvpmBallStack
  299.         With bsPuttOutPopper
  300.             .InitSw 0,44,0,0,0,0,0,0
  301.             .InitKick sw44a,170,12
  302.         End With
  303.  
  304.     'Jet Popper
  305.         Set bsJetPopper=New cvpmBallStack
  306.         With bsJetPopper
  307.             .InitSw 0,38,25,0,0,0,0,0
  308.             .InitKick JetPopper,180,10
  309.             .InitExitSnd SoundFX("fx_Popper",DOFContactors), SoundFX("fx_Solenoid",DOFContactors)
  310.         End With
  311.  
  312.     'Upper Right Eject
  313.         Set bsUpperRightEject=New cvpmBallStack
  314.         With bsUpperRightEject
  315.             .InitSw 0,46,0,0,0,0,0,0
  316.             .InitKick upperrightkicker,120,5
  317.             .InitExitSnd SoundFX("fx_Popper",DOFContactors), SoundFX("fx_Solenoid",DOFContactors)
  318.         End With
  319.  
  320.     'Turntable
  321.         Set mTT=New cvpmTurnTable
  322.         With mTT
  323.             .InitTurnTable TurnTable,40
  324.             .SpinUp=40
  325.             .SpinDown=40
  326.             .CreateEvents "mTT"
  327.         End With
  328.         Blur.Enabled = 0
  329.  
  330.     'Captive Ball
  331.         Set cbCaptive=New cvpmCaptiveBall
  332.         With cbCaptive
  333.             .InitCaptive Captive,CWALL,Array(Captive1,Captive2),350
  334.             .NailedBalls=1
  335.             .Start
  336.             .ForceTrans=0.9
  337.             .MinForce=4
  338.             .CreateEvents "cbCaptive"
  339.         End With
  340.         Captive1.CreateBall
  341.     If apronstyle = 0 Then
  342.         apron.IsDropped = 1
  343.         apron1.IsDropped = 0
  344.     Else
  345.         apron.IsDropped = 0
  346.         apron1.IsDropped = 1
  347.     End If
  348.  
  349.     If nightday<5 then
  350.     For each xx in extraambient:xx.intensityscale = 1:Next
  351.     End If
  352.     If nightday>5 then
  353.     For each xx in extraambient:xx.intensity = xx.intensity*.9:Next
  354.     End If
  355.     If nightday>10 then
  356.     For each xx in extraambient:xx.intensity = xx.intensity*.7:Next
  357.     For each xx in GIleft:xx.intensity = xx.intensity*.9:Next
  358.     For each xx in GIright:xx.intensity = xx.intensity*.9:Next
  359.     End If
  360.     If nightday>20 then
  361.     For each xx in extraambient:xx.intensity = xx.intensity*.6:Next
  362.     For each xx in GIleft:xx.intensity = xx.intensity*.8:Next
  363.     For each xx in GIright:xx.intensity = xx.intensity*.8:Next
  364.     End If
  365.     If nightday>30 then
  366.     For each xx in extraambient:xx.intensity = xx.intensity*.4:Next
  367.     For each xx in GIleft:xx.intensity = xx.intensity*.7:Next
  368.     For each xx in GIright:xx.intensity = xx.intensity*.7:Next
  369.     End If
  370.  
  371.  
  372.  
  373. '      '**Main Timer init
  374.           PinMAMETimer.Enabled = 1
  375.  
  376.     Plunger1.PullBack
  377.     Kickback.PullBack
  378.     Controller.Switch(22)=1 'close coin door   
  379.     Controller.Switch(24)=0 'always closed
  380.     Controller.Switch(41)=1 'drop left gofer
  381.     Controller.Switch(42)=1 'drop right gofer
  382.     Controller.Switch(47)=1 'left ramp down
  383.     Controller.Switch(48)=1 'right ramp down
  384.     LGofer.IsDropped = 1
  385.     RGofer.IsDropped = 1
  386.     Rramp1.collidable=0
  387.     Lramp1.collidable=0
  388.  
  389. End Sub
  390.  
  391.         Sub Table_Paused:Controller.Pause = 1:End Sub
  392.         Sub Table_unPaused:Controller.Pause = 0:End Sub
  393.  
  394. '**********
  395. ' Keys
  396. '**********
  397.  
  398.         Sub table_KeyDown(ByVal Keycode)
  399.             If keycode = PlungerKey Then Plunger.Pullback:PlaySound SoundFX("fx_plungerpull",DOFContactors)
  400.             If keycode = LeftTiltKey Then vpmNudge.DoNudge 90, 3:PlaySound SoundFX("fx_nudge",0), 0, 1, -0.1, 0.25
  401.             If keycode = RightTiltKey Then vpmNudge.DoNudge 270, 3:PlaySound SoundFX("fx_nudge",0), 0, 1, 0.1, 0.25
  402.             If keycode = CenterTiltKey Then vpmNudge.DoNudge 0, 4:PlaySound SoundFX("fx_nudge",0), 0, 1, 0, 0.25
  403.             If vpmKeyDown(keycode) Then Exit Sub
  404.         End Sub
  405.  
  406.         Sub table_KeyUp(ByVal Keycode)
  407.             If keycode = PlungerKey Then Plunger.Fire:PlaySound SoundFX("fx_plunger",DOFContactors)
  408.             If vpmKeyUp(keycode) Then Exit Sub
  409.         End Sub
  410.  
  411.  
  412. '********************
  413. '    Flippers
  414. '********************
  415.  
  416.         SolCallback(sLRFlipper) = "SolRFlipper"
  417.         SolCallback(sLLFlipper) = "SolLFlipper"
  418.  
  419.         Sub SolLFlipper(Enabled)
  420.             If Enabled Then
  421.                 PlaySound SoundFX("fx_flipperup",DOFContactors), 0, 1, -0.1, 0.05
  422.                 LeftFlipper.RotateToEnd
  423.             Else
  424.                 PlaySound SoundFX("fx_flipperdown",DOFContactors), 0, 1, -0.1, 0.05
  425.                 LeftFlipper.RotateToStart
  426.             End If
  427.         End Sub
  428.  
  429.         Sub SolRFlipper(Enabled)
  430.             If Enabled Then
  431.                 PlaySound SoundFX("fx_flipperup",DOFContactors), 0, 1, 0.1, 0.05
  432.                 RightFlipper.RotateToEnd
  433.                 UpperFlipper.RotateToEnd
  434.             Else
  435.                 PlaySound SoundFX("fx_flipperdown",DOFContactors), 0, 1, 0.1, 0.05
  436.                 RightFlipper.RotateToStart
  437.                 UpperFlipper.RotateToStart
  438.             End If
  439.         End Sub
  440.  
  441. '****************************
  442. ' Drain holes, vuks & saucers
  443. '****************************
  444.         Sub Drain_Hit:Playsound "fx_drain":bsTrough.AddBall Me:End Sub
  445.         Sub LeftEject_Hit:PlaySound "fx_kicker_enter", 0, 1, -0.05, 0.05:bsLeftEject.AddBall 0:End Sub          'Sand Trap Eject
  446.         Sub sw44a_Hit:PlaySound "ball_bounce", 0, 1, 0.05, 0.05:bsPuttOutPopper.AddBall Me:End Sub          'Putt Out Popper
  447.         Sub sw44b_Hit:PlaySound "ball_bounce", 0, 1, 0.05, 0.05:bsPuttOutPopper.AddBall Me:End Sub          'Putt Out Popper
  448.         Sub sw44c_Hit:PlaySound "ball_bounce", 0, 1, 0.05, 0.05:bsPuttOutPopper.AddBall Me:End Sub          'Putt Out Popper
  449.         Sub sw44d_Hit:PlaySound "ball_bounce", 0, 1, 0.05, 0.05:bsPuttOutPopper.AddBall Me:End Sub          'Putt Out Popper
  450.         Sub sw44e_Hit:PlaySound "ball_bounce", 0, 1, 0.05, 0.05:bsPuttOutPopper.AddBall Me:End Sub          'Putt Out Popper
  451.         Sub sw44f_Hit:PlaySound "ball_bounce", 0, 1, 0.05, 0.05:bsPuttOutPopper.AddBall Me:End Sub          'Putt Out Popper
  452.         Sub sw44g_Hit:PlaySound "ball_bounce", 0, 1, 0.05, 0.05:bsPuttOutPopper.AddBall Me:End Sub          'Putt Out Popper
  453.         Sub sw44h_Hit:PlaySound "ball_bounce", 0, 1, 0.05, 0.05:bsPuttOutPopper.AddBall Me:End Sub          'Putt Out Popper
  454.         Sub sw44i_Hit:PlaySound "ball_bounce", 0, 1, 0.05, 0.05:bsPuttOutPopper.AddBall Me:End Sub          'Putt Out Popper
  455.         Sub subwayend_Hit:bsJetPopper.AddBall Me:End Sub                                'Underground Pass
  456.         Sub holeinone_Hit:PlaySound "ball_bounce", 0, 1, 0.05, 0.05:Me.DestroyBall:vpmTimer.PulseSwitch(68),160,"HandleTopHole":End Sub
  457.         Sub behindleftgofer_Hit:PlaySound "fx_kicker_enter", 0, 1, -0.05, 0.05:Me.DestroyBall:vpmTimer.PulseSwitch(67),100,"HandlePuttOut":End Sub
  458.         Sub rightpopperjam_Hit:PlaySound "fx_kicker_enter", 0, 1, 0.05, 0.05:Me.DestroyBall:vpmTimer.PulseSwitch(45),160,"HandleRightGofer":End Sub
  459.         Sub HandleTopHole(swNo):vpmTimer.PulseSwitch(67),100,"HandlePuttOut":End Sub
  460.         Sub HandlePuttOut(swNo):bsPuttOutPopper.AddBall 0:End Sub
  461.         Sub HandleRightGofer(swNo):bsUpperRightEject.AddBall 0:End Sub
  462.  
  463. '***************
  464. '  Slingshots
  465. '***************
  466. '**********Sling Shot Animations
  467. ' Rstep and Lstep  are the variables that increment the animation
  468. '****************
  469.         Dim RStep, Lstep
  470.  
  471.         Sub RightSlingShot_Slingshot
  472.             PlaySound SoundFX("right_slingshot",DOFContactors), 0, 1, 0.05, 0.05
  473.             vpmTimer.PulseSw 52
  474.             RSling.Visible = 0
  475.             RSling1.Visible = 1
  476.             sling1.TransZ = -20
  477.             RStep = 0
  478.             RightSlingShot.TimerEnabled = 1
  479.         End Sub
  480.  
  481.         Sub RightSlingShot_Timer
  482.             Select Case RStep
  483.                 Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.TransZ = -10
  484.                 Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:sling1.TransZ = 0:RightSlingShot.TimerEnabled = 0
  485.             End Select
  486.             RStep = RStep + 1
  487.         End Sub
  488.  
  489.         Sub LeftSlingShot_Slingshot
  490.             PlaySound SoundFX("left_slingshot",DOFContactors), 0, 1, -0.05, 0.05
  491.             vpmTimer.PulseSw 51
  492.             LSling.Visible = 0
  493.             LSling1.Visible = 1
  494.             sling2.TransZ = -20
  495.             LStep = 0
  496.             LeftSlingShot.TimerEnabled = 1
  497.         End Sub
  498.  
  499.         Sub LeftSlingShot_Timer
  500.             Select Case LStep
  501.                 Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.TransZ = -10
  502.                 Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:sling2.TransZ = 0:LeftSlingShot.TimerEnabled = 0
  503.             End Select
  504.             LStep = LStep + 1
  505.         End Sub
  506.  
  507. '***************
  508. '   Bumpers
  509. '***************
  510.         Sub Bumper1_Hit:vpmTimer.PulseSw 54:PlaySound SoundFX("fx_bumper",DOFContactors), 0, 1, -0.03, 0.05:End Sub
  511.         Sub Bumper2_Hit:vpmTimer.PulseSw 53:PlaySound SoundFX("fx_bumper",DOFContactors), 0, 1, -0.05, 0.05:End Sub
  512.         Sub Bumper3_Hit:vpmTimer.PulseSw 55:PlaySound SoundFX("fx_bumper",DOFContactors), 0, 1, -0.05, 0.05:End Sub
  513.  
  514.  
  515. '************
  516. ' Spinners
  517. '************
  518.         Sub Spinner1_Spin():vpmTimer.PulseSwitch(61),0,"":PlaySound "fx_spinner", 0, 1, -0.05, 0.05: End Sub
  519.         Sub Spinner2_Spin():vpmTimer.PulseSwitch(62),0,"":PlaySound "fx_spinner", 0, 1, 0.05, 0.05: End Sub
  520.  
  521. '*********************
  522. ' Switches & Rollovers
  523. '*********************
  524.         Sub sw18_Hit:Controller.Switch(18)=1:PlaySound "fx_sensor":End Sub
  525.         Sub sw18_UnHit:Controller.Switch(18)=0:End Sub
  526.         Sub sw16_Hit:Controller.Switch(16)=1:PlaySound "fx_sensor":End Sub
  527.         Sub sw16_UnHit:Controller.Switch(16)=0:End Sub
  528.         Sub sw17_Hit:Controller.Switch(17)=1:PlaySound "fx_sensor":End Sub
  529.         Sub sw17_UnHit:Controller.Switch(17)=0:End Sub
  530.         Sub sw26_Hit:Controller.Switch(26)=1:PlaySound "fx_sensor":End Sub
  531.         Sub sw26_UnHit:Controller.Switch(26)=0:End Sub
  532.         Sub sw27_Hit:Controller.Switch(27)=1:PlaySound "fx_sensor":End Sub
  533.         Sub sw27_UnHit:Controller.Switch(27)=0:End Sub
  534.         Sub sw28_Hit:Controller.Switch(28)=1:PlaySound "fx_sensor":End Sub
  535.         Sub sw28_UnHit:Controller.Switch(28)=0:End Sub
  536.         Sub sw71_Hit:Controller.Switch(71)=1:PlaySound "fx_sensor":End Sub
  537.         Sub sw71_UnHit:Controller.Switch(71)=0:End Sub
  538.         Sub sw72_Hit:Controller.Switch(72)=1:PlaySound "fx_sensor":End Sub
  539.         Sub sw72_UnHit:Controller.Switch(72)=0:End Sub
  540.         Sub sw86_Hit:Controller.Switch(86)=1:PlaySound "fx_sensor":End Sub
  541.         Sub sw86_UnHit:Controller.Switch(86)=0:End Sub
  542.  
  543. '***************
  544. '  Targets
  545. '***************
  546.  
  547.         Sub sw23_Hit
  548.             vpmTimer.PulseSw 23
  549.             PlaySound SoundFX("fx_target",DOFContactors), 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  550.         End Sub
  551.  
  552.         Sub sw56_Hit
  553.             vpmTimer.PulseSw 56
  554.             PlaySound SoundFX("fx_target",DOFContactors), 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  555.         End Sub
  556.  
  557.         Sub sw57_Hit
  558.             vpmTimer.PulseSw 57
  559.             PlaySound SoundFX("fx_target",DOFContactors), 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  560.         End Sub
  561.  
  562.         Sub sw58_Hit
  563.             vpmTimer.PulseSw 58
  564.             PlaySound SoundFX("fx_target",DOFContactors), 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  565.         End Sub
  566.  
  567.         Sub sw77_Hit
  568.             vpmTimer.PulseSw 77
  569.             PlaySound SoundFX("fx_target",DOFContactors), 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  570.         End Sub
  571.  
  572.         Sub sw81_Hit
  573.             vpmTimer.PulseSw 81
  574.             PlaySound SoundFX("fx_target",DOFContactors), 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  575.         End Sub
  576.  
  577.         Sub sw82_Hit
  578.             vpmTimer.PulseSw 82
  579.             PlaySound SoundFX("fx_target",DOFContactors), 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  580.         End Sub
  581.  
  582.         Sub sw83_Hit
  583.             vpmTimer.PulseSw 83
  584.             PlaySound SoundFX("fx_target",DOFContactors), 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  585.         End Sub
  586.  
  587.         Sub sw84_Hit
  588.             vpmTimer.PulseSw 84
  589.             PlaySound SoundFX("fx_target",DOFContactors), 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  590.         End Sub
  591.  
  592.         Sub sw85_Hit
  593.             vpmTimer.PulseSw 85
  594.             PlaySound SoundFX("fx_target",DOFContactors), 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  595.         End Sub
  596.  
  597. '*********************
  598. ' Random Switches
  599. '*********************
  600.         Sub Gate4_Hit():vpmTimer.PulseSw 12:End Sub
  601.         Sub sw15_Hit():vpmTimer.PulseSw 15:End Sub
  602.         Sub cart_Hit():PlaySound "plastichit":vpmTimer.PulseSw 74:GolfCart.Y = 218:WheelTargetPosition.Y = 217:Me.TimerEnabled = 1:End Sub          'Golf Cart
  603.         Sub cart_Timer:GolfCart.Y = 215:WheelTargetPosition.Y = 211:Me.TimerEnabled = 0:End Sub
  604.         Sub sw73_Hit():vpmTimer.PulseSw 73:End Sub
  605.         Sub LGofer_Hit():PlaySound "plastichit":vpmTimer.PulseSw 65:LeftGoferBlock.Y = 441:Me.TimerEnabled = 1:End Sub
  606.         Sub LGofer_Timer:LeftGoferBlock.Y = 449:Me.TimerEnabled = 0:End Sub
  607.         Sub RGofer_Hit():PlaySound "plastichit":vpmTimer.PulseSw 75:RightGoferBlock.Y = 516.625:Me.TimerEnabled = 1:End Sub
  608.         Sub RGofer_Timer:RightGoferBlock.Y = 524.625:Me.TimerEnabled = 0:End Sub
  609.  
  610. '****************
  611. 'Gofer Animations
  612. '****************
  613.  
  614. Dim LGPos, LGDir, RGPos, RGPos2, RGDir, LrampPos, LrampDir, RrampPos, RrampDir
  615. LGPos=22:RGPos=22:LrampPos=22:RrampPos=22
  616. LGDir=0:RGDir=0:LrampDir=1:RrampDir=1
  617. LGofer.TimerEnabled=1:RGofer.TimerEnabled=1:LrampTimer.Enabled=1
  618.  
  619.       Sub LGoferUp_Timer()
  620.               Select Case LGPos
  621.                     Case 0: LeftGoferBlock.z=-20
  622.                                 LGoferIsUp = 1
  623.                                 LGoferUp.Enabled = 0
  624.                                 Lramp.HeightBottom=110
  625.                     Case 1: LeftGoferBlock.z=-25:Lramp.HeightBottom=104
  626.                     Case 2: LeftGoferBlock.z=-31:Lramp.HeightBottom=102
  627.                     Case 3: LeftGoferBlock.z=-37:Lramp.HeightBottom=100
  628.                     Case 4: LeftGoferBlock.z=-31:Lramp.HeightBottom=102
  629.                     Case 5: LeftGoferBlock.z=-25:Lramp.HeightBottom=104
  630.                     Case 6: LeftGoferBlock.z=-20:Lramp.HeightBottom=110
  631.                     Case 7: LeftGoferBlock.z=-25:Lramp.HeightBottom=104
  632.                     Case 8: LeftGoferBlock.z=-31:Lramp.HeightBottom=98
  633.                     Case 9: LeftGoferBlock.z=-37:Lramp.HeightBottom=91
  634.                     Case 10: LeftGoferBlock.z=-43:Lramp.HeightBottom=84  
  635.                     Case 11: LeftGoferBlock.z=-49:Lramp.HeightBottom=77
  636.                     Case 12: LeftGoferBlock.z=-55:Lramp.HeightBottom=70
  637.                     Case 13: LeftGoferBlock.z=-61:Lramp.HeightBottom=63
  638.                     Case 14: LeftGoferBlock.z=-67:Lramp.HeightBottom=56
  639.                     Case 15: LeftGoferBlock.z=-73:Lramp.HeightBottom=49
  640.                     Case 16: LeftGoferBlock.z=-79:Lramp.HeightBottom=42
  641.                     Case 17: LeftGoferBlock.z=-85:Lramp.HeightBottom=35
  642.                     Case 18: LeftGoferBlock.z=-91:Lramp.HeightBottom=28
  643.                     Case 19: LeftGoferBlock.z=-97:Lramp.HeightBottom=21
  644.                     Case 20: LeftGoferBlock.z=-103:Lramp.HeightBottom=14
  645.                     Case 21: LeftGoferBlock.z=-109:Lramp.HeightBottom=7
  646.                     Case 22: LeftGoferBlock.z=-115:Lramp.HeightBottom=0
  647.               End Select
  648.                     If LGpos>0 then LGpos=LGpos-1
  649.       End Sub
  650.  
  651.       Sub LGoferDown_Timer()   
  652.       Select Case LGPos
  653.             Case 0: LeftGoferBlock.z=-19
  654.             Case 1: LeftGoferBlock.z=-25
  655.             Case 2: LeftGoferBlock.z=-31
  656.             Case 3: LeftGoferBlock.z=-37
  657.             Case 4: LeftGoferBlock.z=-43        
  658.             Case 5: LeftGoferBlock.z=-49
  659.             Case 6: LeftGoferBlock.z=-55
  660.             Case 7: LeftGoferBlock.z=-61
  661.             Case 8: LeftGoferBlock.z=-67
  662.             Case 9: LeftGoferBlock.z=-73
  663.             Case 10: LeftGoferBlock.z=-79
  664.             Case 11: LeftGoferBlock.z=-85
  665.             Case 12: LeftGoferBlock.z=-91
  666.             Case 13: LeftGoferBlock.z=-97
  667.             Case 14: LeftGoferBlock.z=-103
  668.             Case 15: LeftGoferBlock.z=-109
  669.             Case 16: LeftGoferBlock.z=-115 
  670.                         LGoferDown.Enabled = 0
  671.                         LGoferIsUp = 0   
  672.       End Select
  673.             If LGpos<16 then LGpos=LGpos+1
  674.       End Sub
  675.  
  676.       Sub RGoferUp_Timer()
  677.               Select Case RGPos
  678.                     Case 0: RightGoferBlock.z=-20
  679.                                 RGoferIsUp = 1
  680.                                 RGoferUp.Enabled = 0
  681.                                 Rramp.HeightBottom=110
  682.                     Case 1: RightGoferBlock.z=-25:Rramp.HeightBottom=104
  683.                     Case 2: RightGoferBlock.z=-31:Rramp.HeightBottom=102
  684.                     Case 3: RightGoferBlock.z=-37:Rramp.HeightBottom=100
  685.                     Case 4: RightGoferBlock.z=-31:Rramp.HeightBottom=102
  686.                     Case 5: RightGoferBlock.z=-25:Rramp.HeightBottom=104
  687.                     Case 6: RightGoferBlock.z=-20:Rramp.HeightBottom=110
  688.                     Case 7: RightGoferBlock.z=-25:Rramp.HeightBottom=104
  689.                     Case 8: RightGoferBlock.z=-31:Rramp.HeightBottom=98
  690.                     Case 9: RightGoferBlock.z=-37:Rramp.HeightBottom=91
  691.                     Case 10: RightGoferBlock.z=-43:Rramp.HeightBottom=84  
  692.                     Case 11: RightGoferBlock.z=-49:Rramp.HeightBottom=77
  693.                     Case 12: RightGoferBlock.z=-55:Rramp.HeightBottom=70
  694.                     Case 13: RightGoferBlock.z=-61:Rramp.HeightBottom=63
  695.                     Case 14: RightGoferBlock.z=-67:Rramp.HeightBottom=56
  696.                     Case 15: RightGoferBlock.z=-73:Rramp.HeightBottom=49
  697.                     Case 16: RightGoferBlock.z=-79:Rramp.HeightBottom=42
  698.                     Case 17: RightGoferBlock.z=-85:Rramp.HeightBottom=35
  699.                     Case 18: RightGoferBlock.z=-91:Rramp.HeightBottom=28
  700.                     Case 19: RightGoferBlock.z=-97:Rramp.HeightBottom=21
  701.                     Case 20: RightGoferBlock.z=-103:Rramp.HeightBottom=14
  702.                     Case 21: RightGoferBlock.z=-109:Rramp.HeightBottom=7
  703.                     Case 22: RightGoferBlock.z=-115:Rramp.HeightBottom=0       
  704.               End Select
  705.                     If RGpos>0 then RGpos=RGpos-1
  706.       End Sub
  707.  
  708.       Sub RGoferDown_Timer()   
  709.       Select Case RGPos
  710.             Case 0: RightGoferBlock.z=-19
  711.             Case 1: RightGoferBlock.z=-25
  712.             Case 2: RightGoferBlock.z=-31
  713.             Case 3: RightGoferBlock.z=-37
  714.             Case 4: RightGoferBlock.z=-43        
  715.             Case 5: RightGoferBlock.z=-49
  716.             Case 6: RightGoferBlock.z=-55
  717.             Case 7: RightGoferBlock.z=-61
  718.             Case 8: RightGoferBlock.z=-67
  719.             Case 9: RightGoferBlock.z=-73
  720.             Case 10: RightGoferBlock.z=-79
  721.             Case 11: RightGoferBlock.z=-85
  722.             Case 12: RightGoferBlock.z=-91
  723.             Case 13: RightGoferBlock.z=-97
  724.             Case 14: RightGoferBlock.z=-103
  725.             Case 15: RightGoferBlock.z=-109
  726.             Case 16: RightGoferBlock.z=-115
  727.                         RGoferDown.Enabled = 0
  728.                         RGoferIsUp = 0   
  729.       End Select
  730.             If RGpos<16 then RGpos=RGpos+1
  731.       End Sub
  732.  
  733. Sub LrampTimer_Timer()
  734.     If LGoferIsUp = 0 Then
  735.       Select Case LrampPos
  736.                     Case 0: Lramp.HeightBottom=110
  737.                     Case 1: Lramp.HeightBottom=104
  738.                     Case 2: Lramp.HeightBottom=102
  739.                     Case 3: Lramp.HeightBottom=100
  740.                     Case 4: Lramp.HeightBottom=102
  741.                     Case 5: Lramp.HeightBottom=104
  742.                     Case 6: Lramp.HeightBottom=110
  743.                     Case 7: Lramp.HeightBottom=104
  744.                     Case 8: Lramp.HeightBottom=98
  745.                     Case 9: Lramp.HeightBottom=91
  746.                     Case 10: Lramp.HeightBottom=84    
  747.                     Case 11: Lramp.HeightBottom=77
  748.                     Case 12: Lramp.HeightBottom=70
  749.                     Case 13: Lramp.HeightBottom=63
  750.                     Case 14: Lramp.HeightBottom=56
  751.                     Case 15: Lramp.HeightBottom=49
  752.                     Case 16: Lramp.HeightBottom=42
  753.                     Case 17: Lramp.HeightBottom=35
  754.                     Case 18: Lramp.HeightBottom=28
  755.                     Case 19: Lramp.HeightBottom=21
  756.                     Case 20: Lramp.HeightBottom=14
  757.                     Case 21: Lramp.HeightBottom=7
  758.                     Case 22: Lramp.HeightBottom=0:Controller.Switch(47)=1:LeftRampUp = 0:LrampTimer.Enabled = 0
  759.             If Lramppos<22 then Lramppos=Lramppos+1
  760.         End Select
  761.         End If
  762.       End Sub
  763.  
  764.  
  765. Sub RrampTimer_Timer()
  766.     If RGoferIsUp = 0 Then
  767.       Select Case RrampPos
  768.                     Case 0: Rramp.HeightBottom=110
  769.                     Case 1: Rramp.HeightBottom=104
  770.                     Case 2: Rramp.HeightBottom=102
  771.                     Case 3: Rramp.HeightBottom=100
  772.                     Case 4: Rramp.HeightBottom=102
  773.                     Case 5: Rramp.HeightBottom=104
  774.                     Case 6: Rramp.HeightBottom=110
  775.                     Case 7: Rramp.HeightBottom=104
  776.                     Case 8: Rramp.HeightBottom=98
  777.                     Case 9: Rramp.HeightBottom=91
  778.                     Case 10: Rramp.HeightBottom=84
  779.                     Case 11: Rramp.HeightBottom=77
  780.                     Case 12: Rramp.HeightBottom=70
  781.                     Case 13: Rramp.HeightBottom=63
  782.                     Case 14: Rramp.HeightBottom=56
  783.                     Case 15: Rramp.HeightBottom=49
  784.                     Case 16: Rramp.HeightBottom=42
  785.                     Case 17: Rramp.HeightBottom=35
  786.                     Case 18: Rramp.HeightBottom=28
  787.                     Case 19: Rramp.HeightBottom=21
  788.                     Case 20: Rramp.HeightBottom=14
  789.                     Case 21: Rramp.HeightBottom=7
  790.                     Case 22: Rramp.HeightBottom=0:Controller.Switch(48)=1:RightRampUp = 0:RrampTimer.Enabled = 0
  791.             If Rramppos<22 then Rramppos=Rramppos+1
  792.         End Select
  793.         End If
  794.       End Sub
  795.  
  796. '**************
  797. 'Turntable Subs
  798. '**************
  799.  
  800.         Set MotorCallback=GetRef("SRPRoutine")
  801.         Dim WheelSpeed, WheelCW, WheelPosPrev
  802.  
  803.         Sub SRPRoutine
  804.             Dim WheelPos
  805.  
  806.             WheelPos = Controller.GetMech(4)
  807.             If WheelPos = WheelPosPrev Then Exit Sub
  808.             WheelPosPrev = WheelPos
  809.  
  810.             WheelSpeed = INT(Controller.GetMech(5))
  811.             If WheelSpeed < 0 Then
  812.                 WheelCW = True
  813.                 BlurDir = 1
  814.                 WheelSpeed = ABS(WheelSpeed)
  815.             Else
  816.                 BlurDir = 0
  817.                 WheelCW = False
  818.             End If
  819.  
  820.             if WheelSpeed > 50 Then
  821.                 mTT.SolMotorState WheelCW,True
  822.                 mTT.Speed = WheelSpeed
  823.             Else   
  824.                 mTT.SolMotorState WheelCW,False
  825.                
  826.             end if
  827.             if WheelSpeed > 95 Then
  828.                 Blur.Enabled = 1
  829.             Else
  830.                 if Blur.Enabled Then
  831.                     Blur.Enabled = 0
  832.                     disc.image = "NGG_Map"
  833.                 End If
  834.             end if
  835.             disc.roty = 360 - WheelPos + 22    
  836.         End Sub
  837.  
  838.     Dim DiskArray, BlurDir, Blurlevel
  839.         DiskArray=Array("12","350","335","305","282","258","235","215","190","168","146","125","100","80","55","32")
  840.         Blurlevel = 1
  841.     Sub Blur_Timer()
  842.         Select Case Blurlevel
  843.             Case 1: disc.image = "NGG_Map_Mblur1"
  844.             Case 2: disc.image = "NGG_Map_Mblur2"
  845.             Case 3: disc.image = "NGG_Map_Mblur3"
  846.             Case 4: disc.image = "NGG_Map_Mblur4"
  847.             Case 5: disc.image = "NGG_Map_Mblur5"
  848.             Case 6: disc.image = "NGG_Map_Mblur6"
  849.                 If BlurDir = 0 Then
  850.                     Blurlevel = 1
  851.                 End If
  852.         End Select
  853.         If BlurDir = 1 Then
  854.             If Blurlevel>0 then Blurlevel = Blurlevel - 1 else BlurLevel = 6
  855.         Else
  856.             If Blurlevel<6 Then Blurlevel = Blurlevel + 1 else BlurLevel = 1
  857.         End If
  858.     End Sub
  859.  
  860.  
  861. '***************************************************
  862. '       JP's VP10 Fading Lamps & Flashers
  863. '       Based on PD's Fading Light System
  864. ' SetLamp 0 is Off
  865. ' SetLamp 1 is On
  866. ' fading for non opacity objects is 4 steps
  867. '***************************************************
  868.  
  869. Dim LampState(200), FadingLevel(200)
  870. Dim FlashSpeedUp(200), FlashSpeedDown(200), FlashMin(200), FlashMax(200), FlashLevel(200)
  871.  
  872. InitLamps()             ' turn off the lights and flashers and reset them to the default parameters
  873. LampTimer.Interval = 10 'lamp fading speed
  874. LampTimer.Enabled = 1
  875.  
  876. ' Lamp & Flasher Timers
  877.  
  878. Sub LampTimer_Timer()
  879.     Dim chgLamp, num, chg, ii
  880.     chgLamp = Controller.ChangedLamps
  881.     If Not IsEmpty(chgLamp) Then
  882.         For ii = 0 To UBound(chgLamp)
  883.             LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1)       'keep the real state in an array
  884.            FadingLevel(chgLamp(ii, 0) ) = chgLamp(ii, 1) + 4 'actual fading step
  885.        Next
  886.     End If
  887.     UpdateLamps
  888. End Sub
  889.  
  890.  
  891. Sub UpdateLamps
  892.     NFadeL 11, L11
  893.     NFadeL 12, L12
  894.     NFadeL 13, L13
  895.     NFadeL 14, L14
  896.     NFadeL 15, L15
  897.     NFadeL 16, L16
  898.     NFadeL 17, L17
  899.     NFadeL 18, L18
  900.     NFadeL 21, L21
  901.     NFadeL 22, L22
  902.     NFadeL 23, L23
  903.     NFadeL 24, L24
  904.     NFadeL 25, L25
  905.     NFadeL 26, L26
  906.     NFadeL 27, L27
  907.     NFadeL 28, L28
  908.     NFadeL 31, L31
  909.     NFadeL 32, L32
  910.     NFadeL 33, L33
  911.     NFadeL 34, L34
  912.     NFadeL 35, L35
  913.     NFadeL 36, L36
  914.     NFadeL 37, L37
  915.     NFadeL 38, L38
  916.     NFadeL 41, L41
  917.     NFadeL 42, L42
  918.     NFadeL 43, L43
  919.     NFadeL 44, L44
  920.     NFadeL 45, L45
  921.     NFadeL 46, L46
  922.     NFadeL 47, L47
  923.     NFadeL 48, L48
  924.     NFadeL 51, L51
  925.     NFadeL 52, L52
  926.     NFadeL 53, L53
  927.     NFadeL 54, L54
  928.     NFadeLm 55, L55b
  929.     NFadeL 55, L55
  930.     NFadeL 56, L56
  931.     NFadeL 57, L57
  932.     NFadeL 58, L58
  933.     NFadeL 61, L61
  934.     NFadeL 62, L62
  935.     NFadeL 63, L63
  936.     NFadeL 64, L64
  937.     NFadeL 65, L65
  938.     NFadeL 66, L66
  939.     NFadeL 67, L67
  940.     NFadeL 68, L68
  941.     NFadeLm 71, L71b
  942.     NFadeL 71, L71
  943.     NFadeL 72, L72
  944.     NFadeL 73, L73
  945.     NFadeL 74, L74
  946.     NFadeL 75, L75
  947.     NFadeL 76, L76
  948.     NFadeL 77, L77
  949.     NFadeLm 78, bump3light1
  950.     NFadeL 78, bump3light
  951.     NFadeL 81, L81
  952.     NFadeL 82, L82
  953.     NFadeL 83, L83
  954.     NFadeL 84, L84
  955.     NFadeL 85, L85
  956.     NFadeLm 86, bump2light1
  957.     NFadeL 86, bump2light
  958.     NFadeLm 87, bump1light1
  959.     NFadeL 87, bump1light
  960. '   FadeL 88, L88, L88a 'start button
  961.     NFadeLMod 122, L122
  962.     NFadeLMod 131, L131b
  963.     NFadeLMod 131, L131a
  964.     NFadeLMod 131, L131
  965.     NFadeLMod 145, L145
  966.     NFadeLMod 146, L146
  967.     NFadeARmCombi 145, 146, upperplayfield, "upperplayfield", "upperplayfieldright", "upperplayfieldleft", "upperplayfieldboth", Combifor145and146
  968.     NFadeLMod 170, L170b
  969.     NFadeLMod 170, L170a
  970.     NFadeLModm 170, L170, 100
  971.     NFadeLModm 172, L172a, 4
  972.     NFadeLModm 172, L172b, 2
  973.     NFadeLModm 172, L172, 50
  974.     NFadeLModm 173, L173a, 4
  975.     NFadeLModm 173, L173b, 2
  976.     NFadeLModm 173, L173, 50
  977.     NFadeLModm 174, L174a, 4
  978.     NFadeLModm 174, L174b, 2
  979.     NFadeLModm 174, L174, 50
  980.     NFadeLModm 175, L175a, 4
  981.     NFadeLModm 175, L175b, 2
  982.     NFadeLModm 175, L175, 50
  983.     NFadeLModm 176, L176a, 4
  984.     NFadeLModm 176, L176b, 2
  985.     NFadeLModm 176, L176, 50
  986.     NFadeLModm 177, L177a, 4
  987.     NFadeLModm 177, L177b, 2
  988.     NFadeLModm 177, L177, 50
  989.     NFadeLModm 178, L178a,4
  990.     NFadeLModm 178, L178b,2
  991.     NFadeLModm 178, L178,50
  992.     NFadeLModm 179, L179a, 4
  993.     NFadeLModm 179, L179b, 2
  994.     NFadeLModm 179, L179, 50
  995.     NFadeLModm 180, L180a, 4
  996.     NFadeLModm 180, L180b, 2
  997.     NFadeLMod 180, L180c
  998.     NFadeLModm 180, L180, 50
  999.     NFadeLMod 190, L190b
  1000.     NFadeLMod 190, L190a
  1001.     NFadeLModm 190, L190, 5
  1002. End Sub
  1003. '
  1004. 'Sub FlasherTimer_Timer()
  1005. '       Flash 11, h11
  1006. '       Flash 12, h12
  1007. '       Flash 13, h13
  1008. '       Flash 14, h14
  1009. '       Flash 15, h15
  1010. '       Flash 16, h16
  1011. '       Flash 17, h17
  1012. '       Flash 18, h18
  1013. '       Flash 21, h21
  1014. '       Flash 22, h22
  1015. '       Flash 23, h23
  1016. '       Flash 24, h24
  1017. '       Flash 25, h25
  1018. '       Flash 26, h26
  1019. '       Flash 27, h27
  1020. '       Flash 28, h28
  1021. '       Flash 31, h31
  1022. '       Flash 32, h32
  1023. '       Flash 33, h33
  1024. '       Flash 34, h34
  1025. '       Flash 35, h35
  1026. '       Flash 36, h36
  1027. '       Flash 37, h37
  1028. '       Flash 38, h38
  1029. '       Flash 41, h41
  1030. '       Flash 42, h42
  1031. '       Flash 43, h43
  1032. '       Flash 44, h44
  1033. '       Flash 45, h45
  1034. '       Flash 46, h46
  1035. '       Flash 47, h47
  1036. '       Flash 48, h48
  1037. '       Flash 51, h51
  1038. '       Flash 52, h52
  1039. '       Flash 53, h53
  1040. '       Flash 54, h54
  1041. '       Flashm 55, h55a
  1042. '       Flash 55, h55
  1043. '       Flash 56, h56
  1044. '       Flash 57, h57
  1045. '       Flash 58, h58
  1046. '       Flash 61, h61
  1047. '       Flash 62, h62
  1048. '       Flash 63, h63
  1049. '       Flash 64, h64
  1050. '       Flash 65, h65
  1051. '       Flash 66, h66
  1052. '       Flash 68, h68
  1053. '       Flashm 71, h71a
  1054. '       Flash 71, h71
  1055. '       Flash 72, h72
  1056. '       Flash 73, h73
  1057. '       Flash 74, h74
  1058. '       Flash 75, h75
  1059. '       Flash 77, h77
  1060. '       Flash 78, h78
  1061. '       Flash 81, h81
  1062. '       Flash 82, h82
  1063. '       Flash 83, h83
  1064. '       Flash 84, h84
  1065. '       Flash 85, h85
  1066. '       Flash 86, h86
  1067. '       Flash 87, h87
  1068. '       Flashm 120, Flasher19
  1069. '       Flash 120, Flasher1
  1070. '       Flashm 121, Flasher20
  1071. '       Flash 121, Flasher2
  1072. '       Flashm 122, Flasher21
  1073. '       Flashm 122, Flasher4
  1074. '       Flash 122, Flasher3
  1075. '       Flash 123, Flasher5
  1076. '       Flashm 124, Flasher15
  1077. '       Flash 124, Flasher6
  1078. '       Flashm 125, Flasher18
  1079. '       Flash 125, Flasher7
  1080. '       Flash 126, Flasher8
  1081. '       Flash 127, Flasher9
  1082. '       Flashm 128, Flasher17
  1083. '       Flash 128, Flasher10
  1084. '       Flashm 129, Flasher16
  1085. '       Flash 129, Flasher11
  1086. '       Flash 130, Flasher12
  1087. '       Flashm 131, Flasher14
  1088. '       Flash 131, Flasher13
  1089. ' End Sub
  1090. '
  1091.  
  1092. ' div lamp subs
  1093.  
  1094. Sub InitLamps()
  1095.     Dim x
  1096.     For x = 0 to 200
  1097.         LampState(x) = 0        ' current light state, independent of the fading level. 0 is off and 1 is on
  1098.        FadingLevel(x) = 4      ' used to track the fading state
  1099.        FlashSpeedUp(x) = 0.4   ' faster speed when turning on the flasher
  1100.        FlashSpeedDown(x) = 0.2 ' slower speed when turning off the flasher
  1101.        FlashMax(x) = 1         ' the maximum value when on, usually 1
  1102.        FlashMin(x) = 0         ' the minimum value when off, usually 0
  1103.        FlashLevel(x) = 0       ' the intensity of the flashers, usually from 0 to 1
  1104.    Next
  1105. End Sub
  1106.  
  1107. Sub AllLampsOff
  1108.     Dim x
  1109.     For x = 0 to 200
  1110.         SetLamp x, 0
  1111.     Next
  1112. End Sub
  1113.  
  1114. Sub SetLamp(nr, value)
  1115.     If value <> LampState(nr) Then
  1116.         LampState(nr) = abs(value)
  1117.         FadingLevel(nr) = abs(value) + 4
  1118.     End If
  1119. End Sub
  1120.  
  1121. ' Lights: used for VP10 standard lights, the fading is handled by VP itself
  1122.  
  1123. Sub NFadeL(nr, object)
  1124.     Select Case FadingLevel(nr)
  1125.         Case 4:object.state = 0:FadingLevel(nr) = 0
  1126.         Case 5:object.state = 1:FadingLevel(nr) = 1
  1127.     End Select
  1128. End Sub
  1129.  
  1130. Sub NFadeLm(nr, object) ' used for multiple lights
  1131.    Select Case FadingLevel(nr)
  1132.         Case 4:object.state = 0
  1133.         Case 5:object.state = 1
  1134.     End Select
  1135. End Sub
  1136.  
  1137. Sub SetModLamp(nr, level)
  1138.     FadingLevel(nr) = level
  1139. End Sub
  1140.  
  1141.  
  1142. ' Lights: used for VP10 standard lights, the fading is handled by VP itself
  1143.  
  1144. Sub NFadeLMod(nr, object)   '3 lights
  1145.    object.Intensity = FadingLevel(nr)*10 / 25
  1146.     object.state = 1
  1147.     object.visible = 1
  1148. End Sub
  1149.  
  1150. Sub NFadeLModm(nr, object, maxlev) ' used for multiple lights
  1151.    object.Intensity = FadingLevel(nr) * maxlev / 255
  1152.     object.state = 1
  1153.     object.visible = 1
  1154. End Sub
  1155.  
  1156. 'Lights, Ramps & Primitives used as 4 step fading lights
  1157. 'a,b,c,d are the images used from on to off
  1158.  
  1159. Sub FadeObj(nr, object, a, b, c, d)
  1160.     Select Case FadingLevel(nr)
  1161.         Case 4:object.image = b:FadingLevel(nr) = 6                   'fading to off...
  1162.        Case 5:object.image = a:FadingLevel(nr) = 1                   'ON
  1163.        Case 6, 7.8:FadingLevel(nr) = FadingLevel(nr) + 1             'wait
  1164.        Case 9:object.image = c:FadingLevel(nr) = FadingLevel(nr) + 1 'fading...
  1165.        Case 10, 11, 12:FadingLevel(nr) = FadingLevel(nr) + 1         'wait
  1166.        Case 13:object.image = d:FadingLevel(nr) = 0                  'Off
  1167.    End Select
  1168. End Sub
  1169.  
  1170. Sub FadeObjm(nr, object, a, b, c, d)
  1171.     Select Case FadingLevel(nr)
  1172.         Case 4:object.image = b
  1173.         Case 5:object.image = a
  1174.         Case 9:object.image = c
  1175.         Case 13:object.image = d
  1176.     End Select
  1177. End Sub
  1178.  
  1179. Sub NFadeObj(nr, object, a, b)
  1180.     Select Case FadingLevel(nr)
  1181.         Case 4:object.image = b:FadingLevel(nr) = 0 'off
  1182.        Case 5:object.image = a:FadingLevel(nr) = 1 'on
  1183.    End Select
  1184. End Sub
  1185.  
  1186. Sub NFadeObjm(nr, object, a, b)
  1187.     Select Case FadingLevel(nr)
  1188.         Case 4:object.image = b
  1189.         Case 5:object.image = a
  1190.     End Select
  1191. End Sub
  1192.  
  1193. ' Flasher objects
  1194.  
  1195. Sub Flash(nr, object)
  1196.     Select Case FadingLevel(nr)
  1197.         Case 4 'off
  1198.            FlashLevel(nr) = FlashLevel(nr) - FlashSpeedDown(nr)
  1199.             If FlashLevel(nr) < FlashMin(nr) Then
  1200.                 FlashLevel(nr) = FlashMin(nr)
  1201.                 FadingLevel(nr) = 0 'completely off
  1202.            End if
  1203.             Object.IntensityScale = FlashLevel(nr)
  1204.         Case 5 ' on
  1205.            FlashLevel(nr) = FlashLevel(nr) + FlashSpeedUp(nr)
  1206.             If FlashLevel(nr) > FlashMax(nr) Then
  1207.                 FlashLevel(nr) = FlashMax(nr)
  1208.                 FadingLevel(nr) = 1 'completely on
  1209.            End if
  1210.             Object.IntensityScale = FlashLevel(nr)
  1211.     End Select
  1212. End Sub
  1213.  
  1214. Sub Flashm(nr, object) 'multiple flashers, it just sets the flashlevel
  1215.    Object.IntensityScale = FlashLevel(nr)
  1216. End Sub
  1217.  
  1218. ' Desktop Objects: Reels & texts (you may also use lights on the desktop)
  1219.  
  1220. ' Reels
  1221. Dim NewCombiResult, Combifor145and146
  1222. Sub NFadeARmCombi(nr1, nr2, ramp, aOff, a1, a2, aBoth, OldCombiResult)
  1223.     NewCombiResult=LampState(nr1)+(2*LampState(nr2))
  1224.     If OldCombiResult=NewCombiResult Then Exit Sub
  1225.     Select Case NewCombiResult
  1226.         Case 0:ramp.image=aOff
  1227.         Case 1:ramp.image=a1
  1228.         Case 2:ramp.image=a2
  1229.         Case 3:ramp.image=aBoth
  1230.     End Select
  1231.     OldCombiResult=NewCombiResult
  1232. End Sub
  1233.  
  1234. Sub FadeR(nr, object)
  1235.     Select Case FadingLevel(nr)
  1236.         Case 4:object.SetValue 1:FadingLevel(nr) = 6                   'fading to off...
  1237.        Case 5:object.SetValue 0:FadingLevel(nr) = 1                   'ON
  1238.        Case 6, 7.8:FadingLevel(nr) = FadingLevel(nr) + 1              'wait
  1239.        Case 9:object.SetValue 2:FadingLevel(nr) = FadingLevel(nr) + 1 'fading...
  1240.        Case 10, 11, 12:FadingLevel(nr) = FadingLevel(nr) + 1          'wait
  1241.        Case 13:object.SetValue 3:FadingLevel(nr) = 0                  'Off
  1242.    End Select
  1243. End Sub
  1244.  
  1245. Sub FadeRm(nr, object)
  1246.     Select Case FadingLevel(nr)
  1247.         Case 4:object.SetValue 1
  1248.         Case 5:object.SetValue 0
  1249.         Case 9:object.SetValue 2
  1250.         Case 3:object.SetValue 3
  1251.     End Select
  1252. End Sub
  1253.  
  1254. 'Texts
  1255.  
  1256. Sub NFadeT(nr, object, message)
  1257.     Select Case FadingLevel(nr)
  1258.         Case 4:object.Text = "":FadingLevel(nr) = 0
  1259.         Case 5:object.Text = message:FadingLevel(nr) = 1
  1260.     End Select
  1261. End Sub
  1262.  
  1263. Sub NFadeTm(nr, object, b)
  1264.     Select Case FadingLevel(nr)
  1265.         Case 4:object.Text = ""
  1266.         Case 5:object.Text = message
  1267.     End Select
  1268. End Sub
  1269.  
  1270. '***********
  1271. ' Update GI
  1272. '***********
  1273. Dim gistep, Giswitch
  1274. Giswitch = 0
  1275.  
  1276. Sub UpdateGIOn(no, Enabled)
  1277.     Select Case no
  1278.         Case 0 'GIright
  1279.             If Enabled Then
  1280.                 For each xx in GIright:xx.State = 1: Next
  1281.             Else
  1282.                 For each xx in GIright:xx.state = 0: Next
  1283.             End If
  1284.         Case 1
  1285.             If Enabled Then
  1286.                 For Each xx in GIleft:xx.state = 1: Next
  1287.             else
  1288.                 For Each xx in GIleft:xx.state = 0: Next
  1289.             End If
  1290.         Case 2
  1291.             If Enabled Then
  1292.                 For Each xx in GIother:xx.state = 1: Next
  1293.             Else
  1294.                 For Each xx in GIother:xx.state = 0: Next
  1295.             End If
  1296.     End Select
  1297. End Sub
  1298.            
  1299.  
  1300. Sub UpdateGI(no, step)
  1301.     Dim ii
  1302.     If step = 0 then exit sub 'only values from 1 to 8 are visible and reliable. 0 is not reliable and 7 & 8 are the same so...
  1303.    gistep = (step-1) / 7
  1304.     Select Case no
  1305.         Case 0
  1306.           For each ii in GIleft
  1307.                 ii.IntensityScale = gistep
  1308.             Next
  1309.         Case 1
  1310.             For each ii in GIright
  1311.                 ii.IntensityScale = gistep
  1312.             Next
  1313.         Case 2 ' also the bumpers er GI
  1314.            For each ii in GIother
  1315.                 ii.IntensityScale = gistep
  1316.             Next
  1317.             Select case gistep
  1318.                 Case 0
  1319.                     GolfCart.image = "GolfCartMap"
  1320.                 Case 1
  1321.                     GolfCart.image = "GolfCartMap_ON1"
  1322.                 Case 2
  1323.                     GolfCart.image = "GolfCartMap_ON1"
  1324.                 Case 3
  1325.                     GolfCart.image = "GolfCartMap_ON2"
  1326.                 Case 4
  1327.                     GolfCart.image = "GolfCartMap_ON3"
  1328.                 Case 5
  1329.                     GolfCart.image = "GolfCartMap_ON4"
  1330.                 Case 6
  1331.                     GolfCart.image = "GolfCartMap_ON4"
  1332.                 Case 7
  1333.                     GolfCart.image = "GolfCartMap_ON5"
  1334.             End Select
  1335.     End Select
  1336. '    ' change the intensity of the flasher depending on the gi to compensate for the gi lights being off
  1337. '    For ii = 0 to 200
  1338. '        FlashMax(ii) = 6 - gistep * 3 ' the maximum value of the flashers
  1339. '    Next
  1340. End Sub
  1341.  
  1342.  
  1343. '''Ramp Helpers
  1344.  
  1345. 'Sub centerramphelper_Hit():ActiveBall.Vely=ActiveBall.Vely*1.3:End Sub
  1346. 'Sub centerramphelper2_Hit():Activeball.Velx=ActiveBall.Velx-20:End Sub
  1347. 'Sub upperhelper_Hit():ActiveBall.Velx=ActiveBall.Velx*1.2:End Sub
  1348. 'Sub upperhelper2_Hit():ActiveBall.Vely=ActiveBall.Vely*1.3:End Sub
  1349. 'Sub jumpramptrigger_Hit():ActiveBall.Vely=ActiveBall.Vely*1.3:End Sub
  1350. 'Sub upperjump_Hit():ActiveBall.Vely=ActiveBall.Vely*1.5:End Sub
  1351. 'Sub upperjump_UnHit():ActiveBall.Velz=ActiveBall.Velz=0:End Sub
  1352.  
  1353.  
  1354. Sub Game_timer()
  1355.     slamrampP.z = Flipper1.CurrentAngle
  1356.     If RightRampUp = 0 Then RrampTimer.Enabled = 1
  1357.     If LeftRampUp = 0 Then LRampTimer.Enabled = 1
  1358. End Sub
  1359.  
  1360.  
  1361.  
  1362. ' *********************************************************************
  1363. '                      Supporting Ball & Sound Functions
  1364. ' *********************************************************************
  1365.  
  1366. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  1367.    Vol = Csng(BallVel(ball) ^2 / 2000)
  1368. End Function
  1369.  
  1370. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table" is the name of the table
  1371.    Dim tmp
  1372.     tmp = ball.x * 2 / table.width-1
  1373.     If tmp > 0 Then
  1374.         Pan = Csng(tmp ^10)
  1375.     Else
  1376.         Pan = Csng(-((- tmp) ^10) )
  1377.     End If
  1378. End Function
  1379.  
  1380. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  1381.    Pitch = BallVel(ball) * 20
  1382. End Function
  1383.  
  1384. Function BallVel(ball) 'Calculates the ball speed
  1385.    BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  1386. End Function
  1387.  
  1388. '*****************************************
  1389. '      JP's VP10 Rolling Sounds
  1390. '*****************************************
  1391.  
  1392. Const tnob = 8 ' total number of balls in this table is 4, but always use a higher number here bacuse of the timing
  1393. ReDim rolling(tnob)
  1394. InitRolling
  1395.  
  1396. Sub InitRolling
  1397.     Dim i
  1398.     For i = 0 to tnob
  1399.         rolling(i) = False
  1400.     Next
  1401. End Sub
  1402.  
  1403. Sub RollingTimer_Timer()
  1404.     Dim BOT, b
  1405.     BOT = GetBalls
  1406.  
  1407.     ' stop the sound of deleted balls
  1408.    For b = UBound(BOT) + 1 to tnob
  1409.         rolling(b) = False
  1410.         StopSound("fx_ballrolling" & b)
  1411.     Next
  1412.  
  1413.     ' exit the sub if no balls on the table
  1414.    If UBound(BOT) = -1 Then Exit Sub
  1415.  
  1416.     ' play the rolling sound for each ball
  1417.    For b = 0 to UBound(BOT)
  1418.         If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
  1419.             rolling(b) = True
  1420.             PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0
  1421.         Else
  1422.             If rolling(b) = True Then
  1423.                 StopSound("fx_ballrolling" & b)
  1424.                 rolling(b) = False
  1425.             End If
  1426.         End If
  1427.     Next
  1428. End Sub
  1429.  
  1430. '**********************
  1431. ' Ball Collision Sound
  1432. '**********************
  1433.  
  1434. Sub OnBallBallCollision(ball1, ball2, velocity)
  1435.     PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
  1436. End Sub
  1437.  
  1438. Sub platformdrop_Unhit()
  1439.     If ActiveBall.Vely>0 then PlaySound "ball_bounce"
  1440. End Sub
  1441.  
  1442. Sub rightrampdrop_UnHit():PlaySound "ball_bounce":End Sub
  1443. Sub leftrampdrop_UnHit():PlaySound "ball_bounce":End Sub
  1444.  
  1445. Sub jumpramptrigger_Hit():PlaySound "metalhit_medium":End Sub
  1446.  
  1447. Sub Pins_Hit (idx)
  1448.     PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  1449. End Sub
  1450.  
  1451. Sub Targets_Hit (idx)
  1452.     PlaySound "target", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  1453. End Sub
  1454.  
  1455. Sub Metals_Thin_Hit (idx)
  1456.     PlaySound "metalhit_thin", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1457. End Sub
  1458.  
  1459. Sub Metals_Medium_Hit (idx)
  1460.     PlaySound "metalhit_medium", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1461. End Sub
  1462.  
  1463. Sub Metals2_Hit (idx)
  1464.     PlaySound "metalhit2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1465. End Sub
  1466.  
  1467. Sub Gates_Hit (idx)
  1468.     PlaySound "gate4", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1469. End Sub
  1470.  
  1471. Sub Rubbers_Hit(idx)
  1472.     dim finalspeed
  1473.     finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1474.     If finalspeed > 20 then
  1475.         PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1476.     End if
  1477.     If finalspeed >= 6 AND finalspeed <= 20 then
  1478.         RandomSoundRubber()
  1479.     End If
  1480. End Sub
  1481.  
  1482. Sub Posts_Hit(idx)
  1483.     dim finalspeed
  1484.     finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1485.     If finalspeed > 16 then
  1486.         PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1487.     End if
  1488.     If finalspeed >= 6 AND finalspeed <= 16 then
  1489.         RandomSoundRubber()
  1490.     End If
  1491. End Sub
  1492.  
  1493. Sub RandomSoundRubber()
  1494.     Select Case Int(Rnd*3)+1
  1495.         Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1496.         Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1497.         Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1498.     End Select
  1499. End Sub
  1500.  
  1501. Sub LeftFlipper_Collide(parm)
  1502.     RandomSoundFlipper()
  1503. End Sub
  1504.  
  1505. Sub RightFlipper_Collide(parm)
  1506.     RandomSoundFlipper()
  1507. End Sub
  1508.  
  1509. Sub UpperFlipper_Collide(parm)
  1510.     RandomSoundFlipper()
  1511. End Sub
  1512.  
  1513. Sub RandomSoundFlipper()
  1514.     Select Case Int(Rnd*3)+1
  1515.         Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1516.         Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1517.         Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1518.     End Select
  1519. End Sub
  1520.  
  1521. Sub upperjump_UnHit():ActiveBall.Velz=ActiveBall.Velz=0:End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement