Arngrim

wpt dof

Oct 30th, 2016
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 61.72 KB | None | 0 0
  1. Option Explicit
  2. Randomize
  3.  
  4. On Error Resume Next
  5. ExecuteGlobal GetTextFile("controller.vbs")
  6. If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
  7. On Error Goto 0
  8.  
  9. '******************* Options *********************
  10. ' DMD/BAckglass Controller Setting
  11. Const GIOnDuringAttractMode = 0 '1 - GI on during attract, 0 - GI off during attract
  12. dim DivValue:DivValue = 2 ' Change Value to 4 if LED array does not display properly on your system
  13.  
  14. LoadVPM "01560000", "sam.VBS", 3.10
  15.  
  16. '********************
  17. 'Standard definitions
  18. '********************
  19.  
  20. Const cGameName = "wpt_140a" 'change the romname here
  21.  
  22. Const UseSolenoids = 1
  23. Const UseLamps = 0
  24. Const UseSync = 1
  25. Const HandleMech = 0
  26.  
  27. 'Standard Sounds
  28. Const SSolenoidOn = "Solenoid"
  29. Const SSolenoidOff = ""
  30. Const SCoin = "coin"
  31.  
  32. '************
  33. ' Table init.
  34. '************
  35. 'Variables
  36. Dim xx
  37. Dim Bump1,Bump2,Bump3,Mech3bank,bsTrough,bsVUK,visibleLock,bsTEject,bsSVUK,bsRScoop
  38. Dim dtUDrop,dtLDropLower,dtLDropUpper,dtRDrop
  39. Dim PlungerIM
  40. Dim PMag
  41. '
  42. Sub Table_Init
  43.  
  44. '*****
  45. With Controller
  46. .GameName = cGameName
  47. If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
  48. .SplashInfoLine = "WPT"
  49. .HandleKeyboard = 0
  50. .ShowTitle = 0
  51. .ShowDMDOnly = 1
  52. .ShowFrame = 0
  53. .HandleMechanics = 1
  54. .Hidden = 0
  55. .Games(cGameName).Settings.Value("sound") = 1
  56. On Error Resume Next
  57. .Run GetPlayerHWnd
  58. If Err Then MsgBox Err.Description
  59. End With
  60.  
  61.  
  62. On Error Goto 0
  63.  
  64. Const IMPowerSetting = 50
  65. Const IMTime = 0.6
  66. Set plungerIM = New cvpmImpulseP
  67. With plungerIM
  68. .InitImpulseP swplunger, IMPowerSetting, IMTime
  69. .Switch 23
  70. .Random 1.5
  71. .InitExitSnd SoundFX("plunger",DOFContactors), SoundFX("plunger",DOFContactors)
  72. .CreateEvents "plungerIM"
  73. End With
  74.  
  75. '**Trough
  76. Set bsTrough = New cvpmBallStack
  77. bsTrough.InitSw 0, 21, 20, 19, 18, 0, 0, 0
  78. bsTrough.InitKick BallRelease, 90, 8
  79. bsTrough.InitExitSnd SoundFX("ballrelease",DOFContactors), SoundFX("Solenoid",DOFContactors)
  80. bsTrough.Balls = 4
  81.  
  82. Set bsSVUK=New cvpmBallStack
  83. bsSVUK.InitSw 0,3,0,0,0,0,0,0
  84. bsSVUK.InitKick TopLaneKicker,0,20
  85. bsSVUK.InitExitSnd SoundFX("warehousekick",DOFContactors), SoundFX("wireramp",DOFContactors)
  86.  
  87. Set bsVUK=New cvpmBallStack
  88. bsVUK.InitSw 0,55,0,0,0,0,0,0
  89. bsVUK.InitKick LeftVUKTop,180,12
  90. bsVUK.InitExitSnd SoundFX("scoopexit",DOFContactors), SoundFX("rail",DOFContactors)
  91.  
  92. Set bsRScoop=New cvpmBallStack
  93. bsRScoop.InitSw 0,49,0,0,0,0,0,0
  94. bsRScoop.InitKick sw49,270,32
  95. bsRScoop.InitExitSnd SoundFX("popperball",DOFContactors), SoundFX("rail",DOFContactors)
  96.  
  97. '**Nudging
  98. ' vpmNudge.TiltSwitch=-7
  99. ' vpmNudge.Sensitivity=1
  100. ' vpmNudge.TiltObj=Array(Bumper1b,Bumper2b,Bumper3b,LeftSlingshot,RightSlingshot)
  101.  
  102. Set dtLDropLower = new cvpmDropTarget
  103. With dtLDropLower
  104. .Initdrop Array(sw33, sw34, sw35, sw36), Array(33, 34, 35, 36)
  105. .InitSnd SoundFX("DTL",DOFDropTargets),SoundFX("DTResetL",DOFDropTargets)
  106. End With
  107.  
  108. Set dtLDropUpper = new cvpmDropTarget
  109. With dtLDropUpper
  110. .Initdrop Array(sw37, sw38, sw39, sw40), Array(37, 38, 39, 40)
  111. .InitSnd SoundFX("DTL",DOFDropTargets),SoundFX("DTResetL",DOFDropTargets)
  112. End With
  113.  
  114. Set dtUDrop = new cvpmDropTarget
  115. With dtUDrop
  116. .Initdrop Array(sw10, sw11, sw12, sw13), Array(10, 11, 12, 13)
  117. .InitSnd SoundFX("DTL",DOFDropTargets),SoundFX("DTResetL",DOFDropTargets)
  118. End With
  119.  
  120. Set dtRDrop = new cvpmDropTarget
  121. With dtRDrop
  122. .Initdrop Array(sw4, sw5, sw6, sw7), Array(4, 5, 6, 7)
  123. .InitSnd SoundFX("DTR",DOFDropTargets),SoundFX("DTResetR",DOFDropTargets)
  124. End With
  125.  
  126. '**Main Timer init
  127. PinMAMETimer.Interval = PinMAMEInterval
  128. PinMAMETimer.Enabled = 1
  129.  
  130. If GIOnDuringAttractMode = 1 Then GI_AllOn
  131.  
  132. End Sub
  133.  
  134. '*****Keys
  135. Sub Table_KeyDown(ByVal Keycode)
  136.  
  137.  
  138. If Keycode = LeftFlipperKey then
  139.  
  140. End If
  141. If Keycode = RightFlipperKey then
  142.  
  143. End If
  144. If keycode = PlungerKey Then Plunger.Pullback:playsound "plungerpull"
  145. If keycode = LeftTiltKey Then nudgebobble(keycode):End If
  146. If keycode = RightTiltKey Then nudgebobble(keycode):End If
  147. 'If keycode = CenterTiltKey Then CenterNudge 0, 1, 25 End If
  148. If vpmKeyDown(keycode) Then Exit Sub
  149. End Sub
  150.  
  151.  
  152.  
  153. Sub Table_KeyUp(ByVal keycode)
  154. If vpmKeyUp(keycode) Then Exit Sub
  155. If Keycode = LeftFlipperKey then
  156.  
  157. End If
  158. If Keycode = RightFlipperKey then
  159.  
  160. End If
  161. If Keycode = StartGameKey Then Controller.Switch(16) = 0
  162. If keycode = PlungerKey Then
  163. Plunger.Fire
  164. playsound "plunger"
  165. ' If(BallinPlunger = 1) then 'the ball is in the plunger lane
  166. ' PlaySound SoundFX("Plunger2")
  167. ' else
  168. ' PlaySound "Plunger"
  169. ' end if
  170. End If
  171. End Sub
  172.  
  173. 'Solenoids
  174. SolCallback(1) = "solTrough"
  175. SolCallback(2) = "solAutofire"
  176. SolCallback(3) = "bsSVUK.SolOut"
  177. SolCallback(4) = "bSVUK.SolOut"
  178. SolCallback(5) = "dtLDropLower.SolDropUp"
  179. SolCallback(6) = "dtLDropUpper.SolDropUp"
  180. SolCallback(7) = "dtUDrop.SolDropUp"
  181. SolCallback(8) = "dtRDrop.SolDropUp"
  182. ''SolCallback(9) = "SolLeftPop" 'left pop bumper
  183. ''SolCallback(10) = "SolRightPop" 'right pop bumper
  184. ''SolCallback(11) = "SolBottomPop" 'top pop bumper
  185. SolCallback(12) = "SolJailUp"
  186. SolCallback(13) = "SolULFlipper"
  187. SolCallback(14) = "SolURFlipper"
  188. SolCallback(15) = "SolLFlipper"
  189. SolCallback(16) = "SolRFlipper"
  190. ''SolCallBack(13)="vpmSolFlipper UpLeftFlipper,Nothing,"'Upper PF Left Flipper
  191. ''SolCallBack(14)="vpmSolFlipper UpRightFlipper,Nothing,"'Upper PF Right Flipper
  192. ''SolCallBack(15)="vpmSolFlipper LeftFlipper,Nothing,"'Left Flipper
  193. ''SolCallBack(16)="vpmSolFlipper RightFlipper,Flipper2,"'Right Flipper
  194. '
  195. ''SolCallback(17) = 'left slingshot
  196. ''SolCallback(18) = 'right slingshot
  197. SolCallback(19) = "SolJailLatch" 'jail latch
  198. SolCallback(20) = "LRPost"
  199. 'SolCallBack(21) = "bsRScoop.SolOut"
  200. SolCallback(21) = "ScoopOut"
  201. SolCallback(22) = "LeftSlingFlash" 'left slingshot flasher
  202. SolCallback(23) = "RightSlingFlash" 'right slingshot flasher
  203. '
  204. ''SolCallback(24) = "vpmSolSound SoundFX(""knocker""),"
  205. 'SolCallback(25) = "FlashLeft" 'flash left spinner
  206. SolCallback(26) = "BackPanel1" 'back panel 1 left
  207. SolCallback(27) = "BackPanel2" 'back panel 2
  208. SolCallback(28) = "BackPanel3" 'back panel 3
  209. SolCallback(29) = "BackPanel4" 'back panel 4
  210. SolCallback(30) = "BackPanel5" 'back panel 5 right
  211. SolCallback(31) = "FlashVUK" 'right vuk flash
  212. SolCallback(32) = "RRDownPost" 'right ramp post
  213. ''SolCallback(sLLFlipper)="vpmSolFlipper LeftFlipper,UpLeftFlipper,"
  214. ''SolCallback(sLRFlipper)="vpmSolFlipper RightFlipper,UpRightFlipper,"
  215.  
  216.  
  217. Sub SolLFlipper(Enabled)
  218. If Enabled Then
  219. PlaySound SoundFXDOF("flipperupleft",102,DOFOn,DOFFlippers)
  220. LeftFlipper.RotateToEnd
  221. UpLeftFlipper.RotateToEnd
  222. Else
  223. PlaySound SoundFXDOF("flipperdown",102,DOFOff,DOFFlippers)
  224. LeftFlipper.RotateToStart
  225. UpLeftFlipper.RotateToStart
  226. End If
  227. End Sub
  228.  
  229. Sub SolRFlipper(Enabled)
  230. If Enabled Then
  231. PlaySound SoundFXDOF("flipperupright",103,DOFOn,DOFFlippers)
  232. RightFlipper.RotateToEnd
  233. UpRightFlipper.RotateToEnd
  234. Else
  235. PlaySound SoundFXDOF("flipperdown",103,DOFOff,DOFFlippers)
  236. RightFlipper.RotateToStart
  237. UpRightFlipper.RotateToStart
  238. End If
  239. End Sub
  240.  
  241. Sub SolULFlipper(Enabled)
  242. If Enabled Then
  243. PlaySound SoundFXDOF("flipperupleft",102,DOFOn,DOFFlippers)
  244. UpLeftFlipper.RotateToEnd
  245. Else
  246. PlaySound SoundFXDOF("flipperdown",102,DOFOff,DOFFlippers)
  247. UpLeftFlipper.RotateToStart
  248. End If
  249. End Sub
  250.  
  251. Sub SolURFlipper(Enabled)
  252. If Enabled Then
  253. PlaySound SoundFXDOF("flipperupright",103,DOFOn,DOFFlippers)
  254. UpRightFlipper.RotateToEnd
  255. Else
  256. PlaySound SoundFXDOF("flipperdown",103,DOFOff,DOFFlippers)
  257. UpRightFlipper.RotateToStart
  258. End If
  259. End Sub
  260.  
  261. Sub ScoopOut(enabled)
  262. If Enabled Then
  263. sw49.kick 270, 32
  264. Controller.Switch(49) = 0
  265. playsound SoundFX("popper_ball",DOFContactors)
  266. End If
  267. End Sub
  268.  
  269. Sub LeftSlingFlash(Enabled)
  270. If Enabled Then
  271. SetLamp 122, 1
  272. SetFlash 132, 1
  273. 'LFLogo.image = "flipper-l2red"
  274. Else
  275. SetLamp 122, 0
  276. SetFlash 132, 0
  277. 'if GI_TroughCheck < 4 then LFLogo.image = "flipper-l2" else LFLogo.image = "flipper-l2off"
  278. End If
  279. End Sub
  280.  
  281. Sub RightSlingFlash(Enabled)
  282. If Enabled Then
  283. SetLamp 123, 1
  284. SetFlash 133, 1
  285. 'RFLogo.image = "flipper-r2red"
  286. Else
  287. SetLamp 123, 0
  288. SetFlash 133, 0
  289. 'if GI_TroughCheck < 4 then RFLogo.image = "flipper-r2" else RFLogo.image = "flipper-r2off"
  290. End If
  291. End Sub
  292.  
  293. Sub FlashLeft(Enabled)
  294. If Enabled Then
  295. SetLamp 125, 1
  296. SetFlash 135, 1
  297. Else
  298. SetLamp 125, 0
  299. SetFlash 135, 0
  300. End If
  301. End Sub
  302.  
  303. Sub BackPanel1(Enabled)
  304. If Enabled Then
  305. SetLamp 126, 1
  306. SetFlash 136, 1
  307. 'LFLogo1.image = "flipper-l2red"
  308. Else
  309. SetLamp 126, 0
  310. SetFlash 136, 0
  311. 'if GI_TroughCheck < 4 then LFLogo1.image = "flipper-l2" else LFLogo1.image = "flipper-l2off"
  312. End If
  313. End Sub
  314.  
  315. Sub BackPanel2(Enabled)
  316. If Enabled Then
  317. SetLamp 127, 1
  318. SetFlash 137, 1
  319. 'LFLogo1.image = "flipper-l2red"
  320. 'RFLogo1.image = "flipper-r2red"
  321. Else
  322. SetLamp 127, 0
  323. SetFlash 137, 0
  324. 'if GI_TroughCheck < 4 then LFLogo1.image = "flipper-l2" else LFLogo1.image = "flipper-l2off"
  325. 'if GI_TroughCheck < 4 then RFLogo1.image = "flipper-r2" else RFLogo1.image = "flipper-r2off"
  326. End If
  327. End Sub
  328.  
  329. Sub BackPanel3(Enabled)
  330. If Enabled Then
  331. SetLamp 128, 1
  332. SetFlash 138, 1
  333. 'LFLogo1.image = "flipper-l2red"
  334. 'RFLogo1.image = "flipper-r2red"
  335. Else
  336. SetLamp 128, 0
  337. SetFlash 138, 0
  338. 'if GI_TroughCheck < 4 then LFLogo1.image = "flipper-l2" else LFLogo1.image = "flipper-l2off"
  339. 'if GI_TroughCheck < 4 then RFLogo1.image = "flipper-r2" else RFLogo1.image = "flipper-r2off"
  340. End If
  341. End Sub
  342.  
  343. Sub BackPanel4(Enabled)
  344. If Enabled Then
  345. SetLamp 129, 1
  346. SetFlash 139, 1
  347. 'LFLogo1.image = "flipper-l2red"
  348. 'RFLogo1.image = "flipper-r2red"
  349. Else
  350. SetLamp 129, 0
  351. SetFlash 139, 0
  352. 'if GI_TroughCheck < 4 then LFLogo1.image = "flipper-l2" else LFLogo1.image = "flipper-l2off"
  353. 'if GI_TroughCheck < 4 then RFLogo1.image = "flipper-r2" else RFLogo1.image = "flipper-r2off"
  354. End If
  355. End Sub
  356.  
  357. Sub BackPanel5(Enabled)
  358. If Enabled Then
  359. SetLamp 130, 1
  360. SetFlash 140, 1
  361. 'RFLogo1.image = "flipper-r2red"
  362. Else
  363. SetLamp 130, 0
  364. SetFlash 140, 0
  365. 'if GI_TroughCheck < 4 then RFLogo1.image = "flipper-r2" else RFLogo1.image = "flipper-r2off"
  366. End If
  367. End Sub
  368.  
  369. Sub FlashVUK(Enabled)
  370. If Enabled Then
  371. SetLamp 131, 1
  372. SetFlash 141, 1
  373. Else
  374. SetLamp 131, 0
  375. SetFlash 141, 0
  376. End If
  377. End Sub
  378. '
  379. Sub SolJailLatch(Enabled)
  380. If Enabled Then 'close jail
  381. JailDiv.IsDropped = false
  382. JailDiv1.IsDropped = false
  383. JailDiv2.IsDropped = false
  384. Controller.Switch(63)=0
  385. End If
  386. End Sub
  387.  
  388. Sub SolJailUp(Enabled)
  389. If Enabled Then
  390. JailDiv.IsDropped = true
  391. JailDiv1.IsDropped = true
  392. JailDiv2.IsDropped = true
  393. Controller.Switch(63)=1
  394. End If
  395. End Sub
  396.  
  397. Sub RRDownPost(Enabled)
  398. If Enabled Then
  399. RightPost.IsDropped = False
  400. Else
  401. RightPost.IsDropped = True
  402. End If
  403. End Sub
  404.  
  405. Sub LRPost(Enabled)
  406. If Enabled Then
  407. LeftPost.IsDropped = False
  408. Else
  409. LeftPost.IsDropped = True
  410. End If
  411. End Sub
  412.  
  413. Sub solTrough(Enabled)
  414. If Enabled Then
  415. bsTrough.ExitSol_On
  416. vpmTimer.PulseSw 22
  417. End If
  418. End Sub
  419.  
  420. Sub solAutofire(Enabled)
  421. If Enabled Then
  422. PlungerIM.AutoFire
  423. End If
  424. End Sub
  425.  
  426.  
  427. Sub LeftSlingShot_Slingshot
  428. 'Leftsling = True
  429. Controller.Switch(26) = 1
  430. PlaySound Soundfx("left_slingshot",DOFContactors):LeftSlingshot.TimerEnabled = 1
  431. left1f.rotatetoend
  432. left2f.rotatetoend
  433. left3f.rotatetoend
  434. End Sub
  435.  
  436. 'Dim Leftsling:Leftsling = False
  437.  
  438. 'Sub LS_Timer()
  439. 'If Leftsling = True and Left1.ObjRotZ < -7 then Left1.ObjRotZ = Left1.ObjRotZ + 2
  440. 'If Leftsling = False and Left1.ObjRotZ > -20 then Left1.ObjRotZ = Left1.ObjRotZ - 2
  441. 'If Left1.ObjRotZ >= -7 then Leftsling = False
  442. 'If Leftsling = True and Left2.ObjRotZ > -212.5 then Left2.ObjRotZ = Left2.ObjRotZ - 2
  443. 'If Leftsling = False and Left2.ObjRotZ < -199 then Left2.ObjRotZ = Left2.ObjRotZ + 2
  444. 'If Left2.ObjRotZ <= -212.5 then Leftsling = False
  445. 'If Leftsling = True and Left3.TransZ > -23 then Left3.TransZ = Left3.TransZ - 4
  446. 'If Leftsling = False and Left3.TransZ < -0 then Left3.TransZ = Left3.TransZ + 4
  447. 'If Left3.TransZ <= -23 then Leftsling = False
  448. 'If Leftsling = True then left1f.rotatetoend
  449. 'If Leftsling = False then left1f.rotatetostart
  450. 'If Leftsling = True then left2f.rotatetoend
  451. 'If Leftsling = False then left2f.rotatetostart
  452. 'If left1f.currentangle = -212 then Leftsling = False
  453. ' Left1.ObjRotZ = left1f.currentangle
  454. ' Left2.ObjRotZ = left2f.currentangle
  455. ' Left3.TransZ = left3f.currentangle
  456. 'End Sub
  457.  
  458. Sub LeftSlingShot_Timer:Me.TimerEnabled = 0:Controller.Switch(26) = 0:left1f.rotatetostart:left2f.rotatetostart:left3f.rotatetostart:End Sub
  459.  
  460. Sub RightSlingShot_Slingshot
  461. 'Rightsling = True
  462. Controller.Switch(27) = 1
  463. PlaySound Soundfx("right_slingshot",DOFContactors):RightSlingshot.TimerEnabled = 1
  464. right1f.rotatetoend
  465. right2f.rotatetoend
  466. right3f.rotatetoend
  467. End Sub
  468.  
  469. 'Dim Rightsling:Rightsling = False
  470.  
  471. 'Sub RS_Timer()
  472. ' If Rightsling = True and Right1.ObjRotZ > 7 then Right1.ObjRotZ = Right1.ObjRotZ - 2
  473. ' If Rightsling = False and Right1.ObjRotZ < 20 then Right1.ObjRotZ = Right1.ObjRotZ + 2
  474. ' If Right1.ObjRotZ <= 7 then Rightsling = False
  475. ' If Rightsling = True and Right2.ObjRotZ < 212.5 then Right2.ObjRotZ = Right2.ObjRotZ + 2
  476. ' If Rightsling = False and Right2.ObjRotZ > 199 then Right2.ObjRotZ = Right2.ObjRotZ - 2
  477. ' If Right2.ObjRotZ >= 212.5 then Rightsling = False
  478. ' If Rightsling = True and Right3.TransZ > -23 then Right3.TransZ = Right3.TransZ - 4
  479. ' If Rightsling = False and Right3.TransZ < -0 then Right3.TransZ = Right3.TransZ + 4
  480. ' If Right3.TransZ <= -23 then Rightsling = False
  481. 'End Sub
  482.  
  483. Sub RightSlingShot_Timer:Me.TimerEnabled = 0:Controller.Switch(27) = 0:right1f.rotatetostart:right2f.rotatetostart:right3f.rotatetostart:End Sub
  484.  
  485. Sub Bumper1b_Hit
  486. vpmTimer.PulseSw 30
  487. PlaySound SoundFX("bumperright",DOFContactors)
  488. End Sub
  489.  
  490.  
  491. Sub Bumper2b_Hit
  492. vpmTimer.PulseSw 31
  493. PlaySound SoundFX("bumperright",DOFContactors)
  494. End Sub
  495.  
  496. Sub Bumper3b_Hit
  497. vpmTimer.PulseSw 32
  498. PlaySound SoundFX("bumperright",DOFContactors)
  499. End Sub
  500.  
  501.  
  502.  
  503. Sub LaneKicker_Hit:
  504. bsSVUK.AddBall Me:
  505. playsound "safehousehit"
  506. End Sub
  507.  
  508. Sub LeftVUK_Hit:
  509. GI_AllOff 1000
  510. bsVUK.AddBall Me:
  511. End Sub
  512.  
  513. Sub LeftVUKTop_Hit:
  514. bsVUK.AddBall Me:
  515. End Sub
  516.  
  517. Sub ScoopTrigger_Hit:Controller.Switch(54) = 1:playsound SoundFX("scoopleft",DOFContactors):End Sub
  518. Sub ScoopTrigger_UnHit:Controller.Switch(54) = 0:End Sub
  519.  
  520. Sub ScoopUp_Hit
  521. ScoopUp.TimerEnabled = true
  522. Controller.Switch(54) = true
  523.  
  524. ScoopUp.Enabled = false
  525. PlaySound SoundFX("scoopleft",DOFContactors)
  526. 'ScoopUp.KickZ 0, 35, 1, 1
  527. ScoopUp.Kick 0, 30, 90
  528. End Sub
  529.  
  530. Sub ScoopUp_Timer:Me.TimerEnabled = false:ScoopUp.Enabled = true:Controller.Switch(54) = false:End Sub
  531.  
  532. Dim BallInJail:BallInJail=FALSE
  533. Sub JailDiv_Hit
  534. If BallInJail=TRUE Then
  535. Controller.Switch(58)=0
  536. sw58.TimerEnabled=1
  537. Else
  538. vpmTimer.PulseSw 57
  539. End If
  540. End Sub
  541.  
  542. Sub sw58_Hit
  543. BallInJail=TRUE
  544. Controller.Switch(58)=1
  545. 'FlasherJail.Alpha = 255
  546. End Sub
  547.  
  548. Sub sw58_unHit
  549. BallInJail=FALSE
  550. Controller.Switch(58)=0
  551. 'FlasherJail.Alpha = 0
  552. End Sub
  553.  
  554. Sub sw58_Timer
  555. sw58.TimerEnabled=0
  556. If BallInJail=TRUE Then Controller.Switch(58)=1
  557. End Sub
  558.  
  559. Sub BallJailT_Timer()
  560. if BallInJail = true then
  561. 'FlasherJail.Alpha = 255
  562. Else
  563. 'FlasherJail.Alpha = 0
  564. End If
  565. End Sub
  566.  
  567. Sub sw8s_Spin:vpmTimer.PulseSw 8: PlaySound "fx_spinner",0,.25,0,0.25:End Sub
  568. Sub sw53s_Spin: PlaySound "fx_spinner",0,.25,0,0.25:End Sub
  569. Sub sw44s_Spin: PlaySound "fx_spinner",0,.25,0,0.25:End Sub
  570. Sub leftramps_Spin: PlaySound "fx_spinner",0,.25,0,0.25:End Sub
  571. Sub sw50s_Spin: PlaySound "fx_spinner",0,.25,0,0.25:End Sub
  572. Sub sw51s_Spin: PlaySound "fx_spinner",0,.25,0,0.25:End Sub
  573.  
  574. Sub sw24_Hit:Me.TimerEnabled = 1:Controller.Switch(24) = 1:PlaySound "rollover":End Sub
  575. Sub sw24_Timer:Me.TimerEnabled = 0:Controller.Switch(24) = 0:End Sub
  576. Sub sw25_Hit:Me.TimerEnabled = 1:Controller.Switch(25) = 1:PlaySound "rollover":End Sub
  577. Sub sw25_Timer:Me.TimerEnabled = 0:Controller.Switch(25) = 0:End Sub
  578. Sub sw28_Hit:Me.TimerEnabled = 1:Controller.Switch(28) = 1:PlaySound "rollover":End Sub
  579. Sub sw28_Timer:Me.TimerEnabled = 0:Controller.Switch(28) = 0:End Sub
  580. Sub sw29_Hit:Me.TimerEnabled = 1:Controller.Switch(29) = 1:PlaySound "rollover":End Sub
  581. Sub sw29_Timer:Me.TimerEnabled = 0:Controller.Switch(29) = 0:End Sub
  582.  
  583. Sub sw33_Hit:Me.TimerEnabled = 1:dtLDropLower.Hit 1:End Sub
  584. Sub sw33_Timer:Me.TimerEnabled = 0:End Sub
  585. Sub sw34_Hit:Me.TimerEnabled = 1:dtLDropLower.Hit 2:End Sub
  586. Sub sw34_Timer:Me.TimerEnabled = 0:End Sub
  587. Sub sw35_Hit:Me.TimerEnabled = 1:dtLDropLower.Hit 3:End Sub
  588. Sub sw35_Timer:Me.TimerEnabled = 0:End Sub
  589. Sub sw36_Hit:Me.TimerEnabled = 1:dtLDropLower.Hit 4:End Sub
  590. Sub sw36_Timer:Me.TimerEnabled = 0:End Sub
  591.  
  592. Sub sw37_Hit:Me.TimerEnabled = 1:dtLDropUpper.Hit 1:End Sub
  593. Sub sw37_Timer:Me.TimerEnabled = 0:End Sub
  594. Sub sw38_Hit:Me.TimerEnabled = 1:dtLDropUpper.Hit 2:End Sub
  595. Sub sw38_Timer:Me.TimerEnabled = 0:End Sub
  596. Sub sw39_Hit:Me.TimerEnabled = 1:dtLDropUpper.Hit 3:End Sub
  597. Sub sw39_Timer:Me.TimerEnabled = 0:End Sub
  598. Sub sw40_Hit:Me.TimerEnabled = 1:dtLDropUpper.Hit 4:End Sub
  599. Sub sw40_Timer:Me.TimerEnabled = 0:End Sub
  600.  
  601. Sub sw9_Hit : Controller.Switch(9) = 1: End Sub 'right ramp enter
  602. Sub sw9_UnHit: Controller.Switch(9) = 0: End Sub
  603.  
  604. Sub sw10_Hit:Me.TimerEnabled = 1:dtUDrop.Hit 1:End Sub
  605. Sub sw10_Timer:Me.TimerEnabled = 0:End Sub
  606. Sub sw11_Hit:Me.TimerEnabled = 1:dtUDrop.Hit 2:End Sub
  607. Sub sw11_Timer:Me.TimerEnabled = 0:End Sub
  608. Sub sw12_Hit:Me.TimerEnabled = 1:dtUDrop.Hit 3:End Sub
  609. Sub sw12_Timer:Me.TimerEnabled = 0:End Sub
  610. Sub sw13_Hit:Me.TimerEnabled = 1:dtUDrop.Hit 4:End Sub
  611. Sub sw13_Timer:Me.TimerEnabled = 0:End Sub
  612. Sub sw14_Hit:vpmTimer.PulseSw 14:End Sub
  613.  
  614. Sub sw4_Hit:Me.TimerEnabled = 1:dtRDrop.Hit 1:End Sub
  615. Sub sw4_Timer:Me.TimerEnabled = 0:End Sub
  616. Sub sw5_Hit:Me.TimerEnabled = 1:dtRDrop.Hit 2:End Sub
  617. Sub sw5_Timer:Me.TimerEnabled = 0:End Sub
  618. Sub sw6_Hit:Me.TimerEnabled = 1:dtRDrop.Hit 3:End Sub
  619. Sub sw6_Timer:Me.TimerEnabled = 0:End Sub
  620. Sub sw7_Hit:Me.TimerEnabled = 1:dtRDrop.Hit 4:End Sub
  621. Sub sw7_Timer:Me.TimerEnabled = 0:End Sub
  622.  
  623. Sub sw41_Hit:vpmTimer.PulseSw 41:End Sub
  624. Sub sw42_Hit : vpmTimer.PulseSw 42:Me.TimerEnabled = 1:sw42p.TransX = -4: playsound SoundFX("fx_chapa",DOFTargets): End Sub
  625. Sub sw42_Timer:Me.TimerEnabled = 0:sw42p.TransX = 0:End Sub
  626. Sub sw45_Hit : vpmTimer.PulseSw 45:Me.TimerEnabled = 1:sw45p.TransX = -4: playsound SoundFX("fx_chapa",DOFTargets): End Sub
  627. Sub sw45_Timer:Me.TimerEnabled = 0:sw45p.TransX = 0:End Sub
  628. Sub sw46_Hit : vpmTimer.PulseSw 46:Me.TimerEnabled = 1:sw46p.TransX = -4: playsound SoundFX("fx_chapa",DOFTargets): End Sub
  629. Sub sw46_Timer:Me.TimerEnabled = 0:sw46p.TransX = 0:End Sub
  630. Sub sw47_Hit : vpmTimer.PulseSw 47:Me.TimerEnabled = 1:sw47p.TransX = -4: playsound SoundFX("fx_chapa",DOFTargets): End Sub
  631. Sub sw47_Timer:Me.TimerEnabled = 0:sw47p.TransX = 0:End Sub
  632. Sub sw48_Hit : vpmTimer.PulseSw 48:Me.TimerEnabled = 1:sw48p.TransX = -4: playsound SoundFX("fx_chapa",DOFTargets): End Sub
  633. Sub sw48_Timer:Me.TimerEnabled = 0:sw48p.TransX = 0:End Sub
  634. Sub sw60_Hit : vpmTimer.PulseSw 60:Me.TimerEnabled = 1:sw60p.TransX = -4: playsound SoundFX("fx_chapa",DOFTargets): End Sub
  635. Sub sw60_Timer:Me.TimerEnabled = 0:sw60p.TransX = 0:End Sub
  636. Sub sw61_Hit : vpmTimer.PulseSw 61:Me.TimerEnabled = 1:sw61p.TransX = -4: playsound SoundFX("fx_chapa",DOFTargets): End Sub
  637. Sub sw61_Timer:Me.TimerEnabled = 0:sw61p.TransX = 0:End Sub
  638. Sub sw62_Hit : vpmTimer.PulseSw 62:Me.TimerEnabled = 1:sw62p.TransX = -4: playsound SoundFX("fx_chapa",DOFTargets): End Sub
  639. Sub sw62_Timer:Me.TimerEnabled = 0:sw62p.TransX = 0:End Sub
  640.  
  641. 'Sub sw63_Hit : vpmTimer.PulseSw 63:Me.TimerEnabled = 1:sw63p.TransX = -4: playsound SoundFX("fx_chapa"): End Sub
  642. 'Sub sw63_Timer:Me.TimerEnabled = 0:sw63p.TransX = 0:End Sub
  643.  
  644. Sub sw43s_Spin:vpmTimer.PulseSw 43:End Sub
  645.  
  646. Sub sw44_Hit : Controller.Switch(44) = 1: End Sub 'left orbit made
  647. Sub sw44_UnHit: Controller.Switch(44) = 0: End Sub
  648.  
  649. 'Sub sw49a_Hit:bsRScoop.AddBall Me:End Sub
  650. Dim aBall, aZpos
  651.  
  652.  
  653.  
  654. Sub sw49a_Hit
  655. Set aBall = ActiveBall
  656. aZpos = 50
  657. sw49a.TimerInterval = 2
  658. sw49a.TimerEnabled = 1
  659. Controller.Switch(49) = 1
  660. playsound "kicker_enter_center"
  661. End Sub
  662.  
  663.  
  664.  
  665. Sub sw49a_Timer
  666. aBall.Z = aZpos
  667. aZpos = aZpos-2
  668. If aZpos <0 Then
  669. sw49a.TimerEnabled = 0
  670. sw49a.DestroyBall
  671. sw49.CreateBall
  672. sw49a.Enabled = 0
  673. unhittimer.Enabled = 1
  674. End If
  675. End Sub
  676.  
  677. Sub unhittimer_timer
  678. unhittimer.enabled = 0
  679. End Sub
  680.  
  681. Sub k3trig_hit
  682. sw49a.enabled = 1
  683. end sub
  684.  
  685. Sub k3trig_unHit
  686. 'BallInPlunger = 0
  687. End Sub
  688.  
  689. Sub sw50_Hit : Controller.Switch(50) = 1: End Sub 'right orbit made
  690. Sub sw50_UnHit: Controller.Switch(50) = 0: End Sub
  691. Sub sw51_Hit : Controller.Switch(51) = 1: End Sub 'bssvuk exit
  692. Sub sw51_UnHit: Controller.Switch(51) = 0: End Sub
  693. Sub sw52_Hit : Controller.Switch(52) = 1: GI_AllOff 1000:End Sub 'right ramp made
  694. Sub sw52_UnHit: Controller.Switch(52) = 0: End Sub
  695. Sub sw53_Hit : Controller.Switch(53) = 1: End Sub 'middle ramp
  696. Sub sw53_UnHit: Controller.Switch(53) = 0: End Sub
  697. Sub sw54_Hit : Controller.Switch(54) = 1: End Sub 'left ramp opto
  698. Sub sw54_UnHit: Controller.Switch(54) = 0: End Sub
  699.  
  700. Sub sw56_Hit : Controller.Switch(56) = 1: End Sub 'leftvuk opto
  701. Sub sw56_UnHit: Controller.Switch(56) = 0: End Sub
  702.  
  703. Sub sw59_Hit : Controller.Switch(59) = 1: End Sub 'transfer tube
  704. Sub sw59_UnHit: Controller.Switch(59) = 0: End Sub
  705.  
  706. Sub sw23_Hit : Controller.Switch(23) = 1: Playsound "rollover": GI_TroughCheck: End Sub ' shooter lane
  707. Sub sw23_UnHit: Controller.Switch(23) = 0: End Sub
  708.  
  709. dim MotorCallback
  710. Set MotorCallback = GetRef("GameTimer")
  711. Sub GameTimer
  712. UpdateFlipperLogos
  713. End Sub
  714.  
  715. Sub UpdateFlipperLogo_Timer
  716. LFLogo.RotY = LeftFlipper.CurrentAngle
  717. RFlogo.RotY = RightFlipper.CurrentAngle
  718. LFLogo1.RotY = UpLeftFlipper.CurrentAngle
  719. RFlogo1.RotY = UpRightFlipper.CurrentAngle
  720. LeftFlipperShadow.RotZ = LeftFlipper.CurrentAngle - 122
  721. RightFlipperShadow.RotZ = RightFlipper.CurrentAngle -238
  722. End Sub
  723.  
  724. Sub RLS_Timer()
  725. sw8p.RotX = -(sw8s.currentangle) +90
  726. sw43p.RotX = -(sw43s.currentangle) +90
  727. sw44p.RotX = -(sw44s.currentangle) +90
  728. sw50p.RotX = -(sw50s.currentangle) +90
  729. sw53p.RotX = -(sw53s.currentangle) +90
  730. sw51p.RotX = -(sw51s.currentangle) +90
  731. leftrampp.RotX = -(leftramps.currentangle) +90
  732. Left1.ObjRotZ = left1f.currentangle +198
  733. Left2.ObjRotZ = left2f.currentangle +162
  734. Left3.TransZ = left3f.currentangle
  735. Right1.ObjRotZ = Right1f.currentangle +162
  736. Right2.ObjRotZ = Right2f.currentangle +198
  737. Right3.TransZ = Right3f.currentangle
  738. End Sub
  739.  
  740. Dim sw33up, sw34up, sw35up, sw36up, sw37up, sw38up, sw39up, sw40up, sw10up, sw11up, sw12up, sw13up, sw7up, sw6up, sw5up, sw4up
  741. Dim Jaildown, RPDown, LPUp
  742. Dim PrimT
  743.  
  744. Sub PrimT_Timer
  745. if sw33.IsDropped = True then sw33up = False else sw33up = True
  746. if sw34.IsDropped = True then sw34up = False else sw34up = True
  747. if sw35.IsDropped = True then sw35up = False else sw35up = True
  748. if sw36.IsDropped = True then sw36up = False else sw36up = True
  749. if sw37.IsDropped = True then sw37up = False else sw37up = True
  750. if sw38.IsDropped = True then sw38up = False else sw38up = True
  751. if sw39.IsDropped = True then sw39up = False else sw39up = True
  752. if sw40.IsDropped = True then sw40up = False else sw40up = True
  753. if sw10.IsDropped = True then sw10up = False else sw10up = True
  754. if sw11.IsDropped = True then sw11up = False else sw11up = True
  755. if sw12.IsDropped = True then sw12up = False else sw12up = True
  756. if sw13.IsDropped = True then sw13up = False else sw13up = True
  757. if sw7.IsDropped = True then sw7up = False else sw7up = True
  758. if sw6.IsDropped = True then sw6up = False else sw6up = True
  759. if sw5.IsDropped = True then sw5up = False else sw5up = True
  760. if sw4.IsDropped = True then sw4up = False else sw4up = True
  761. if JailDiv.IsDropped = true then Jaildown = False else Jaildown = True
  762. if RightPost.IsDropped = true then RPDown = False else RPDown = True
  763. if LeftPost.IsDropped = true then LPUp = False else LPUp = True
  764. End Sub
  765.  
  766. Sub DT_Timer()
  767. If sw33up = True and sw33p.z < 25 then sw33p.z = sw33p.z + 3
  768. If sw34up = True and sw34p.z < 25 then sw34p.z = sw34p.z + 3
  769. If sw35up = True and sw35p.z < 25 then sw35p.z = sw35p.z + 3
  770. If sw36up = True and sw36p.z < 25 then sw36p.z = sw36p.z + 3
  771. If sw37up = True and sw37p.z < 25 then sw37p.z = sw37p.z + 3
  772. If sw38up = True and sw38p.z < 25 then sw38p.z = sw38p.z + 3
  773. If sw39up = True and sw39p.z < 25 then sw39p.z = sw39p.z + 3
  774. If sw40up = True and sw40p.z < 25 then sw40p.z = sw40p.z + 3
  775. If sw10up = True and sw10p.z < 25 then sw10p.z = sw10p.z + 3
  776. If sw11up = True and sw11p.z < 25 then sw11p.z = sw11p.z + 3
  777. If sw12up = True and sw12p.z < 25 then sw12p.z = sw12p.z + 3
  778. If sw13up = True and sw13p.z < 25 then sw13p.z = sw13p.z + 3
  779. If Jaildown = true and Jail1.z > 160 then Jail1.z = Jail1.z - 3
  780. If Jaildown = true and Jail2.z > 160 then Jail2.z = Jail2.z - 3
  781. If RPDown = true and RPPrim.z > 160 then RPPrim.z = RPPrim.z - 3
  782. If LPUp = true and LeftPostPrim.z < 0 then LeftPostPrim.z = LeftPostPrim.z + 3
  783. If sw7up = True and sw7p.z < 25 then sw7p.z = sw7p.z + 3
  784. If sw6up = True and sw6p.z < 25 then sw6p.z = sw6p.z + 3
  785. If sw5up = True and sw5p.z < 25 then sw5p.z = sw5p.z + 3
  786. If sw4up = True and sw4p.z < 25 then sw4p.z = sw4p.z + 3
  787. If sw33up = False and sw33p.z > -20 then sw33p.z = sw33p.z - 3
  788. If sw34up = False and sw34p.z > -20 then sw34p.z = sw34p.z - 3
  789. If sw35up = False and sw35p.z > -20 then sw35p.z = sw35p.z - 3
  790. If sw36up = False and sw36p.z > -20 then sw36p.z = sw36p.z - 3
  791. If sw37up = False and sw37p.z > -20 then sw37p.z = sw37p.z - 3
  792. If sw38up = False and sw38p.z > -20 then sw38p.z = sw38p.z - 3
  793. If sw39up = False and sw39p.z > -20 then sw39p.z = sw39p.z - 3
  794. If sw40up = False and sw40p.z > -20 then sw40p.z = sw40p.z - 3
  795. If sw10up = False and sw10p.z > -20 then sw10p.z = sw10p.z - 3
  796. If sw11up = False and sw11p.z > -20 then sw11p.z = sw11p.z - 3
  797. If sw12up = False and sw12p.z > -20 then sw12p.z = sw12p.z - 3
  798. If sw13up = False and sw13p.z > -20 then sw13p.z = sw13p.z - 3
  799. If Jaildown = False and Jail1.z < 210 then Jail1.z = Jail1.z + 3
  800. If Jaildown = False and Jail2.z < 210 then Jail2.z = Jail2.z + 3
  801. If RPDown = False and RPPrim.z < 210 then RPPrim.z = RPPrim.z + 3
  802. If LPUp = False and LeftPostPrim.z > -50 then LeftPostPrim.z = LeftPostPrim.z - 3
  803. If sw7up = False and sw7p.z > -20 then sw7p.z = sw7p.z - 3
  804. If sw6up = False and sw6p.z > -20 then sw6p.z = sw6p.z - 3
  805. If sw5up = False and sw5p.z > -20 then sw5p.z = sw5p.z - 3
  806. If sw4up = False and sw4p.z > -20 then sw4p.z = sw4p.z - 3
  807. If sw33p.z >= -20 then sw33up = False
  808. If sw34p.z >= -20 then sw34up = False
  809. If sw35p.z >= -20 then sw35up = False
  810. If sw36p.z >= -20 then sw36up = False
  811. If sw37p.z >= -20 then sw37up = False
  812. If sw38p.z >= -20 then sw38up = False
  813. If sw39p.z >= -20 then sw39up = False
  814. If sw40p.z >= -20 then sw40up = False
  815. If sw10p.z >= -20 then sw10up = False
  816. If sw11p.z >= -20 then sw11up = False
  817. If sw12p.z >= -20 then sw12up = False
  818. If sw13p.z >= -20 then sw13up = False
  819. If Jail1.z <= 210 then Jaildown = false
  820. If Jail2.z <= 210 then Jaildown = false
  821. ' f RPPrim.z <= 210 then RPDown = false
  822. If sw7p.z >= -20 then sw7up = False
  823. If sw6p.z >= -20 then sw6up = False
  824. If sw5p.z >= -20 then sw5up = False
  825. If sw4p.z >= -20 then sw4up = False
  826. End Sub
  827.  
  828.  
  829. 'Sub LampTimer_Timer()
  830. ' Dim chgLamp, num, chg, ii
  831. ' chgLamp = Controller.ChangedLamps
  832. ' If Not IsEmpty(chgLamp) Then
  833. ' For ii = 0 To UBound(chgLamp)
  834. ' LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
  835. ' FadingLevel(chgLamp(ii, 0) ) = chgLamp(ii, 1) + 4
  836. ' FlashState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
  837. '
  838. ' Next
  839. ' End If
  840. '
  841. ' UpdateLamps
  842. 'End Sub
  843.  
  844.  
  845. '***********************************************
  846. '***********************************************
  847. ' Lamps
  848. '***********************************************
  849. '***********************************************
  850.  
  851.  
  852.  
  853. Dim LampState(200), FadingLevel(200), FadingState(200)
  854. Dim FlashState(200), FlashLevel(200)
  855. Dim FlashSpeedUp, FlashSpeedDown
  856. Dim x
  857.  
  858. AllLampsOff()
  859. LampTimer.Interval = 40 'lamp fading speed
  860. LampTimer.Enabled = 1
  861. '
  862. FlashInit()
  863. FlasherTimer.Interval = 10 'flash fading speed
  864. FlasherTimer.Enabled = 1
  865.  
  866. Sub LampTimer_Timer()
  867. Dim chgLamp, num, chg, ii
  868. chgLamp = Controller.ChangedLamps
  869. If Not IsEmpty(chgLamp) Then
  870. For ii = 0 To UBound(chgLamp)
  871. LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
  872. FadingLevel(chgLamp(ii, 0) ) = chgLamp(ii, 1) + 4
  873. FlashState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
  874.  
  875. 'GI_CheckWalkerLights chgLamp(ii, 0), chgLamp(ii, 1)
  876. Next
  877. End If
  878.  
  879. UpdateLamps
  880. End Sub
  881.  
  882. Sub FlashInit
  883. Dim i
  884. For i = 0 to 200
  885. FlashState(i) = 0
  886. FlashLevel(i) = 0
  887. Next
  888.  
  889. FlashSpeedUp = 500 ' fast speed when turning on the flasher
  890. FlashSpeedDown = 100 ' slow speed when turning off the flasher, gives a smooth fading
  891. AllFlashOff()
  892. End Sub
  893.  
  894. Sub AllFlashOff
  895. Dim i
  896. For i = 0 to 200
  897. FlashState(i) = 0
  898. Next
  899. End Sub
  900.  
  901. Sub UpdateLamps()
  902.  
  903. NFadeL 4, l4
  904. NFadeL 5, l5
  905. NFadeL 6, l6
  906. NFadeL 7, l7
  907. NFadeL 8, l8
  908. NFadeL 9, l9
  909. NFadeL 10, l10
  910. NFadeL 11, l11
  911. NFadeL 12, l12
  912. NFadeL 13, l13
  913. NFadeL 14, l14
  914. NFadeL 15, l15
  915. NFadeL 16, l16
  916. NFadeL 17, l17
  917. NFadeL 18, l18
  918. NFadeL 19, l19
  919. NFadeL 20, l20
  920. NFadeL 21, l21
  921. NFadeL 22, l22
  922. NFadeL 23, l23
  923. NFadeL 24, l24
  924. NFadeL 25, l25
  925. NFadeL 26, l26
  926. NFadeL 27, l27
  927. NFadeL 28, l28
  928. NFadeL 29, l29
  929. NFadeL 30, l30
  930. NFadeL 31, l31
  931. NFadeL 32, l32
  932. NFadeL 33, l33
  933. NFadeL 34, l34
  934. NFadeL 35, l35
  935. NFadeL 36, l36
  936. NFadeL 37, l37
  937. NFadeL 38, l38
  938. NFadeL 39, l39
  939. NFadeL 40, l40
  940. NFadeL 41, l41
  941. NFadeL 42, l42
  942. NFadeL 43, l43
  943. NFadeL 44, l44
  944. NFadeL 45, l45
  945. NFadeL 46, l46
  946. NFadeL 47, l47
  947. NFadeL 48, l48
  948. NFadeL 49, l49
  949. NFadeL 50, l50
  950. NFadeL 51, l51
  951. NFadeL 52, l52
  952. NFadeL 53, l53
  953. NFadeL 54, l54
  954. NFadeL 55, l55
  955. NFadeL 56, l56
  956. NFadeL 57, l57
  957. NFadeL 58, l58
  958. NFadeL 59, l59
  959. NFadeL 60, l60
  960. NFadeL 61, l61
  961. NFadeL 62, l62
  962. NFadeL 63, l63
  963. NFadeL 64, l64
  964. NFadeL 65, l65
  965. NFadeL 66, l66
  966.  
  967. NFadeL 69, l69
  968. NFadeL 70, l70
  969. NFadeL 71, l71
  970. NFadeL 72, l72
  971. NFadeL 73, l73
  972. NFadeL 74, l74
  973. NFadeL 78, l78
  974. NFadeL 79, l79
  975. NFadeL 80, l80
  976. NFadeLm 122, f22a
  977. NFadeLm 122, f22b
  978. NFadeL 122, f22d
  979. NFadeLm 123, f23a
  980. NFadeLm 123, f23b
  981. NFadeL 123, f23d
  982. NFadeLm 126, f26a
  983. NFadeLm 126, f26b
  984. NFadeL 126, f26d
  985. NFadeLm 127, f27a
  986. NFadeLm 127, f27b
  987. NFadeL 127, f27d
  988. NFadeLm 128, f28a
  989. NFadeLm 128, f28b
  990. NFadeL 128, f28d
  991. NFadeLm 129, f29a
  992. NFadeLm 129, f29b
  993. NFadeL 129, f29d
  994. NFadeLm 130, f30a
  995. NFadeLm 130, f30b
  996. NFadeL 130, f30d
  997. NFadeLm 131, f31a
  998. NFadeLm 131, f31b
  999. NFadeL 131, f31d
  1000. ' FlashAR 122, f122b, "rf_on", "rf_a", "rf_b", Refresh 'left slingshot flash
  1001. ' FlashAR 123, f123b, "rf_on", "rf_a", "rf_b", Refresh 'right slingshot flash
  1002. ' FlashAR 125, f125b, "rf_on", "rf_a", "rf_b", Refresh 'flash left spinner
  1003. ' FlashAR 126, f126b, "rf_on", "rf_a", "rf_b", Refresh 'back panel 1 left
  1004. ' FlashAR 127, f127b, "rf_on", "rf_a", "rf_b", Refresh 'back panel 2
  1005. ' FlashAR 128, f128b, "rf_on", "rf_a", "rf_b", Refresh 'back panel 3
  1006. ' FlashAR 129, f129b, "rf_on", "rf_a", "rf_b", Refresh 'back panel 4
  1007. ' FlashAR 130, f130b, "rf_on", "rf_a", "rf_b", Refresh 'back panel 5 right
  1008. ' FlashAR 131, f131b, "rf_on", "rf_a", "rf_b", Refresh 'flash right vuk
  1009.  
  1010. End Sub
  1011.  
  1012. Sub FadePrim(nr, pri, a, b, c, d)
  1013. Select Case FadingLevel(nr)
  1014. Case 2:pri.image = d:FadingLevel(nr) = 0
  1015. Case 3:pri.image = c:FadingLevel(nr) = 1
  1016. Case 4:pri.image = b:FadingLevel(nr) = 2
  1017. Case 5:pri.image = a:FadingLevel(nr) = 3
  1018. End Select
  1019. End Sub
  1020.  
  1021. ''Lights
  1022.  
  1023. Sub NFadeL(nr, a)
  1024. Select Case FadingLevel(nr)
  1025. Case 4:a.state = 0:FadingLevel(nr) = 0
  1026. Case 5:a.State = 1:FadingLevel(nr) = 1
  1027. End Select
  1028. End Sub
  1029.  
  1030. Sub NFadeLm(nr, a)
  1031. Select Case FadingLevel(nr)
  1032. Case 4:a.state = 0
  1033. Case 5:a.State = 1
  1034. End Select
  1035. End Sub
  1036.  
  1037. Sub Flash(nr, object)
  1038. Select Case FlashState(nr)
  1039. Case 0 'off
  1040. FlashLevel(nr) = FlashLevel(nr) - FlashSpeedDown
  1041. If FlashLevel(nr) < 0 Then
  1042. FlashLevel(nr) = 0
  1043. FlashState(nr) = -1 'completely off
  1044. End if
  1045. Object.opacity = FlashLevel(nr)
  1046. Case 1 ' on
  1047. FlashLevel(nr) = FlashLevel(nr) + FlashSpeedUp
  1048. If FlashLevel(nr) > 1000 Then
  1049. FlashLevel(nr) = 1000
  1050. FlashState(nr) = -2 'completely on
  1051. End if
  1052. Object.opacity = FlashLevel(nr)
  1053. End Select
  1054. End Sub
  1055.  
  1056. Sub Flashm(nr, object) 'multiple flashers, it doesn't change the flashstate
  1057. Select Case FlashState(nr)
  1058. Case 0 'off
  1059. Object.opacity = FlashLevel(nr)
  1060. Case 1 ' on
  1061. Object.opacity = FlashLevel(nr)
  1062. End Select
  1063. End Sub
  1064.  
  1065. Sub AllLampsOff():For x = 1 to 200:LampState(x) = 4:FadingLevel(x) = 4:Next:UpdateLamps:UpdateLamps:Updatelamps:End Sub
  1066.  
  1067.  
  1068. Sub SetLamp(nr, value)
  1069. If value = 0 AND LampState(nr) = 0 Then Exit Sub
  1070. If value = 1 AND LampState(nr) = 1 Then Exit Sub
  1071. LampState(nr) = abs(value) + 4
  1072. FadingLevel(nr ) = abs(value) + 4: FadingState(nr ) = abs(value) + 4
  1073. End Sub
  1074.  
  1075. Sub SetFlash(nr, stat)
  1076. FlashState(nr) = ABS(stat)
  1077. End Sub
  1078.  
  1079. Sub FlasherTimer_Timer()
  1080.  
  1081. 'Flash 3, f3
  1082. 'Flash 4, f4
  1083. 'Flash 5, f5
  1084. 'Flash 6, f6
  1085. 'Flash 7, f7
  1086. 'Flash 8, f8
  1087. 'Flash 9, f9
  1088. 'Flash 10, f10
  1089. 'Flash 11, f11
  1090. 'Flash 12, f12
  1091. 'Flash 13, f13
  1092. 'Flash 14, f14
  1093. 'Flash 15, f15
  1094. 'Flash 16, f16
  1095. 'Flash 17, f17
  1096. 'Flash 18, f18
  1097. 'Flash 19, f19
  1098. 'Flash 20, f20
  1099. 'Flash 21, f21
  1100. 'Flash 22, f22
  1101. 'Flash 23, f23
  1102. 'Flash 24, f24
  1103. 'Flash 25, f25
  1104. 'Flash 26, f26
  1105. 'Flash 27, f27
  1106. 'Flash 28, f28
  1107. 'Flash 29, f29
  1108. 'Flash 30, f30
  1109. 'Flash 31, f31
  1110. 'Flash 32, f32
  1111. 'Flash 33, f33
  1112. 'Flash 34, f34
  1113. 'Flash 35, f35
  1114. 'Flash 36, f36
  1115. 'Flash 37, f37
  1116. 'Flash 38, f38
  1117. 'Flash 39, f39
  1118. 'Flash 40, f40
  1119. 'Flash 41, f41
  1120. 'Flash 42, f42
  1121. 'Flash 43, f43
  1122. 'Flash 44, f44
  1123. 'Flash 45, f45
  1124. 'Flash 46, f46
  1125. 'Flash 47, f47
  1126. 'Flash 48, f48
  1127. 'Flash 49, f49
  1128. 'Flash 50, f50
  1129. 'Flash 51, f51
  1130. 'Flash 52, f52
  1131. 'Flash 53, f53
  1132. 'Flash 54, f54
  1133. 'Flash 55, f55
  1134. 'Flash 56, f56
  1135. 'Flash 57, f57
  1136. 'Flash 58, f58
  1137. 'Flash 59, f59
  1138. 'Flash 60, f60
  1139. 'Flash 61, f61
  1140. 'Flash 62, f62 'left pop
  1141. 'Flash 63, f63
  1142. 'Flash 64, f64
  1143. 'Flash 65, f65
  1144. 'Flash 66, f66
  1145. 'Flash 67, f67
  1146. 'Flash 68, f68
  1147. 'Flash 69, f69
  1148. 'Flash 70, f70 'right pop
  1149. 'Flash 71, f71
  1150. 'Flash 72, f72
  1151. 'Flash 73, f73
  1152. 'Flash 74, f74
  1153. 'Flash 75, f75
  1154. 'Flash 76, f76
  1155. 'Flash 77, f77
  1156. 'Flash 78, f78 'bottom pop
  1157. 'Flash 79, f79
  1158. 'Flash 80, f80
  1159. '
  1160. Flash 132, f22c
  1161. Flash 133, f23c
  1162. 'Flash 135, f125a
  1163. 'Flash 136, f126a
  1164. 'Flash 137, f127a
  1165. 'Flash 138, f128a
  1166. 'Flash 139, f129a
  1167. 'Flash 140, f130a
  1168. Flash 136, f26c
  1169. Flash 137, f27c
  1170. Flash 138, f28c
  1171. Flash 139, f29c
  1172. Flash 140, f30c
  1173. Flash 141, f31c
  1174.  
  1175.  
  1176. End Sub
  1177.  
  1178.  
  1179. ''***** GI routines
  1180.  
  1181. Sub Drain_Hit
  1182. PlaySound "balltruhe"
  1183. bsTrough.AddBall Me
  1184. Drain.TimerInterval = 200
  1185. Drain.TimerEnabled = 1
  1186. End Sub
  1187.  
  1188.  
  1189. Sub Drain_Timer
  1190. 'Debug.print GI_TroughCheck & " " & Lampstate(4) & " " & Ballsavelight
  1191. If GI_TroughCheck = 4 And LampState(3) = 0 Then
  1192. GI_AllOff 0
  1193. End If
  1194. If GI_TroughCheck = 3 And BallInJail = True And LampState(3) = 0 Then
  1195. GI_AllOff 0
  1196. End If
  1197. Drain.TimerEnabled = False
  1198. End Sub
  1199.  
  1200. Sub BallRelease_UnHit(): GI_AllOn: End Sub
  1201.  
  1202. Dim ballsavelight
  1203.  
  1204. Dim MultiballFlag
  1205.  
  1206.  
  1207. Sub GI_AllOff (time) 'Turn GI Off
  1208. debug.print "gioff"
  1209. DOF 101, DOFOff
  1210. 'debug.print "GI OFF " & time
  1211. 'UpdateGI 0,0
  1212. 'RampsOff
  1213. 'FlippersOff
  1214. dim xx
  1215. for each xx in GILights
  1216. xx.state = 0
  1217. Next
  1218. If time > 0 Then
  1219. GI_AllOnT.Interval = time
  1220. GI_AllOnT.Enabled = 0
  1221. GI_AllOnT.Enabled = 1
  1222. End If
  1223. End Sub
  1224.  
  1225. Sub GI_AllOn 'Turn GI On
  1226. debug.print "gion"
  1227. DOF 101, DOFOn
  1228. 'UpdateGI 0,8
  1229. 'RampsOn
  1230. 'FlippersOn
  1231. dim xx
  1232. for each xx in GILights
  1233. xx.state = 1
  1234. Next
  1235. End Sub
  1236.  
  1237. Sub GI_AllOnT_Timer 'Turn GI On timer
  1238. 'UpdateGI 0,8
  1239. 'RampsOn
  1240. 'FlippersOn
  1241. dim xx
  1242. for each xx in GILights
  1243. xx.state = 1
  1244. Next
  1245. GI_AllOnT.Enabled = 0
  1246. End Sub
  1247.  
  1248. Function GI_TroughCheck
  1249. Dim Ballcount: Ballcount = 0
  1250. If Controller.Switch(18) = TRUE then Ballcount = Ballcount + 1
  1251. If Controller.Switch(19) = TRUE then Ballcount = Ballcount + 1
  1252. If Controller.Switch(20) = TRUE then Ballcount = Ballcount + 1
  1253. If Controller.Switch(21) = TRUE then Ballcount = Ballcount + 1
  1254. If Ballcount < 3 Then 'Keep track of multiball mode
  1255. MultiballFlag = 1
  1256. Else
  1257. MultiballFlag = 0
  1258. End If
  1259.  
  1260. GI_TroughCheck = Ballcount
  1261.  
  1262. 'debug.print "Troughcheck " & ballcount & " Multiball " & MultiballFlag
  1263.  
  1264. If ballcount = 4 then
  1265. GameOverTimerCheck.Enabled = 1 'no ball in play
  1266. 'debug.print timer & "Game Over?"
  1267. Else
  1268. GameOverTimerCheck.Enabled = 0 'ball in play
  1269. 'debug.print timer & "Game Not Over"
  1270. End If
  1271.  
  1272. End Function
  1273.  
  1274. GameOverTimerCheck.Interval = 30000
  1275. Sub GameOverTimerCheck_Timer
  1276. debug.print timer & "Game Over!"
  1277. If GIOnDuringAttractMode = 1 Then GI_AllOn
  1278. GameOverTimerCheck.Enabled = 0
  1279. End Sub
  1280.  
  1281.  
  1282. Dim LED(69)
  1283.  
  1284. LED(0)=Array(D1,D2,D3,D4,D5,D6,D7 )
  1285. LED(1)=Array(D8,D9,D10,D11,D12,D13,D14 )
  1286. LED(2)=Array(D15,D16,D17,D18,D19,D20,D21 )
  1287. LED(3)=Array(D22,D23,D24,D25,D26,D27,D28 )
  1288. LED(4)=Array(D29,D30,D31,D32,D33,D34,D35 )
  1289. LED(5)=Array(D36,D37,D38,D39,D40,D41,D42 )
  1290. LED(6)=Array(D43,D44,D45,D46,D47,D48,D49 )
  1291. LED(7)=Array(D50,D51,D52,D53,D54,D55,D56 )
  1292. LED(8)=Array(D57,D58,D59,D60,D61,D62,D63 )
  1293. LED(9)=Array(D64,D65,D66,D67,D68,D69,D70 )
  1294. LED(10)=Array(D71,D72,D73,D74,D75,D76,D77 )
  1295. LED(11)=Array(D78,D79,D80,D81,D82,D83,D84 )
  1296. LED(12)=Array(D85,D86,D87,D88,D89,D90,D91 )
  1297. LED(13)=Array(D92,D93,D94,D95,D96,D97,D98 )
  1298. LED(14)=Array(D99,D100,D101,D102,D103,D104,D105 )
  1299. LED(15)=Array(D106,D107,D108,D109,D110,D111,D112 )
  1300. LED(16)=Array(D113,D114,D115,D116,D117,D118,D119 )
  1301. LED(17)=Array(D120,D121,D122,D123,D124,D125,D126 )
  1302. LED(18)=Array(D127,D128,D129,D130,D131,D132,D133 )
  1303. LED(19)=Array(D134,D135,D136,D137,D138,D139,D140 )
  1304. LED(20)=Array(D141,D142,D143,D144,D145,D146,D147 )
  1305. LED(21)=Array(D148,D149,D150,D151,D152,D153,D154 )
  1306. LED(22)=Array(D155,D156,D157,D158,D159,D160,D161 )
  1307. LED(23)=Array(D162,D163,D164,D165,D166,D167,D168 )
  1308. LED(24)=Array(D169,D170,D171,D172,D173,D174,D175 )
  1309. LED(25)=Array(D176,D177,D178,D179,D180,D181,D182 )
  1310. LED(26)=Array(D183,D184,D185,D186,D187,D188,D189 )
  1311. LED(27)=Array(D190,D191,D192,D193,D194,D195,D196 )
  1312. LED(28)=Array(D197,D198,D199,D200,D201,D202,D203 )
  1313. LED(29)=Array(D204,D205,D206,D207,D208,D209,D210 )
  1314. LED(30)=Array(D211,D212,D213,D214,D215,D216,D217 )
  1315. LED(31)=Array(D218,D219,D220,D221,D222,D223,D224 )
  1316. LED(32)=Array(D225,D226,D227,D228,D229,D230,D231 )
  1317. LED(33)=Array(D232,D233,D234,D235,D236,D237,D238 )
  1318. LED(34)=Array(D239,D240,D241,D242,D243,D244,D245 )
  1319. LED(35)=Array(D246,D247,D248,D249,D250,D251,D252 )
  1320. LED(36)=Array(D253,D254,D255,D256,D257,D258,D259 )
  1321. LED(37)=Array(D260,D261,D262,D263,D264,D265,D266 )
  1322. LED(38)=Array(D267,D268,D269,D270,D271,D272,D273 )
  1323. LED(39)=Array(D274,D275,D276,D277,D278,D279,D280 )
  1324. LED(40)=Array(D281,D282,D283,D284,D285,D286,D287 )
  1325. LED(41)=Array(D288,D289,D290,D291,D292,D293,D294 )
  1326. LED(42)=Array(D295,D296,D297,D298,D299,D300,D301 )
  1327. LED(43)=Array(D302,D303,D304,D305,D306,D307,D308 )
  1328. LED(44)=Array(D309,D310,D311,D312,D313,D314,D315 )
  1329. LED(45)=Array(D316,D317,D318,D319,D320,D321,D322 )
  1330. LED(46)=Array(D323,D324,D325,D326,D327,D328,D329 )
  1331. LED(47)=Array(D330,D331,D332,D333,D334,D335,D336 )
  1332. LED(48)=Array(D337,D338,D339,D340,D341,D342,D343 )
  1333. LED(49)=Array(D344,D345,D346,D347,D348,D349,D350 )
  1334. LED(50)=Array(D351,D352,D353,D354,D355,D356,D357 )
  1335. LED(51)=Array(D358,D359,D360,D361,D362,D363,D364 )
  1336. LED(52)=Array(D365,D366,D367,D368,D369,D370,D371 )
  1337. LED(53)=Array(D372,D373,D374,D375,D376,D377,D378 )
  1338. LED(54)=Array(D379,D380,D381,D382,D383,D384,D385 )
  1339. LED(55)=Array(D386,D387,D388,D389,D390,D391,D392 )
  1340. LED(56)=Array(D393,D394,D395,D396,D397,D398,D399 )
  1341. LED(57)=Array(D400,D401,D402,D403,D404,D405,D406 )
  1342. LED(58)=Array(D407,D408,D409,D410,D411,D412,D413 )
  1343. LED(59)=Array(D414,D415,D416,D417,D418,D419,D420 )
  1344. LED(60)=Array(D421,D422,D423,D424,D425,D426,D427 )
  1345. LED(61)=Array(D428,D429,D430,D431,D432,D433,D434 )
  1346. LED(62)=Array(D435,D436,D437,D438,D439,D440,D441 )
  1347. LED(63)=Array(D442,D443,D444,D445,D446,D447,D448 )
  1348. LED(64)=Array(D449,D450,D451,D452,D453,D454,D455 )
  1349. LED(65)=Array(D456,D457,D458,D459,D460,D461,D462 )
  1350. LED(66)=Array(D463,D464,D465,D466,D467,D468,D469 )
  1351. LED(67)=Array(D470,D471,D472,D473,D474,D475,D476 )
  1352. LED(68)=Array(D477,D478,D479,D480,D481,D482,D483 )
  1353. LED(69)=Array(D484,D485,D486,D487,D488,D489,D490 )
  1354.  
  1355.  
  1356. 'Dim FlasherLED(69)
  1357. 'FlasherLED(0)=Array(a1,a2,a3,a4,a5,a6,a7 )
  1358. 'FlasherLED(1)=Array(a8,a9,a10,a11,a12,a13,a14 )
  1359. 'FlasherLED(2)=Array(a15,a16,a17,a18,a19,a20,a21 )
  1360. 'FlasherLED(3)=Array(a22,a23,a24,a25,a26,a27,a28 )
  1361. 'FlasherLED(4)=Array(a29,a30,a31,a32,a33,a34,a35 )
  1362. 'FlasherLED(5)=Array(a36,a37,a38,a39,a40,a41,a42 )
  1363. 'FlasherLED(6)=Array(a43,a44,a45,a46,a47,a48,a49 )
  1364. 'FlasherLED(7)=Array(a50,a51,a52,a53,a54,a55,a56 )
  1365. 'FlasherLED(8)=Array(a57,a58,a59,a60,a61,a62,a63 )
  1366. 'FlasherLED(9)=Array(a64,a65,a66,a67,a68,a69,a70 )
  1367. 'FlasherLED(10)=Array(a71,a72,a73,a74,a75,a76,a77 )
  1368. 'FlasherLED(11)=Array(a78,a79,a80,a81,a82,a83,a84 )
  1369. 'FlasherLED(12)=Array(a85,a86,a87,a88,a89,a90,a91 )
  1370. 'FlasherLED(13)=Array(a92,a93,a94,a95,a96,a97,a98 )
  1371. 'FlasherLED(14)=Array(a99,a100,a101,a102,a103,a104,a105 )
  1372. 'FlasherLED(15)=Array(a106,a107,a108,a109,a110,a111,a112 )
  1373. 'FlasherLED(16)=Array(a113,a114,a115,a116,a117,a118,a119 )
  1374. 'FlasherLED(17)=Array(a120,a121,a122,a123,a124,a125,a126 )
  1375. 'FlasherLED(18)=Array(a127,a128,a129,a130,a131,a132,a133 )
  1376. 'FlasherLED(19)=Array(a134,a135,a136,a137,a138,a139,a140 )
  1377. 'FlasherLED(20)=Array(a141,a142,a143,a144,a145,a146,a147 )
  1378. 'FlasherLED(21)=Array(a148,a149,a150,a151,a152,a153,a154 )
  1379. 'FlasherLED(22)=Array(a155,a156,a157,a158,a159,a160,a161 )
  1380. 'FlasherLED(23)=Array(a162,a163,a164,a165,a166,a167,a168 )
  1381. 'FlasherLED(24)=Array(a169,a170,a171,a172,a173,a174,a175 )
  1382. 'FlasherLED(25)=Array(a176,a177,a178,a179,a180,a181,a182 )
  1383. 'FlasherLED(26)=Array(a183,a184,a185,a186,a187,a188,a189 )
  1384. 'FlasherLED(27)=Array(a190,a191,a192,a193,a194,a195,a196 )
  1385. 'FlasherLED(28)=Array(a197,a198,a199,a200,a201,a202,a203 )
  1386. 'FlasherLED(29)=Array(a204,a205,a206,a207,a208,a209,a210 )
  1387. 'FlasherLED(30)=Array(a211,a212,a213,a214,a215,a216,a217 )
  1388. 'FlasherLED(31)=Array(a218,a219,a220,a221,a222,a223,a224 )
  1389. 'FlasherLED(32)=Array(a225,a226,a227,a228,a229,a230,a231 )
  1390. 'FlasherLED(33)=Array(a232,a233,a234,a235,a236,a237,a238 )
  1391. 'FlasherLED(34)=Array(a239,a240,a241,a242,a243,a244,a245 )
  1392. 'FlasherLED(35)=Array(a246,a247,a248,a249,a250,a251,a252 )
  1393. 'FlasherLED(36)=Array(a253,a254,a255,a256,a257,a258,a259 )
  1394. 'FlasherLED(37)=Array(a260,a261,a262,a263,a264,a265,a266 )
  1395. 'FlasherLED(38)=Array(a267,a268,a269,a270,a271,a272,a273 )
  1396. 'FlasherLED(39)=Array(a274,a275,a276,a277,a278,a279,a280 )
  1397. 'FlasherLED(40)=Array(a281,a282,a283,a284,a285,a286,a287 )
  1398. 'FlasherLED(41)=Array(a288,a289,a290,a291,a292,a293,a294 )
  1399. 'FlasherLED(42)=Array(a295,a296,a297,a298,a299,a300,a301 )
  1400. 'FlasherLED(43)=Array(a302,a303,a304,a305,a306,a307,a308 )
  1401. 'FlasherLED(44)=Array(a309,a310,a311,a312,a313,a314,a315 )
  1402. 'FlasherLED(45)=Array(a316,a317,a318,a319,a320,a321,a322 )
  1403. 'FlasherLED(46)=Array(a323,a324,a325,a326,a327,a328,a329 )
  1404. 'FlasherLED(47)=Array(a330,a331,a332,a333,a334,a335,a336 )
  1405. 'FlasherLED(48)=Array(a337,a338,a339,a340,a341,a342,a343 )
  1406. 'FlasherLED(49)=Array(a344,a345,a346,a347,a348,a349,a350 )
  1407. 'FlasherLED(50)=Array(a351,a352,a353,a354,a355,a356,a357 )
  1408. 'FlasherLED(51)=Array(a358,a359,a360,a361,a362,a363,a364 )
  1409. 'FlasherLED(52)=Array(a365,a366,a367,a368,a369,a370,a371 )
  1410. 'FlasherLED(53)=Array(a372,a373,a374,a375,a376,a377,a378 )
  1411. 'FlasherLED(54)=Array(a379,a380,a381,a382,a383,a384,a385 )
  1412. 'FlasherLED(55)=Array(a386,a387,a388,a389,a390,a391,a392 )
  1413. 'FlasherLED(56)=Array(a393,a394,a395,a396,a397,a398,a399 )
  1414. 'FlasherLED(57)=Array(a400,a401,a402,a403,a404,a405,a406 )
  1415. 'FlasherLED(58)=Array(a407,a408,a409,a410,a411,a412,a413 )
  1416. 'FlasherLED(59)=Array(a414,a415,a416,a417,a418,a419,a420 )
  1417. 'FlasherLED(60)=Array(a421,a422,a423,a424,a425,a426,a427 )
  1418. 'FlasherLED(61)=Array(a428,a429,a430,a431,a432,a433,a434 )
  1419. 'FlasherLED(62)=Array(a435,a436,a437,a438,a439,a440,a441 )
  1420. 'FlasherLED(63)=Array(a442,a443,a444,a445,a446,a447,a448 )
  1421. 'FlasherLED(64)=Array(a449,a450,a451,a452,a453,a454,a455 )
  1422. 'FlasherLED(65)=Array(a456,a457,a458,a459,a460,a461,a462 )
  1423. 'FlasherLED(66)=Array(a463,a464,a465,a466,a467,a468,a469 )
  1424. 'FlasherLED(67)=Array(a470,a471,a472,a473,a474,a475,a476 )
  1425. 'FlasherLED(68)=Array(a477,a478,a479,a480,a481,a482,a483 )
  1426. 'FlasherLED(69)=Array(a484,a485,a486,a487,a488,a489,a490 )
  1427.  
  1428.  
  1429. Function CheckLED (num)
  1430. Dim tot,ii,specialcase
  1431. if num = 13 then specialcase = 1
  1432. For ii = (num*5 - 5) to (num*5 - 1 - specialcase)
  1433. tot = tot + CheckLEDColumn(ii)
  1434. Next
  1435. 'debug.print Timer & "LED " & num & " = " & tot
  1436. CheckLED = tot
  1437. End Function
  1438.  
  1439. Function CheckLEDColumn (num)
  1440. Dim tot, obj,i
  1441. i = 1
  1442. For each obj in LED(num)
  1443. tot = tot + obj.State * i
  1444. i = i * 2
  1445. Next
  1446. 'debug.print Timer & "LEDColumn " & num & " = " & tot
  1447. CheckLEDColumn = tot
  1448. End Function
  1449.  
  1450.  
  1451.  
  1452. Sub SetLED14toL
  1453. Dim ii, src, dest, iii, obj
  1454. For each obj in LED(65)
  1455. obj.state = 1
  1456. Next
  1457. For ii = 66 to 69
  1458. For each obj in LED(ii)
  1459. obj.state = 1
  1460. Exit For
  1461. Next
  1462. Next
  1463.  
  1464. ' For each obj in FlasherLED(65)
  1465. ' obj.alpha = 255
  1466. ' Next
  1467. ' For ii = 66 to 69
  1468. ' For each obj in FlasherLED(ii)
  1469. ' obj.alpha = 255
  1470. ' Exit For
  1471. ' Next
  1472. ' Next
  1473. End Sub
  1474.  
  1475. Sub SetLED14toT
  1476. Dim ii, src, dest, iii, obj
  1477.  
  1478. D462.state = 255
  1479. D469.state = 255
  1480. D470.state = 255
  1481. D471.state = 255
  1482. D472.state = 255
  1483. D473.state = 255
  1484. D474.state = 255
  1485. D475.state = 255
  1486. D476.state = 255
  1487. D483.state = 255
  1488. D490.state = 255
  1489.  
  1490. ' a462.alpha = 255
  1491. ' a469.alpha = 255
  1492. ' a470.alpha = 255
  1493. ' a471.alpha = 255
  1494. ' a472.alpha = 255
  1495. ' a473.alpha = 255
  1496. ' a474.alpha = 255
  1497. ' a475.alpha = 255
  1498. ' a476.alpha = 255
  1499. ' a483.alpha = 255
  1500. ' a490.alpha = 255
  1501. End Sub
  1502.  
  1503. Sub SetLED14toLED9
  1504. D456.state=D281.state
  1505. D457.state=D282.state
  1506. D458.state=D283.state
  1507. D459.state=D284.state
  1508. D460.state=D285.state
  1509. D461.state=D286.state
  1510. D462.state=D287.state
  1511. D463.state=D288.state
  1512. D464.state=D289.state
  1513. D465.state=D290.state
  1514. D466.state=D291.state
  1515. D467.state=D292.state
  1516. D468.state=D293.state
  1517. D469.state=D294.state
  1518. D470.state=D295.state
  1519. D471.state=D296.state
  1520. D472.state=D297.state
  1521. D473.state=D298.state
  1522. D474.state=D299.state
  1523. D475.state=D300.state
  1524. D476.state=D301.state
  1525. D477.state=D302.state
  1526. D478.state=D303.state
  1527. D479.state=D304.state
  1528. D480.state=D305.state
  1529. D481.state=D306.state
  1530. D482.state=D307.state
  1531. D483.state=D308.state
  1532. D484.state=D309.state
  1533. D485.state=D310.state
  1534. D486.state=D311.state
  1535. D487.state=D312.state
  1536. D488.state=D313.state
  1537. D489.state=D314.state
  1538. D490.state=D315.state
  1539. ' a456.Alpha=a281.Alpha
  1540. ' a457.Alpha=a282.Alpha
  1541. ' a458.Alpha=a283.Alpha
  1542. ' a459.Alpha=a284.Alpha
  1543. ' a460.Alpha=a285.Alpha
  1544. ' a461.Alpha=a286.Alpha
  1545. ' a462.Alpha=a287.Alpha
  1546. ' a463.Alpha=a288.Alpha
  1547. ' a464.Alpha=a289.Alpha
  1548. ' a465.Alpha=a290.Alpha
  1549. ' a466.Alpha=a291.Alpha
  1550. ' a467.Alpha=a292.Alpha
  1551. ' a468.Alpha=a293.Alpha
  1552. ' a469.Alpha=a294.Alpha
  1553. ' a470.Alpha=a295.Alpha
  1554. ' a471.Alpha=a296.Alpha
  1555. ' a472.Alpha=a297.Alpha
  1556. ' a473.Alpha=a298.Alpha
  1557. ' a474.Alpha=a299.Alpha
  1558. ' a475.Alpha=a300.Alpha
  1559. ' a476.Alpha=a301.Alpha
  1560. ' a477.Alpha=a302.Alpha
  1561. ' a478.Alpha=a303.Alpha
  1562. ' a479.Alpha=a304.Alpha
  1563. ' a480.Alpha=a305.Alpha
  1564. ' a481.Alpha=a306.Alpha
  1565. ' a482.Alpha=a307.Alpha
  1566. ' a483.Alpha=a308.Alpha
  1567. ' a484.Alpha=a309.Alpha
  1568. ' a485.Alpha=a310.Alpha
  1569. ' a486.Alpha=a311.Alpha
  1570. ' a487.Alpha=a312.Alpha
  1571. ' a488.Alpha=a313.Alpha
  1572. ' a489.Alpha=a314.Alpha
  1573. ' a490.Alpha=a315.Alpha
  1574.  
  1575. End Sub
  1576. Sub ClearLED14
  1577. Dim ii, src, dest, iii, obj
  1578. For ii = 65 to 69
  1579. For each obj in LED(ii)
  1580. obj.state = 0
  1581. Next
  1582. Next
  1583. ' For ii = 65 to 69
  1584. ' For each obj in FlasherLED(ii)
  1585. ' obj.alpha = 0
  1586. ' Next
  1587. ' Next
  1588.  
  1589. End Sub
  1590.  
  1591. Sub DisplayTimer_Timer
  1592. Dim ChgLED, ii, num, chg, stat, obj
  1593. If B2SOn = False Then 'If B2S not enabled, use 128 bit LED mode
  1594. ChgLed = Controller.ChangedLEDs (&HFFFFFFFF, &HFFFFFFFF, &HFFFFFFFF, &HFFFFFFFF) 'displays both rows, dupe leds
  1595. If Not IsEmpty (ChgLED) Then
  1596.  
  1597. For ii = 0 To UBound (chgLED)
  1598. 'LEDs
  1599. num = chgLED (ii, 0) : chg = chgLED (ii, 1) : stat = chgLED (ii, 2)
  1600. For Each obj In LED (num)
  1601. If chg And 1 Then obj.State = stat And 1
  1602. chg = chg \ DivValue : stat = stat \ DivValue
  1603. Next
  1604.  
  1605. 'Flashers (thanks gtxjoe!)
  1606. ' num = chgLED (ii, 0) : chg = chgLED (ii, 1) : stat = chgLED (ii, 2)
  1607. ' For Each obj In FlasherLED (num)
  1608. ' If chg And 1 Then obj.alpha = (stat And 1)*255
  1609. ' chg = chg \ DivValue : stat = stat \ DivValue
  1610. ' Next
  1611. Next
  1612. End If
  1613.  
  1614. Else 'B2S enabled use 64 bit ChangedLED mode with last LED simulated
  1615. ChgLed = Controller.ChangedLEDs (&Hffffffff, &Hffffffff) 'displays both rows, dupe leds
  1616. If Not IsEmpty (ChgLED) Then
  1617.  
  1618. For ii = 0 To UBound (chgLED)
  1619. 'LEDs
  1620. num = chgLED (ii, 0) : chg = chgLED (ii, 1) : stat = chgLED (ii, 2)
  1621. For Each obj In LED (num)
  1622. If chg And 1 Then obj.State = stat And 1
  1623. chg = chg \ DivValue : stat = stat \ DivValue
  1624. Next
  1625.  
  1626. 'Flashers (thanks gtxjoe!)
  1627. ' num = chgLED (ii, 0) : chg = chgLED (ii, 1) : stat = chgLED (ii, 2)
  1628. ' For Each obj In FlasherLED (num)
  1629. ' If chg And 1 Then obj.alpha = (stat And 1)*255
  1630. ' chg = chg \ DivValue : stat = stat \ DivValue
  1631. ' Next
  1632. Next
  1633.  
  1634.  
  1635. 'This hack fixes LED 13 last column
  1636. Dim LED13value
  1637. LED13value = CheckLED(13)
  1638. Select Case LED13value
  1639. Case 130: 'If 'set to L', fix the L
  1640. D449.State = 1 'L set 449
  1641. ' a449.Alpha = 255
  1642. Case 126: 'diamond 134- 8=126 452(449-455)
  1643. D452.State = 1
  1644. ' a452.Alpha = 255
  1645. Case 133: 'spade 145-12=133 451,452
  1646. D451.State = 1
  1647. D452.State = 1
  1648. ' a451.Alpha = 255
  1649. ' a452.Alpha = 255
  1650. Case 174: 'heart 198-24=174 452,453
  1651. D452.State = 1
  1652. D453.State = 1
  1653. ' a452.Alpha = 255
  1654. ' a453.Alpha = 255
  1655. Case 197: 'club 209-12=197 451,452
  1656. D451.State = 1
  1657. D452.State = 1
  1658. ' a451.Alpha = 255
  1659. ' a452.Alpha = 255
  1660. Case 257: 'Letter O
  1661. D449.State = 0
  1662. D450.State = 1
  1663. D451.State = 1
  1664. D452.State = 1
  1665. D453.State = 1
  1666. D454.State = 1
  1667. D455.State = 0
  1668. ' a449.Alpha = 0
  1669. ' a450.Alpha = 255
  1670. ' a451.Alpha = 255
  1671. ' a452.Alpha = 255
  1672. ' a453.Alpha = 255
  1673. ' a454.Alpha = 255
  1674. ' a455.Alpha = 0
  1675. Case 285: 'Number 0
  1676. D449.State = 0
  1677. D450.State = 1
  1678. D451.State = 1
  1679. D452.State = 1
  1680. D453.State = 1
  1681. D454.State = 1
  1682. D455.State = 0
  1683. ' a449.Alpha = 0
  1684. ' a450.Alpha = 255
  1685. ' a451.Alpha = 255
  1686. ' a452.Alpha = 255
  1687. ' a453.Alpha = 255
  1688. ' a454.Alpha = 255
  1689. ' a455.Alpha = 0
  1690. Case Else:
  1691. D449.State = 0
  1692. D450.State = 0
  1693. D451.State = 0
  1694. D452.State = 0
  1695. D453.State = 0
  1696. D454.State = 0
  1697. D455.State = 0
  1698. ' a449.Alpha = 0
  1699. ' a450.Alpha = 0
  1700. ' a451.Alpha = 0
  1701. ' a452.Alpha = 0
  1702. ' a453.Alpha = 0
  1703. ' a454.Alpha = 0
  1704. ' a455.Alpha = 0
  1705. End Select
  1706.  
  1707. 'This hack fills LED14 with the suit from LED8
  1708. Dim LED7value
  1709. LED7value = CheckLED(7)
  1710. Select Case LED7value
  1711. Case 0: 'If 7th LED is blank and 13th LED is L then set 14th LED to L
  1712. If LED13value = 130 Then 'L=130
  1713. SetLED14toL
  1714. ElseIf LED13value = 257 Then'If 7th LED is blank and 13th LED is O(257) then set 14th LED to L
  1715. SetLED14toT
  1716. Else 'Set 14th LED blank
  1717. ClearLED14
  1718. End if
  1719. Case Else: 'If 7th LED is card, then set 14th LED to the 9th LED suit (25% of being correct)
  1720. SetLED14toLED9
  1721. End Select
  1722. End If
  1723. End If
  1724. End Sub
  1725.  
  1726. Sub Table_exit()
  1727. If B2SOn Then Controller.Stop
  1728. End Sub
  1729.  
  1730. Dim leftdrop:leftdrop = 0
  1731. Sub leftdrop1_Hit:leftdrop = 1:playsound "wireramp":End Sub
  1732. Sub leftdrop2_Hit:
  1733. If leftdrop = 1 then
  1734. PlaySound "balldrop"
  1735. leftdrop = 0
  1736. End If
  1737. StopSound "wireramp"
  1738. 'leftdrop = 0
  1739. End Sub
  1740.  
  1741. Dim rightdrop:rightdrop = 0
  1742. Sub rightdrop1_Hit:rightdrop = 1:playsound "wireramp":End Sub
  1743. Sub rightdrop2_Hit
  1744. If rightdrop = 1 then
  1745. PlaySound "balldrop"
  1746. rightdrop = 0
  1747. End If
  1748. StopSound "wireramp"
  1749. 'rightdrop = 0
  1750. End Sub
  1751.  
  1752. '''*****************************************************************************************
  1753. '''*freneticamnesic level nudge script, based on rascals nudge bobble with help from gtxjoe*
  1754. '''* add timers and "Nudgebobble(keycode)" to left and right tilt keys to activate *
  1755. '''*****************************************************************************************
  1756. Dim bgcharctr:bgcharctr = 2
  1757. Dim centerlocation:centerlocation = 90
  1758. Dim bgdegree:bgdegree = 7 'move +/- 7 degrees
  1759. Dim bgdurationctr:bgdurationctr = 0
  1760.  
  1761. Sub LevelT_Timer()
  1762. Dim loopctr
  1763. Level.RotAndTra7 = Level.RotAndTra7 + bgcharctr 'change rotation value by bgcharctr
  1764. 'debug.print "Degrees: " & Level.RotAndTra7 & " Max degree offset: " & bgdegree & " Cycle count: " & bgdurationctr ''debug print
  1765. If Level.RotAndTra7 >= bgdegree + centerlocation then bgcharctr = -1:bgdurationctr = bgdurationctr + 1 'if level moves past max degrees, change direction and increate durationctr
  1766. If Level.RotAndTra7 <= -bgdegree + centerlocation then bgcharctr = 1 'if level moves past min location, change direction
  1767. If bgdurationctr = 4 then bgdegree = bgdegree - 2:bgdurationctr = 0 'if level has moved back and forth 5 times, decrease amount of movement by -2 and repeat by resetting durationctr
  1768. If bgdegree <= 0 then LevelT.Enabled = False:bgdegree = 7 'if amount of movement is 0, turn off LevelT timer and reset movement back to max 7 degrees
  1769. End Sub
  1770.  
  1771.  
  1772. Sub Nudgebobble(keycode)
  1773. If keycode = LeftTiltKey then bgcharctr = -1 'if nudge left, move in - direction
  1774. If keycode = RightTiltKey then bgcharctr = 1 'if nudge left, move in + direction
  1775. If keycode = CenterTiltKey then 'if nudge center, generate random number 1 or 2. If 1 change it to -2. use this number for initial direction
  1776. Dim randombobble:randombobble = Int(2 * Rnd + 1)
  1777. If randombobble = 1 then randombobble = -2
  1778. bgcharctr = randombobble
  1779. End If
  1780. LevelT.Enabled = True:bgdurationctr = 0:bgdegree = 7
  1781. End Sub
  1782.  
  1783. Sub bobblesome_Timer() 'This looks like a free running timer that 1 out of ten times will start movement
  1784. Dim chance
  1785. chance = Int(10*Rnd+1)
  1786. If chance = 5 then Nudgebobble(CenterTiltKey)
  1787. End Sub
  1788.  
  1789. ' *********************************************************************
  1790. ' Supporting Ball & Sound Functions
  1791. ' *********************************************************************
  1792.  
  1793. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  1794. Vol = Csng(BallVel(ball) ^2 / 50)
  1795. End Function
  1796.  
  1797. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table" is the name of the table
  1798. Dim tmp
  1799. tmp = ball.x * 2 / table.width-1
  1800. If tmp > 0 Then
  1801. Pan = Csng(tmp ^10)
  1802. Else
  1803. Pan = Csng(-((- tmp) ^10) )
  1804. End If
  1805. End Function
  1806.  
  1807. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  1808. Pitch = BallVel(ball) * 20
  1809. End Function
  1810.  
  1811. Function BallVel(ball) 'Calculates the ball speed
  1812. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  1813. End Function
  1814.  
  1815. '*****************************************
  1816. ' JP's VP10 Rolling Sounds
  1817. '*****************************************
  1818.  
  1819. Const tnob = 5 ' total number of balls
  1820. ReDim rolling(tnob)
  1821. InitRolling
  1822.  
  1823. Sub InitRolling
  1824. Dim i
  1825. For i = 0 to tnob
  1826. rolling(i) = False
  1827. Next
  1828. End Sub
  1829.  
  1830. Sub RollingTimer_Timer()
  1831. Dim BOT, b
  1832. BOT = GetBalls
  1833.  
  1834. ' stop the sound of deleted balls
  1835. For b = UBound(BOT) + 1 to tnob
  1836. rolling(b) = False
  1837. StopSound("fx_ballrolling" & b)
  1838. Next
  1839.  
  1840. ' exit the sub if no balls on the table
  1841. If UBound(BOT) = -1 Then Exit Sub
  1842.  
  1843. ' play the rolling sound for each ball
  1844. For b = 0 to UBound(BOT)
  1845. If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
  1846. rolling(b) = True
  1847. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0
  1848. Else
  1849. If rolling(b) = True Then
  1850. StopSound("fx_ballrolling" & b)
  1851. rolling(b) = False
  1852. End If
  1853. End If
  1854. Next
  1855. End Sub
  1856.  
  1857. '**********************
  1858. ' Ball Collision Sound
  1859. '**********************
  1860.  
  1861. Sub OnBallBallCollision(ball1, ball2, velocity)
  1862. PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
  1863. End Sub
  1864.  
  1865.  
  1866.  
  1867. '************************************
  1868. ' What you need to add to your table
  1869. '************************************
  1870.  
  1871. ' a timer called RollingTimer. With a fast interval, like 10
  1872. ' one collision sound, in this script is called fx_collide
  1873. ' as many sound files as max number of balls, with names ending with 0, 1, 2, 3, etc
  1874. ' for ex. as used in this script: fx_ballrolling0, fx_ballrolling1, fx_ballrolling2, fx_ballrolling3, etc
  1875.  
  1876.  
  1877. '******************************************
  1878. ' Explanation of the rolling sound routine
  1879. '******************************************
  1880.  
  1881. ' sounds are played based on the ball speed and position
  1882.  
  1883. ' the routine checks first for deleted balls and stops the rolling sound.
  1884.  
  1885. ' The For loop goes through all the balls on the table and checks for the ball speed and
  1886. ' if the ball is on the table (height lower than 30) then then it plays the sound
  1887. ' otherwise the sound is stopped, like when the ball has stopped or is on a ramp or flying.
  1888.  
  1889. ' The sound is played using the VOL, PAN and PITCH functions, so the volume and pitch of the sound
  1890. ' will change according to the ball speed, and the PAN function will change the stereo position according
  1891. ' to the position of the ball on the table.
  1892.  
  1893.  
  1894. '**************************************
  1895. ' Explanation of the collision routine
  1896. '**************************************
  1897.  
  1898. ' The collision is built in VP.
  1899. ' You only need to add a Sub OnBallBallCollision(ball1, ball2, velocity) and when two balls collide they
  1900. ' will call this routine. What you add in the sub is up to you. As an example is a simple Playsound with volume and paning
  1901. ' depending of the speed of the collision.
  1902.  
  1903.  
  1904. Sub Pins_Hit (idx)
  1905. PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  1906. End Sub
  1907.  
  1908. Sub Targets_Hit (idx)
  1909. PlaySound "target", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  1910. End Sub
  1911.  
  1912. Sub Metals_Thin_Hit (idx)
  1913. PlaySound "metalhit_thin", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1914. End Sub
  1915.  
  1916. Sub Metals_Medium_Hit (idx)
  1917. PlaySound "metalhit_medium", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1918. End Sub
  1919.  
  1920. Sub Metals2_Hit (idx)
  1921. PlaySound "metalhit2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1922. End Sub
  1923.  
  1924. Sub Gates_Hit (idx)
  1925. PlaySound "gate4", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1926. End Sub
  1927.  
  1928. Sub Spinner_Spin
  1929. PlaySound "fx_spinner",0,.25,0,0.25
  1930. End Sub
  1931.  
  1932. Sub Rubbers_Hit(idx)
  1933. dim finalspeed
  1934. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1935. If finalspeed > 20 then
  1936. PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1937. End if
  1938. If finalspeed >= 6 AND finalspeed <= 20 then
  1939. RandomSoundRubber()
  1940. End If
  1941. End Sub
  1942.  
  1943. Sub Posts_Hit(idx)
  1944. dim finalspeed
  1945. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1946. If finalspeed > 16 then
  1947. PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1948. End if
  1949. If finalspeed >= 6 AND finalspeed <= 16 then
  1950. RandomSoundRubber()
  1951. End If
  1952. End Sub
  1953.  
  1954. Sub RandomSoundRubber()
  1955. Select Case Int(Rnd*3)+1
  1956. Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1957. Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1958. Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1959. End Select
  1960. End Sub
  1961.  
  1962. Sub LeftFlipper_Collide(parm)
  1963. RandomSoundFlipper()
  1964. End Sub
  1965.  
  1966. Sub RightFlipper_Collide(parm)
  1967. RandomSoundFlipper()
  1968. End Sub
  1969.  
  1970. Sub RandomSoundFlipper()
  1971. Select Case Int(Rnd*3)+1
  1972. Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1973. Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1974. Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1975. End Select
  1976. End Sub
Advertisement
Add Comment
Please, Sign In to add comment