Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1.  
  2. Sub Table1_KeyDown(ByVal Keycode)
  3. If Keycode = AddCreditKey Then
  4. Credits = Credits + 1
  5. DOF 114, DOFOn
  6. If(Tilted = False) Then
  7. DMDFlush
  8. DMD "black.jpg", "", "CREDITS " &credits, 500
  9. PlaySound "fx_coin"
  10. If NOT bGameInPlay Then ShowTableInfo
  11. End If
  12. End If
  13.  
  14. If keycode = PlungerKey Then
  15. Plunger.Pullback
  16. End If
  17.  
  18. If hsbModeActive Then
  19. EnterHighScoreKey(keycode)
  20. Exit Sub
  21. End If
  22.  
  23. ' Table specific
  24.  
  25. ' Normal flipper action
  26.  
  27. If bGameInPlay AND NOT Tilted Then
  28.  
  29. If keycode = LeftTiltKey Then Nudge 90, 6:PlaySound "fx_nudge", 0, 1, -0.1, 0.25:CheckTilt
  30. If keycode = RightTiltKey Then Nudge 270, 6:PlaySound "fx_nudge", 0, 1, 0.1, 0.25:CheckTilt
  31. If keycode = CenterTiltKey Then Nudge 0, 7:PlaySound "fx_nudge", 0, 1, 1, 0.25:CheckTilt
  32.  
  33. If keycode = LeftFlipperKey Then SolLFlipper 1:InstantInfoTimer.Enabled = True
  34. If keycode = RightFlipperKey Then SolRFlipper 1:InstantInfoTimer.Enabled = True
  35.  
  36. If keycode = StartGameKey Then
  37. If((PlayersPlayingGame <MaxPlayers) AND(bOnTheFirstBall = True) ) Then
  38.  
  39. If(bFreePlay = True) Then
  40. PlayersPlayingGame = PlayersPlayingGame + 1
  41. TotalGamesPlayed = TotalGamesPlayed + 1
  42. DMDFlush
  43. DMD "black.jpg", " ", PlayersPlayingGame & " PLAYERS", 500
  44. PlaySound "so_fanfare1"
  45. Else
  46. If(Credits> 0) then
  47. PlayersPlayingGame = PlayersPlayingGame + 1
  48. TotalGamesPlayed = TotalGamesPlayed + 1
  49. Credits = Credits - 1
  50. DMDFlush
  51. DMD "black.jpg", " ", PlayersPlayingGame & " PLAYERS", 500
  52. PlaySound "so_fanfare1"
  53. Else
  54. ' Not Enough Credits to start a game.
  55. DOF 114, DOFOff
  56. DMDFlush
  57. DMD "black.jpg", "CREDITS " &credits, "INSERT COIN", 500
  58. PlaySound "so_nocredits"
  59. End If
  60. End If
  61. End If
  62. End If
  63. Else ' If (GameInPlay)
  64.  
  65. If keycode = StartGameKey Then
  66. If(bFreePlay = True) Then
  67. If(BallsOnPlayfield = 0) Then
  68. ResetForNewGame()
  69. End If
  70. Else
  71. If(Credits> 0) Then
  72. If(BallsOnPlayfield = 0) Then
  73. Credits = Credits - 1
  74. ResetForNewGame()
  75. End If
  76. Else
  77. ' Not Enough Credits to start a game.
  78. DOF 114, DOFOff
  79. DMDFlush
  80. DMD "black.jpg", "CREDITS " &credits, "INSERT COIN", 500
  81. ShowTableInfo
  82. End If
  83. End If
  84. End If
  85. End If ' If (GameInPlay)
  86.  
  87. if keycode = "3" then StartNextMode
  88. if keycode = "4" then winmode mode(0)
  89.  
  90. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement