Advertisement
Arngrim

fireball fixed dof

Nov 26th, 2016
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 53.82 KB | None | 0 0
  1. '****************************************************************************************
  2. ' FIREBALL
  3. ' Bally 1972
  4. ' version 1.1
  5. ' VPX EM Table Recreation by pinball58
  6. ' DOF by Arngrim
  7. '****************************************************************************************
  8.  
  9. Option Explicit
  10. Randomize
  11.  
  12. Const cGameName = "Fireball_1972"
  13.  
  14. Dim Zipper
  15. Dim KickIP
  16. Dim Dir
  17. Dim Strong
  18. Dim Player
  19. Dim Score(4)
  20. Dim EMR(4)
  21. Dim x
  22. Dim Odin
  23. Dim Wotan
  24. Dim Tilt
  25. Dim BarrierPos
  26. Dim Credit
  27. Dim Game
  28. Dim BallN,BallN2,BallN3,BallN4
  29. Dim Replay(4)
  30. Dim ReplayScore1(4)
  31. Dim ReplayScore2(4)
  32. Dim ReplayScore3(4)
  33. Dim TiltCount
  34. Dim MatchNum
  35. Dim Match
  36. Dim MatchP(4)
  37. Dim PlayerN
  38. Dim AllowStart
  39. Dim Init
  40. Dim BallsNTot
  41. Dim BallIP
  42. Dim PUP
  43. Dim OWBalls
  44. Dim LButton
  45. Dim RButton
  46.  
  47. On Error Resume Next
  48. ExecuteGlobal GetTextFile("controller.vbs")
  49. If Err Then MsgBox "Can't open controller.vbs"
  50. On Error Goto 0
  51.  
  52. ExecuteGlobal GetTextFile("core.vbs") : If Err Then MsgBox "Can't open ""core.vbs"""
  53.  
  54. If Fireball.ShowDT = false then
  55. EmReel1.Visible = false
  56. EMReel2.Visible = false
  57. EMReel3.Visible = false
  58. EMReel4.Visible = false
  59. P1up.Visible = false
  60. P2up.Visible = false
  61. P3up.Visible = false
  62. P4up.Visible = false
  63. CreditsOsd.Visible = false
  64. CreditCount.Visible = false
  65. PlayerOsd.Visible = false
  66. PlayerPlay.Visible = false
  67. CanPlay.Visible = false
  68. PlayerNum.Visible = false
  69. BallsOsd.Visible = false
  70. BallCount.Visible = false
  71. m0.Visible = false : m1.Visible = false : m2.Visible = false : m3.Visible = false : m4.Visible = false : m5.Visible = false : m6.Visible = false : m7.Visible = false : m8.Visible = false : m9.Visible = false
  72. TILTtb.Visible = false
  73. GameOvertb.Visible = false
  74. Light43.state=1
  75. Light44.state=1
  76. End If
  77.  
  78. '********** Table Init ***********
  79.  
  80. Sub Fireball_Init
  81. LoadEM
  82. Kicker3.CreateBall
  83. Kicker3.Kick 90, 1
  84. Replay(1) = 1 : Replay(2) = 1 : Replay(3) = 1 : Replay(4) = 1
  85. Game = 0
  86. AllowStart = 1
  87. Set EMR(1) = EMReel1
  88. Set EMR(2) = EMReel2
  89. Set EMR(3) = EMReel3
  90. Set EMR(4) = EMReel4
  91. ReplayScore1(1) = 56000 : ReplayScore2(1) = 70000 : ReplayScore3(1) = 82000
  92. ReplayScore1(2) = 56000 : ReplayScore2(2) = 70000 : ReplayScore3(2) = 82000
  93. ReplayScore1(3) = 56000 : ReplayScore2(3) = 70000 : ReplayScore3(3) = 82000
  94. ReplayScore1(4) = 56000 : ReplayScore2(4) = 70000 : ReplayScore3(4) = 82000
  95. Zipper=0
  96. BarrierPos=0
  97. OWBalls=0
  98. Wall80.IsDropped=true
  99. Wall81.IsDropped=true
  100. Wall90.IsDropped=true
  101. Wall91.IsDropped=true
  102. End Sub
  103.  
  104. '*********************************
  105.  
  106. '********** InGame Updates ***********
  107.  
  108. Sub flipperTimer_timer()
  109. FlipperL.RotY = LeftFlipper.CurrentAngle+90
  110. FlipperL1.RotY = LeftFlipper1.CurrentAngle+90
  111. FlipperR.RotY = RightFlipper.CurrentAngle+90
  112. FlipperR1.RotY = RightFlipper1.CurrentAngle+90
  113. If Zipper=0 Then FlipperL1.visible=0 : FlipperL7.visible=0 : FlipperR1.visible=0 : FlipperR7.visible=0 End If
  114. If Zipper=1 Then FlipperL.visible=0 : FlipperL8.visible=0 : FlipperR.visible=0 : FlipperR8.visible=0 End If
  115. GWL.RotZ=Gate3.CurrentAngle+15
  116. GWL1.RotZ=Gate2.CurrentAngle+15
  117. GWL3.RotZ=Gate4.CurrentAngle
  118. End Sub
  119.  
  120. Sub Trigger42_Hit
  121. GWL2.RotZ=70
  122. GateTimer.enabled=1
  123. End Sub
  124.  
  125. Sub GateTimer_timer()
  126. GWL2.RotZ=46
  127. End Sub
  128.  
  129. '**************************************
  130.  
  131. '********* Add Score & Replay ****************************************
  132.  
  133. Sub AddScore(points)
  134.  
  135. If Player = 1 Then x = 1 End If
  136. If Player = 2 Then x = 2 End If
  137. If Player = 3 Then x = 3 End If
  138. If Player = 4 Then x = 4 End If
  139.  
  140. Score(x) = Score(x) + points
  141.  
  142. EMR(x).setvalue(score(x))
  143.  
  144. If B2SOn Then
  145. Controller.B2SSetScorePlayer 1, Score(1)
  146. Controller.B2SSetScorePlayer 2, Score(2)
  147. Controller.B2SSetScorePlayer 3, Score(3)
  148. Controller.B2SSetScorePlayer 4, Score(4)
  149. End If
  150.  
  151. If points = +10 Then MatchP(x) = MatchP(x) + 10 End If
  152. If MatchP(x) = 100 Then MatchP(x) = 0 End If
  153.  
  154. If Score(x) >= ReplayScore1(x) And Replay(x) = 1 Then
  155. If Credit <25 Then
  156. Credit = Credit + 1
  157. DOF 122, DOFOn
  158. CreditCount.text= (Credit)
  159. If B2SOn Then
  160. Controller.B2SSetCredits Credit
  161. End If
  162. End If
  163. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  164. Replay(x)=2
  165. End If
  166.  
  167. If Score(x) >= (ReplayScore1(x)*2) And Replay(x) = 2 Then
  168. If Credit <25 Then
  169. Credit = Credit + 1
  170. DOF 122, DOFOn
  171. CreditCount.text= (Credit)
  172. If B2SOn Then
  173. Controller.B2SSetCredits Credit
  174. End If
  175. End If
  176. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  177. Replay(x)=3
  178. End If
  179.  
  180. If Score(x) >= (ReplayScore1(x)*3) And Replay(x) = 3 Then
  181. If Credit <25 Then
  182. Credit = Credit + 1
  183. DOF 122, DOFOn
  184. CreditCount.text= (Credit)
  185. If B2SOn Then
  186. Controller.B2SSetCredits Credit
  187. End If
  188. End If
  189. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  190. Replay(x)=4
  191. End If
  192.  
  193. If Score(x) >= (ReplayScore2(x)) And Replay(x) = 5 Then
  194. If Credit <25 Then
  195. Credit = Credit + 1
  196. DOF 122, DOFOn
  197. CreditCount.text= (Credit)
  198. If B2SOn Then
  199. Controller.B2SSetCredits Credit
  200. End If
  201. End If
  202. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  203. Replay(x)=6
  204. End If
  205.  
  206. If Score(x) >= (ReplayScore2(x)*2) And Replay(x) = 6 Then
  207. If Credit <25 Then
  208. Credit = Credit + 1
  209. DOF 122, DOFOn
  210. CreditCount.text= (Credit)
  211. If B2SOn Then
  212. Controller.B2SSetCredits Credit
  213. End If
  214. End If
  215. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  216. Replay(x)=7
  217. End If
  218.  
  219. If Score(x) >= (ReplayScore2(x)*3) And Replay(x) = 7 Then
  220. If Credit <25 Then
  221. Credit = Credit + 1
  222. DOF 122, DOFOn
  223. CreditCount.text= (Credit)
  224. If B2SOn Then
  225. Controller.B2SSetCredits Credit
  226. End If
  227. End If
  228. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  229. Replay(x)=8
  230. End If
  231.  
  232. If Score(x) >= (ReplayScore3(x)) And Replay(x) = 10 Then
  233. If Credit <25 Then
  234. Credit = Credit + 1
  235. DOF 122, DOFOn
  236. CreditCount.text= (Credit)
  237. If B2SOn Then
  238. Controller.B2SSetCredits Credit
  239. End If
  240. End If
  241. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  242. Replay(x)=11
  243. End If
  244.  
  245. If Score(x) >= (ReplayScore3(x)*2) And Replay(x) = 11 Then
  246. If Credit <25 Then
  247. Credit = Credit + 1
  248. DOF 122, DOFOn
  249. CreditCount.text= (Credit)
  250. If B2SOn Then
  251. Controller.B2SSetCredits Credit
  252. End If
  253. End If
  254. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  255. Replay(x)=12
  256. End If
  257.  
  258. If Score(x) >= (ReplayScore3(x)*3) And Replay(x) = 12 Then
  259. If Credit <25 Then
  260. Credit = Credit + 1
  261. DOF 122, DOFOn
  262. CreditCount.text= (Credit)
  263. If B2SOn Then
  264. Controller.B2SSetCredits Credit
  265. End If
  266. End If
  267. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  268. Replay(x)=0
  269. End If
  270.  
  271. '**** Bells Sound Score based ***
  272.  
  273. If points = 10 And (Score(x) MOD 100)\10 = 0 Then
  274. PlaySound SoundFXDOF("bell_100-1000",142,DOFPulse,DOFChimes),0,0.7
  275. ElseIf points = 1000 Then
  276. PlaySound SoundFXDOF("bell_100-1000",142,DOFPulse,DOFChimes),0,0.7
  277. ElseIf points = 100 Then
  278. PlaySound SoundFXDOF("bell_100-1000",142,DOFPulse,DOFChimes),0,0.7
  279. ElseIf points = 10 Then
  280. PlaySound SoundFXDOF("bell_10",141,DOFPulse,DOFChimes)
  281. End If
  282.  
  283. '*********************************
  284.  
  285. End Sub
  286.  
  287. '*******************************************************************
  288.  
  289. '********* Match **************
  290.  
  291. Sub MatchTimer_timer()
  292.  
  293. MatchNum = Int(Rnd*10)+1
  294. Select Case MatchNum
  295. Case 1 : Match = 0
  296. Case 2 : Match = 10
  297. Case 3 : Match = 20
  298. Case 4 : Match = 30
  299. Case 5 : Match = 40
  300. Case 6 : Match = 50
  301. Case 7 : Match = 60
  302. Case 8 : Match = 70
  303. Case 9 : Match = 80
  304. Case 10 : Match = 90
  305. End Select
  306.  
  307. If Match = 0 Then m0.text = "00" End If
  308. If Match = 10 Then m1.text = "10" End If
  309. If Match = 20 Then m2.text = "20" End If
  310. If Match = 30 Then m3.text = "30" End If
  311. If Match = 40 Then m4.text = "40" End If
  312. If Match = 50 Then m5.text = "50" End If
  313. If Match = 60 Then m6.text = "60" End If
  314. If Match = 70 Then m7.text = "70" End If
  315. If Match = 80 Then m8.text = "80" End If
  316. If Match = 90 Then m9.text = "90" End If
  317. If B2SOn Then
  318. If Match = 0 Then
  319. Controller.B2SSetMatch 34, 100
  320. Else
  321. Controller.B2SSetMatch 34, Match
  322. End If
  323. End If
  324. MatchTimer.enabled = 0
  325. CheckMatch
  326. P1up.text = "" : P2up.text = "" : P3up.text = "" : P4up.text = ""
  327. If B2SOn Then
  328. Controller.B2SSetPlayerUp 30, 0
  329. Controller.B2SSetData "p1",0
  330. Controller.B2SSetData "p2",0
  331. Controller.B2SSetData "p3",0
  332. Controller.B2SSetData "p4",0
  333. End If
  334.  
  335. End Sub
  336.  
  337. Sub CheckMatch
  338.  
  339. If PlayerN = 1 Then
  340. If Match = MatchP(1) Then
  341. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  342. If Credit<25 Then
  343. Credit = Credit+1
  344. DOF 122, DOFOn
  345. CreditCount.text = (Credit)
  346. If B2SOn Then
  347. Controller.B2SSetCredits Credit
  348. End If
  349. End If
  350. End If
  351. GameOverTimer.enabled = 1
  352. PlayerN = 0
  353. Player = 0
  354. Init= 0
  355. End If
  356.  
  357. If PlayerN = 2 Then
  358. If Match = MatchP(1) Then
  359. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  360. If Credit<25 Then
  361. Credit = Credit+1
  362. DOF 122, DOFOn
  363. CreditCount.text = (Credit)
  364. If B2SOn Then
  365. Controller.B2SSetCredits Credit
  366. End If
  367. End If
  368. End If
  369. MatchTimer2.enabled = 1
  370. End If
  371.  
  372. If PlayerN = 3 Then
  373. If Match = MatchP(1) Then
  374. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  375. If Credit<25 Then
  376. Credit = Credit+1
  377. DOF 122, DOFOn
  378. CreditCount.text = (Credit)
  379. If B2SOn Then
  380. Controller.B2SSetCredits Credit
  381. End If
  382. End If
  383. End If
  384. MatchTimer2.enabled = 1
  385. MatchTimer3.enabled = 1
  386. End If
  387.  
  388. If PlayerN = 4 Then
  389. If Match = MatchP(1) Then
  390. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  391. If Credit<25 Then
  392. Credit = Credit+1
  393. DOF 122, DOFOn
  394. CreditCount.text = (Credit)
  395. If B2SOn Then
  396. Controller.B2SSetCredits Credit
  397. End If
  398. End If
  399. End If
  400. MatchTimer2.enabled = 1
  401. MatchTimer3.enabled = 1
  402. MatchTimer4.enabled = 1
  403. End If
  404.  
  405. End Sub
  406.  
  407. Sub MatchTimer2_timer()
  408. If Match = MatchP(2) Then
  409. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  410. If Credit<25 Then
  411. Credit = Credit+1
  412. DOF 122, DOFOn
  413. CreditCount.text = (Credit)
  414. If B2SOn Then
  415. Controller.B2SSetCredits Credit
  416. End If
  417. End If
  418. End If
  419. MatchTimer2.enabled = 0
  420. If PlayerN = 2 Then
  421. GameOverTimer.enabled = 1
  422. PlayerN = 0
  423. Player = 0
  424. Init= 0
  425. End If
  426. End Sub
  427.  
  428. Sub MatchTimer3_timer()
  429. If Match = MatchP(3) Then
  430. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  431. If Credit<25 Then
  432. Credit = Credit+1
  433. DOF 122, DOFOn
  434. CreditCount.text = (Credit)
  435. If B2SOn Then
  436. Controller.B2SSetCredits Credit
  437. End If
  438. End If
  439. End If
  440. MatchTimer3.enabled = 0
  441. If PlayerN = 3 Then
  442. GameOverTimer.enabled = 1
  443. PlayerN = 0
  444. Player = 0
  445. Init= 0
  446. End If
  447. End Sub
  448.  
  449. Sub MatchTimer4_timer()
  450. If Match = MatchP(4) Then
  451. PlaySound SoundFXDOF("knocker",109,DOFPulse,DOFKnocker)
  452. If Credit<25 Then
  453. Credit = Credit+1
  454. DOF 122, DOFOn
  455. CreditCount.text = (Credit)
  456. If B2SOn Then
  457. Controller.B2SSetCredits Credit
  458. End If
  459. End If
  460. End If
  461. MatchTimer4.enabled = 0
  462. GameOverTimer.enabled = 1
  463. PlayerN = 0
  464. Player = 0
  465. Init= 0
  466. End Sub
  467.  
  468. '******************************
  469.  
  470. '********* Table Keys **********
  471.  
  472. Sub Fireball_KeyDown(ByVal keycode)
  473.  
  474. If keycode = AddCreditKey And Credit<25 Then
  475. PlaySound "CoinIn"
  476. Credit = Credit+1
  477. DOF 122, DOFOn
  478. CreditCount.text= (Credit)
  479. If B2SOn Then
  480. Controller.B2SSetCredits Credit
  481. End If
  482. End If
  483. If keycode = AddCreditKey And Credit >=25 Then
  484. PlaySound "CoinIn"
  485. End If
  486.  
  487. If keycode = StartGameKey And Credit>0 And PlayerN <4 And AllowStart = 1 Then
  488. PlayerN = PlayerN + 1
  489. Credit = Credit-1
  490. If Credit < 1 Then DOF 122, DOFOff
  491. Init = Init + 1
  492. If Init = 1 Then
  493. FirstStartTimer.enabled = 1
  494. StartupTimer.enabled = 1
  495. SpinDisc.enabled=1
  496. DiscNoise.enabled=1
  497. DiscNoise2.enabled=1
  498. End If
  499. PlaySound "start"
  500. CreditCount.text= (Credit)
  501. Game = 1
  502. BallN= 5
  503. BallN2= 5
  504. BallN3= 5
  505. BallN4= 5
  506. If PlayerN = 1 Then
  507. BallsNTot = 5
  508. If Fireball.ShowDT = true Then
  509. EMReel2.visible = false
  510. EMReel3.visible = false
  511. EMReel4.visible = false
  512. End If
  513. If B2SOn Then
  514. Controller.B2SSetData "p1",1
  515. Controller.B2SSetData "p2",0
  516. Controller.B2SSetData "p3",0
  517. Controller.B2SSetData "p4",0
  518. End If
  519. End If
  520. If PlayerN = 2 Then
  521. BallsNTot = 10
  522. If Fireball.ShowDT = true then
  523. EMReel2.visible = true
  524. EMReel3.visible = false
  525. EMReel4.visible = false
  526. End If
  527. If B2SOn Then
  528. Controller.B2SSetData "p1",1
  529. Controller.B2SSetData "p2",1
  530. Controller.B2SSetData "p3",0
  531. Controller.B2SSetData "p4",0
  532. End If
  533. End If
  534. If PlayerN = 3 Then
  535. BallsNTot = 15
  536. If Fireball.ShowDT = true then
  537. EMReel2.visible = true
  538. EMReel3.visible = true
  539. EMReel4.visible = false
  540. End If
  541. If B2SOn Then
  542. Controller.B2SSetData "p1",1
  543. Controller.B2SSetData "p2",1
  544. Controller.B2SSetData "p3",1
  545. Controller.B2SSetData "p4",0
  546. End If
  547. End If
  548. If PlayerN = 4 Then
  549. BallsNTot = 20
  550. If Fireball.ShowDT = true then
  551. EMReel2.visible = true
  552. EMReel3.visible = true
  553. EMReel4.visible = true
  554. End If
  555. If B2SOn Then
  556. Controller.B2SSetData "p1",1
  557. Controller.B2SSetData "p2",1
  558. Controller.B2SSetData "p3",1
  559. Controller.B2SSetData "p4",1
  560. End If
  561. End If
  562. m0.text = "" : m1.text = "" : m2.text = "" : m3.text = "" : m4.text = "" : m5.text = "" : m6.text = "" : m7.text = "" : m8.text = "" : m9.text = ""
  563. MatchP(1) = 0
  564. MatchP(2) = 0
  565. MatchP(3) = 0
  566. MatchP(4) = 0
  567. If Replay(1) >1 Or Replay(2) >1 Or Replay(3) >1 Or Replay(4) >1 Then
  568. Replay(1) = 5 : Replay(2) = 5 : Replay(3) = 5 : Replay(4) = 5
  569. End If
  570. If Replay(1) >5 Or Replay(2) >5 Or Replay(3) >5 Or Replay(4) >5 Then
  571. Replay(1) = 10 : Replay(2) = 10 : Replay(3) = 10 : Replay(4) = 10
  572. End If
  573. GameOvertb.text = ""
  574. Tilttb.text= ""
  575. PlayerNum.text = (PlayerN)
  576. If Player = 0 Then
  577. PlayerPlay.text = ""
  578. Else
  579. PlayerPlay.text = (Player)
  580. End If
  581. If B2SOn Then
  582. Controller.B2SSetCredits Credit
  583. Controller.B2SSetCanPlay 31, PlayerN
  584. Controller.B2SSetGameOver 0
  585. Controller.B2SSetMatch 34,0
  586. End If
  587. End If
  588.  
  589. If keycode = PlungerKey Then
  590. Plunger.PullBack
  591. PlaySound "plungerpull"
  592. End If
  593.  
  594. If keycode = LeftFlipperKey And Game = 1 And Tilt = False Then
  595. LeftFlipper.RotateToEnd
  596. LeftFlipper1.RotateToEnd
  597. PlaySound SoundFXDOF("fx_flipperup",101,DOFOn,DOFContactors), 0, 1, -0.05, 0.05
  598. PlaySound "buzz",-1,0.3,-1
  599. If Zipper=0 Then FlipLAn.enabled=1 End If
  600. If Zipper=1 Then FlipL1An.enabled=1 End If
  601. LButton=1
  602. End If
  603.  
  604. If keycode = RightFlipperKey And Game = 1 And Tilt = False Then
  605. RightFlipper.RotateToEnd
  606. RightFlipper1.RotateToEnd
  607. PlaySound SoundFXDOF("fx_flipperup",102,DOFOn,DOFContactors), 0, 1, 0.05, 0.05
  608. PlaySound "buzz1",-1,0.3,1
  609. If Zipper=0 Then FlipRAn.enabled=1 End If
  610. If Zipper=1 Then FlipR1An.enabled=1 End If
  611. RButton=1
  612. End If
  613.  
  614. If keycode = LeftTiltKey Then
  615. Nudge 90, 2
  616. Playsound SoundFX("fx_nudge",0)
  617. CheckTilt
  618. End If
  619.  
  620. If keycode = RightTiltKey Then
  621. Nudge 270, 2
  622. Playsound SoundFX("fx_nudge",0)
  623. CheckTilt
  624. End If
  625.  
  626. If keycode = CenterTiltKey Then
  627. Nudge 0, 2
  628. Playsound SoundFX("fx_nudge",0)
  629. CheckTilt
  630. End If
  631.  
  632. End Sub
  633.  
  634. Sub Fireball_KeyUp(ByVal keycode)
  635.  
  636. If keycode = PlungerKey Then
  637. Plunger.Fire
  638. PlaySound "plung"
  639. End If
  640.  
  641. If keycode = LeftFlipperKey And Game = 1 And Tilt = False Then
  642. LeftFlipper.RotateToStart
  643. LeftFlipper1.RotateToStart
  644. PlaySound "fx_flipperdown", 0, 1, -0.05, 0.05
  645. StopSound "buzz"
  646. If Tilt = true Then
  647. FlipOff
  648. End If
  649. LButton=0
  650. End If
  651.  
  652. If keycode = RightFlipperKey And Game = 1 And Tilt = False Then
  653. RightFlipper.RotateToStart
  654. RightFlipper1.RotateToStart
  655. PlaySound "fx_flipperdown", 0, 1, 0.05, 0.05
  656. StopSound "buzz1"
  657. If Tilt = true Then
  658. FlipOff
  659. End If
  660. RButton=0
  661. End If
  662.  
  663. End Sub
  664.  
  665. '****************************
  666.  
  667. '******** Drain *************
  668.  
  669. Sub Drain_Hit()
  670. DOF 120, DOFPulse
  671. If Player = 1 Then BallN = BallN -1 End If
  672. If Player = 2 Then BallN2 = BallN2 -1 End If
  673. If Player = 3 Then BallN3 = BallN3 -1 End If
  674. If Player = 4 Then BallN4 = BallN4 -1 End If
  675. BallsNTot = BallsNTot - 1
  676. Dim DrainSound
  677. DrainSound = Int(rnd*2)+1
  678. Select Case DrainSound
  679. Case 1: PlaySound "drain1"
  680. Case 2: PlaySound "drain2"
  681. End Select
  682. Drain.DestroyBall
  683. AllowStart = 0
  684.  
  685. If BallsNTot = 0 Then
  686. MatchTimer.enabled=1
  687. CallFlipOff.enabled=1
  688. Game = 0.5
  689. BrakeDisc.enabled=1
  690. BlinkingOff.enabled=1
  691. End If
  692.  
  693. If BallsNtot >0 Then
  694. NewBall.enabled=1
  695. NewBallSound.enabled=1
  696. End If
  697.  
  698. End Sub
  699.  
  700. Sub OWDrain_Hit()
  701. Dim DrainSound
  702. DrainSound = Int(rnd*2)+1
  703. Select Case DrainSound
  704. Case 1: PlaySound "drain1"
  705. Case 2: PlaySound "drain2"
  706. End Select
  707. OWDrain.Destroyball
  708. OWBalls=OwBalls-1
  709. If OWBalls=0 Then
  710. OWDrain.enabled=0
  711. End If
  712. End Sub
  713.  
  714. Sub BlinkingOff_timer()
  715. BlinkingSC.enabled=0 : BlinkingSC1.enabled=0 : BlinkingSC2.enabled=0 : BlinkingSC3.enabled=0 : BlinkingSC4.enabled=0
  716. BlinkingOff.enabled=0
  717. End Sub
  718.  
  719. '***************************
  720.  
  721. '****** Stop SpinDisc ***************
  722.  
  723. Sub BrakeDisc_timer()
  724. SpinDisc.enabled=0
  725. Disc.RotY = Disc.RotY+4
  726. CallBrakeDisc2.enabled=1
  727. End Sub
  728.  
  729. Sub CallBrakeDisc2_timer()
  730. BrakeDisc2.enabled=1
  731. CallBrakeDisc2.enabled=0
  732. End Sub
  733.  
  734. Sub BrakeDisc2_timer()
  735. BrakeDisc.enabled=0
  736. Disc.RotY = Disc.RotY+3
  737. CallBrakeDisc3.enabled=1
  738. End Sub
  739.  
  740. Sub CallBrakeDisc3_timer()
  741. BrakeDisc3.enabled=1
  742. CallBrakeDisc3.enabled=0
  743. End Sub
  744.  
  745. Sub BrakeDisc3_timer()
  746. BrakeDisc2.enabled=0
  747. Disc.RotY = Disc.RotY+2
  748. StopSound "disc_noise"
  749. CallBrakeDisc4.enabled=1
  750. End Sub
  751.  
  752. Sub CallBrakeDisc4_timer()
  753. BrakeDisc4.enabled=1
  754. CallBrakeDisc4.enabled=0
  755. End Sub
  756.  
  757. Sub BrakeDisc4_timer()
  758. BrakeDisc3.enabled=0
  759. Disc.RotY = Disc.RotY+1
  760. CallStopDisc.enabled=1
  761. End Sub
  762.  
  763. Sub CallStopDisc_timer()
  764. StopDisc.enabled=1
  765. CallStopDisc.enabled=0
  766. End Sub
  767.  
  768. Sub StopDisc_timer()
  769. BrakeDisc4.enabled=0
  770. StopSound "disc_noise2"
  771. StopDisc.enabled=0
  772. End Sub
  773.  
  774. '*************************************
  775.  
  776. '*************** Start & Drain Sequential Events *******************
  777.  
  778. Sub FirstStartTimer_timer()
  779. PlaySound "fire_init"
  780. If Odin=1 Then BlinkingOn.enabled=1 End If
  781. If B2SOn Then
  782. Controller.B2SStartAnimation "bally1"
  783. Controller.B2SStartAnimation "bally2"
  784. End If
  785. FirstStartTimer.enabled = 0
  786. End Sub
  787.  
  788. Sub BlinkingOn_timer()
  789. BlinkingSC.enabled=1
  790. BlinkingOn.enabled=0
  791. End Sub
  792.  
  793. Sub StartupTimer_timer()
  794. EMR(1).ResetToZero()
  795. EMR(2).ResetToZero()
  796. EMR(3).ResetToZero()
  797. EMR(4).ResetToZero()
  798. Score(1) = 0
  799. Score(2) = 0
  800. Score(3) = 0
  801. Score(4) = 0
  802. If B2SOn Then
  803. Controller.B2SSetScorePlayer 1, Score(1)
  804. Controller.B2SSetScorePlayer 2, Score(2)
  805. Controller.B2SSetScorePlayer 3, Score(3)
  806. Controller.B2SSetScorePlayer 4, Score(4)
  807. End If
  808. StartupTimer.enabled = 0
  809. NewBall.enabled = 1
  810. NewBallSound.enabled = 1
  811. End Sub
  812.  
  813. Sub NewBallSound_timer()
  814. PlaySound SoundFXDOF("release2",110,DOFPulse,DOFContactors),0,1,0,0.25
  815. NewBallSound.enabled=0
  816. End Sub
  817.  
  818. Sub NewBall_timer()
  819. BallRelease.CreateBall
  820. BallRelease.Kick 80, 12
  821. DOF 110, DOFPulse
  822. Light23.state=0
  823. Kicker4.enabled=0
  824. Light29.state=0 : Light30.state=0 : Light31.state=0
  825. Light33.state=0 : Light36.state=0 : Light39.state=0 : Light32.state=0 : Light35.state=0 : Light38.state=0
  826. If BarrierPos=1 Then BarrierC.enabled=1 End If
  827. Wall78.IsDropped=false
  828. Wall79.IsDropped=true
  829. Wall90.IsDropped=true
  830. Wall91.IsDropped=true
  831. If Zipper=1 Then
  832. CallZipDOF.enabled=1
  833. If LButton=0 Then
  834. UnZipTimerL.enabled=1
  835. End If
  836. If LButton=1 Then
  837. UnZipTimerCL.enabled=1
  838. End If
  839. If RButton=0 Then
  840. UnZipTimerR.enabled=1
  841. End If
  842. If RButton=1 Then
  843. UnZipTimerCR.enabled=1
  844. End If
  845. LeftFlipper1.enabled=0 : RightFlipper1.enabled=0 : LeftFlipper.enabled=1 : RightFlipper.enabled=1
  846. End If
  847. Bumper1.force = 6
  848. Bumper2.force = 6
  849. Bumper3.force = 6
  850. Tilt = false
  851. Tilttb.text = ""
  852. If B2SOn Then
  853. Controller.B2SSetTilt 33,0
  854. End If
  855. If PlayerN = 1 Or Player=PlayerN Then
  856. Player = 1
  857. Else
  858. Player = Player + 1
  859. End If
  860. PlayerPlay.text = (Player)
  861. If Player = 1 And BallN = 5 Then BallIP = 1 : P1up.text = "1UP" : P2up.text = "" : P3up.text = "" : P4up.text = "" : PUP = 1 End If
  862. If Player = 1 And BallN = 4 Then BallIP = 2 : P1up.text = "1UP" : P2up.text = "" : P3up.text = "" : P4up.text = "" : PUP = 1 End If
  863. If Player = 1 And BallN = 3 Then BallIP = 3 : P1up.text = "1UP" : P2up.text = "" : P3up.text = "" : P4up.text = "" : PUP = 1 End If
  864. If Player = 1 And BallN = 2 Then BallIP = 4 : P1up.text = "1UP" : P2up.text = "" : P3up.text = "" : P4up.text = "" : PUP = 1 End If
  865. If Player = 1 And BallN = 1 Then BallIP = 5 : P1up.text = "1UP" : P2up.text = "" : P3up.text = "" : P4up.text = "" : PUP = 1 End If
  866. If Player = 2 And BallN2 = 5 Then BallIP = 1 : P2up.text = "2UP" : P1up.text = "" : P3up.text = "" : P4up.text = "" : PUP = 2 End If
  867. If Player = 2 And BallN2 = 4 Then BallIP = 2 : P2up.text = "2UP" : P1up.text = "" : P3up.text = "" : P4up.text = "" : PUP = 2 End If
  868. If Player = 2 And BallN2 = 3 Then BallIP = 3 : P2up.text = "2UP" : P1up.text = "" : P3up.text = "" : P4up.text = "" : PUP = 2 End If
  869. If Player = 2 And BallN2 = 2 Then BallIP = 4 : P2up.text = "2UP" : P1up.text = "" : P3up.text = "" : P4up.text = "" : PUP = 2 End If
  870. If Player = 2 And BallN2 = 1 Then BallIP = 5 : P2up.text = "2UP" : P1up.text = "" : P3up.text = "" : P4up.text = "" : PUP = 2 End If
  871. If Player = 3 And BallN3 = 5 Then BallIP = 1 : P3up.text = "3UP" : P1up.text = "" : P2up.text = "" : P4up.text = "" : PUP = 3 End If
  872. If Player = 3 And BallN3 = 4 Then BallIP = 2 : P3up.text = "3UP" : P1up.text = "" : P2up.text = "" : P4up.text = "" : PUP = 3 End If
  873. If Player = 3 And BallN3 = 3 Then BallIP = 3 : P3up.text = "3UP" : P1up.text = "" : P2up.text = "" : P4up.text = "" : PUP = 3 End If
  874. If Player = 3 And BallN3 = 2 Then BallIP = 4 : P3up.text = "3UP" : P1up.text = "" : P2up.text = "" : P4up.text = "" : PUP = 3 End If
  875. If Player = 3 And BallN3 = 1 Then BallIP = 5 : P3up.text = "3UP" : P1up.text = "" : P2up.text = "" : P4up.text = "" : PUP = 3 End If
  876. If Player = 4 And BallN4 = 5 Then BallIP = 1 : P4up.text = "4UP" : P1up.text = "" : P2up.text = "" : P3up.text = "" : PUP = 4 End If
  877. If Player = 4 And BallN4 = 4 Then BallIP = 2 : P4up.text = "4UP" : P1up.text = "" : P2up.text = "" : P3up.text = "" : PUP = 4 End If
  878. If Player = 4 And BallN4 = 3 Then BallIP = 3 : P4up.text = "4UP" : P1up.text = "" : P2up.text = "" : P3up.text = "" : PUP = 4 End If
  879. If Player = 4 And BallN4 = 2 Then BallIP = 4 : P4up.text = "4UP" : P1up.text = "" : P2up.text = "" : P3up.text = "" : PUP = 4 End If
  880. If Player = 4 And BallN4 = 1 Then BallIP = 5 : P4up.text = "4UP" : P1up.text = "" : P2up.text = "" : P3up.text = "" : PUP = 4 End If
  881. BallCount.text = (BallIP)
  882. If B2SOn Then
  883. Controller.B2SSetPlayerUp 30, PUP
  884. Controller.B2SSetBallinPlay 32, BallIP
  885. End If
  886. NewBall.enabled=0
  887. End Sub
  888.  
  889. Sub GameOverTimer_timer()
  890. GameOvertb.text = "GAME OVER"
  891. Game = 0
  892. AllowStart = 1
  893. If B2SOn Then
  894. Controller.B2SSetGameOver 35,1
  895. End If
  896. PlaySound "gameover"
  897. If B2SOn Then
  898. Controller.B2SStopAnimation "bally1"
  899. Controller.B2SStopAnimation "bally2"
  900. Controller.B2SSetData "ly",1
  901. Controller.B2SSetData "ba",1
  902. End If
  903. GameOverTimer.enabled = 0
  904. End Sub
  905.  
  906. '****************************************************************************
  907.  
  908. '************ Tilt **********************************
  909.  
  910. Sub TiltTimer_Timer()
  911. TiltTimer.Enabled = False
  912. End Sub
  913.  
  914. Sub CheckTilt
  915. If TiltTimer.Enabled = True And Game = 1 Then
  916. TiltCount = TiltCount + 1
  917. If TiltCount = 3 Then
  918. Bumper1.force = 0
  919. Bumper2.force = 0
  920. Bumper3.force = 0
  921. Tilt = True
  922. PlaySound "tilt"
  923. FlipOff
  924. Tilttb.text= "TILT"
  925. Wall90.IsDropped=false
  926. Wall91.IsDropped=false
  927. If B2SOn Then
  928. Controller.B2SSetTilt 33,1
  929. End If
  930. End If
  931. Else
  932. TiltCount = 0
  933. TiltTimer.Enabled = True
  934. End If
  935. End Sub
  936.  
  937. Sub FlipOff
  938. If Zipper=0 Then
  939. LeftFlipper.rotatetostart
  940. RightFlipper.rotatetostart
  941. End If
  942. If Zipper=1 Then
  943. CallZipDOF.enabled=1
  944. LeftFlipper1.rotatetostart
  945. RightFlipper1.rotatetostart
  946. UnZipTimerL.enabled=1
  947. UnZipTimerR.enabled=1
  948. LeftFlipper1.enabled=0 : RightFlipper1.enabled=0 : LeftFlipper.enabled=1 : RightFlipper.enabled=1
  949. LeftFlipper.rotatetostart
  950. RightFlipper.rotatetostart
  951. End If
  952. StopSound "buzz"
  953. StopSound "buzz1"
  954. StopSound "fldown"
  955. End Sub
  956.  
  957. '****************************************************
  958.  
  959. '******* Spinning Disc *********
  960.  
  961. Sub SpinDisc_timer()
  962. Disc.RotY = Disc.RotY+5
  963. End Sub
  964.  
  965. Sub DiscNoise_timer()
  966. Playsound "disc_noise" ,-1,0.005
  967. DiscNoise.enabled=0
  968. End Sub
  969.  
  970. Sub DiscNoise2_timer()
  971. Playsound "disc_noise2" ,-1,0.005
  972. DiscNoise2.enabled=0
  973. End Sub
  974.  
  975. Dim mTrigger
  976.  
  977. Set mTrigger = New cvpmMagnet
  978. With mTrigger
  979. .InitMagnet Trigger29, 13
  980. .GrabCenter = 0
  981. .MagnetOn = 1
  982. .CreateEvents "mTrigger"
  983. End With
  984.  
  985. Sub Trigger20_Hit
  986. mTrigger.MagnetOn = 0
  987. MBAntiGrab.enabled = 1
  988. End Sub
  989.  
  990. Sub MBAntiGrab_timer()
  991. mTrigger.MagnetOn = 0
  992. MBAntiGrab.enabled = 0
  993. End Sub
  994.  
  995. Sub DiscTriggers_Hit(index)
  996. Dim mStrong
  997. mTrigger.MagnetOn = 1
  998. mStrong = Int(rnd*8)+1
  999. Select Case mStrong
  1000. Case 1: mTrigger.InitMagnet GrabM, 9
  1001. Case 2: mTrigger.InitMagnet GrabM, 8
  1002. Case 3: mTrigger.InitMagnet GrabM, 7
  1003. Case 4: mTrigger.InitMagnet GrabM, 6
  1004. Case 5: mTrigger.InitMagnet GrabM, 5
  1005. Case 6: mTrigger.InitMagnet GrabM, 10
  1006. Case 7: mTrigger.InitMagnet GrabM, 4
  1007. Case 8: mTrigger.InitMagnet GrabM, 3
  1008. End Select
  1009. End Sub
  1010.  
  1011. Sub Trigger34_Hit
  1012. PlaySound "disc_roll",1
  1013. End Sub
  1014.  
  1015. Sub Trigger35_Hit
  1016. StopSound "disc_roll"
  1017. End Sub
  1018.  
  1019. Sub Trigger36_Hit
  1020. Dim DiscHop
  1021. DiscHop = Int(rnd*2)+1
  1022. Select Case DiscHop
  1023. Case 1: PlaySound "hop1",0,0.5
  1024. Case 2: PlaySound "hop2",0,0.5
  1025. End Select
  1026. End Sub
  1027.  
  1028. Sub Trigger37_Hit
  1029. StopSound "disc_roll"
  1030. End Sub
  1031.  
  1032. '********************************
  1033.  
  1034. '******* Hit, Events and Sounds ************
  1035.  
  1036. Sub Trigger19_Hit
  1037. If Tilt=false Then AddScore (100) End If
  1038. End Sub
  1039.  
  1040. Sub Trigger16_Hit
  1041. If Tilt=false Then AddScore (1000) End If
  1042. End Sub
  1043.  
  1044. Sub Trigger17_Hit
  1045. Light32.state=1
  1046. Light35.state=1
  1047. Light38.state=1
  1048. Light33.state=1
  1049. Light36.state=1
  1050. Light39.state=1
  1051. If Tilt=false Then AddScore (1000) End If
  1052. End Sub
  1053.  
  1054. Sub Trigger18_Hit
  1055. If Tilt=false Then AddScore (1000) End If
  1056. End Sub
  1057.  
  1058. Sub Trigger13_Hit
  1059. If Tilt=false Then
  1060. If Light31.state=0 Then
  1061. AddScore (100)
  1062. End If
  1063. If Light31.state=1 Then
  1064. AddScore (1000)
  1065. End If
  1066. End If
  1067. End Sub
  1068.  
  1069. Sub Trigger12_Hit
  1070. If Tilt=false Then
  1071. If Light30.state=0 Then
  1072. AddScore (100)
  1073. End If
  1074. If Light30.state=1 Then
  1075. AddScore (1000)
  1076. End If
  1077. End If
  1078. End Sub
  1079.  
  1080. Sub Trigger11_Hit
  1081. If Tilt=false Then
  1082. If Light29.state=0 Then
  1083. AddScore (100)
  1084. End If
  1085. If Light29.state=1 Then
  1086. AddScore (1000)
  1087. End If
  1088. End If
  1089. If Wall78.IsDropped=true Then Trigger40.enabled=1 End If
  1090. End Sub
  1091.  
  1092. Sub Trigger40_Hit
  1093. If BarrierPos=1 Then
  1094. BarrierC.enabled=1
  1095. Wall78.IsDropped=false
  1096. Wall79.IsDropped=true
  1097. End If
  1098. End Sub
  1099.  
  1100. Sub Trigger40_UnHit
  1101. Trigger40.enabled=0
  1102. End Sub
  1103.  
  1104. Sub Trigger43_Hit
  1105. DOF 121, DOFPulse
  1106. End Sub
  1107.  
  1108. Sub Trigger14_Hit
  1109. If Tilt=false Then AddScore (100) End If
  1110. End Sub
  1111.  
  1112. Sub Trigger15_Hit
  1113. If Tilt=false Then AddScore (1000) End If
  1114. End Sub
  1115.  
  1116. Sub Trigger9_Hit
  1117. DOF 117, DOFPulse
  1118. If Tilt=false Then AddScore (1000) End If
  1119. If Tilt=true Then Kicker4.enabled=0 End If
  1120. End Sub
  1121.  
  1122. Sub Trigger10_Hit
  1123. DOF 118, DOFPulse
  1124. If Tilt=false Then AddScore (1000) End If
  1125. End Sub
  1126.  
  1127. Sub Target1_Hit
  1128. DOF 108, DOFPulse
  1129. If Tilt=false Then
  1130. AddScore (1000)
  1131. If Odin=1 Then OdinKick.enabled=1 End If
  1132. If Wotan=1 Then WotanKick.enabled=1 End If
  1133. If BarrierPos=0 Then
  1134. Barrier.enabled=1
  1135. Wall78.IsDropped=true
  1136. Wall79.IsDropped=false
  1137. End If
  1138. End If
  1139. End Sub
  1140.  
  1141. Sub Barrier_timer()
  1142. Primitive15.RotY = Primitive15.RotY-10
  1143. If Primitive15.RotY=100 Then Barrier.enabled=0 : Primitive15.RotY=100 : PlaySound "barrier_click",0,1,1 End If
  1144. BarrierPos=1
  1145. End Sub
  1146.  
  1147. Sub BarrierC_timer()
  1148. Primitive15.RotY = Primitive15.RotY+10
  1149. If Primitive15.RotY=140 Then BarrierC.enabled=0 : Primitive15.RotY=140 : PlaySound "barrier_click",0,1,1 End If
  1150. BarrierPos=0
  1151. End Sub
  1152.  
  1153. Sub Kicker1_Hit
  1154. PlaySound "kicker_enter_center", 0, 0.3
  1155. If OWBalls=0 Then ReleaseTimer.enabled=1 End If
  1156. If OWBalls>0 Then
  1157. OwBalls=OWBalls-1
  1158. CheckOWBalls
  1159. End If
  1160. BlinkingSC.enabled=1
  1161. Odin=1
  1162. End Sub
  1163.  
  1164. Sub ReleaseTimer_timer()
  1165. PlaySound SoundFX("ballrelease",110,DOFPulse,DOFContactors),0,1,0,0.25
  1166. BallRelease.CreateBall
  1167. BallRelease.Kick 80, 12
  1168. ReleaseTimer.enabled=0
  1169. End Sub
  1170.  
  1171. Sub CheckOWBalls
  1172. If OWBalls=0 Then OWDrain.enabled=0 End If
  1173. End Sub
  1174.  
  1175. Sub BlinkingSC_timer()
  1176. Light28.state=0
  1177. Light27.state=0
  1178. Light26.state=0
  1179. Light25.state=0
  1180. Light24.state=1
  1181. BlinkingSC1.enabled=1
  1182. BlinkingSC.enabled=0
  1183. End Sub
  1184.  
  1185. Sub BlinkingSC1_timer()
  1186. Light24.state=0
  1187. Light25.state=1
  1188. BlinkingSC2.enabled=1
  1189. BlinkingSC1.enabled=0
  1190. End Sub
  1191.  
  1192. Sub BlinkingSC2_timer()
  1193. Light25.state=0
  1194. Light26.state=1
  1195. BlinkingSC3.enabled=1
  1196. BlinkingSC2.enabled=0
  1197. End Sub
  1198.  
  1199. Sub BlinkingSC3_timer()
  1200. Light26.state=0
  1201. Light27.state=1
  1202. BlinkingSC4.enabled=1
  1203. BlinkingSC3.enabled=0
  1204. End Sub
  1205.  
  1206. Sub BlinkingSC4_timer()
  1207. Light27.state=0
  1208. Light28.state=1
  1209. BlinkingSC.enabled=1
  1210. BlinkingSC4.enabled=0
  1211. End Sub
  1212.  
  1213. Sub Kicker1_UnHit
  1214. PlaySound "popper_ball",0,.75,0,0.25
  1215. End Sub
  1216.  
  1217. Sub Kicker2_Hit
  1218. PlaySound "kicker_enter_center", 0,0.3
  1219. If OWBalls=0 Then ReleaseTimer.enabled=1 End If
  1220. If OWBalls>0 Then
  1221. OWBalls=OwBalls-1
  1222. CheckOWballs
  1223. End If
  1224. Wotan=1
  1225. End Sub
  1226.  
  1227. Sub Kicker2_UnHit
  1228. PlaySound "popper_ball",0,.75,0,0.25
  1229. End Sub
  1230.  
  1231. Sub TrigMushL_Hit
  1232. DOF 114, DOFPulse
  1233. Dim MushLSound
  1234. MushLSound = Int(rnd*3)+1
  1235. Select Case MushLSound
  1236. Case 1: PlaySound "flip_hit_1"
  1237. Case 2: PlaySound "flip_hit_2"
  1238. Case 2: PlaySound "flip_hit_3"
  1239. End Select
  1240. If Tilt=false Then
  1241. If Zipper=1 Then
  1242. CallZipDOF.enabled=1
  1243. If LButton=0 Then
  1244. UnZipTimerL.enabled=1
  1245. End If
  1246. If LButton=1 Then
  1247. UnZipTimerCL.enabled=1
  1248. End If
  1249. If RButton=0 Then
  1250. UnZipTimerR.enabled=1
  1251. End If
  1252. If RButton=1 Then
  1253. UnZipTimerCR.enabled=1
  1254. End If
  1255. LeftFlipper1.enabled=0 : RightFlipper1.enabled=0 : LeftFlipper.enabled=1 : RightFlipper.enabled=1
  1256. End If
  1257. TmushL.TransZ = 6
  1258. me.timerenabled = 1
  1259. If Wotan = 1 Then WotanKick.enabled=1 End If
  1260. AddScore (100)
  1261. Light31.state=1
  1262. End If
  1263. End Sub
  1264.  
  1265. Sub TrigMushL_timer()
  1266. TmushL.TransZ = -6
  1267. me.timerenabled = 0
  1268. End Sub
  1269.  
  1270. Sub TrigMushC_Hit
  1271. DOF 115, DOFPulse
  1272. Dim MushCSound
  1273. MushCSound = Int(rnd*3)+1
  1274. Select Case MushCSound
  1275. Case 1: PlaySound "flip_hit_1"
  1276. Case 2: PlaySound "flip_hit_2"
  1277. Case 2: PlaySound "flip_hit_3"
  1278. End Select
  1279. If Tilt=false Then
  1280. If Zipper=0 Then
  1281. CallZipDOF.enabled=1
  1282. If LButton=0 Then
  1283. ZipTimerL.enabled=1
  1284. End If
  1285. If LButton=1 Then
  1286. ZipTimerCL.enabled=1
  1287. End If
  1288. If RButton=0 Then
  1289. ZipTimerR.enabled=1
  1290. End If
  1291. If RButton=1 Then
  1292. ZipTimerCR.enabled=1
  1293. End If
  1294. LeftFlipper1.enabled=1 : RightFlipper1.enabled=1 : LeftFlipper.enabled=0 : RightFlipper.enabled=0
  1295. End If
  1296. TmushC.TransZ = 6
  1297. me.timerenabled = 1
  1298. AddScore (100)
  1299. Light30.state=1
  1300. End if
  1301. End Sub
  1302.  
  1303. Sub TrigMushC_timer()
  1304. TmushC.TransZ = -6
  1305. me.timerenabled = 0
  1306. End Sub
  1307.  
  1308. Sub CallZipDOF_timer()
  1309. DOF 119, DOFPulse
  1310. CallZipDOF.enabled=0
  1311. End Sub
  1312.  
  1313. Sub TrigMushR_Hit
  1314. DOF 116, DOFPulse
  1315. Dim MushRSound
  1316. MushRSound = Int(rnd*3)+1
  1317. Select Case MushRSound
  1318. Case 1: PlaySound "flip_hit_1"
  1319. Case 2: PlaySound "flip_hit_2"
  1320. Case 2: PlaySound "flip_hit_3"
  1321. End Select
  1322. If tilt=false Then
  1323. If Zipper=1 Then
  1324. CallZipDOF.enabled=1
  1325. If LButton=0 Then
  1326. UnZipTimerL.enabled=1
  1327. End If
  1328. If LButton=1 Then
  1329. UnZipTimerCL.enabled=1
  1330. End If
  1331. If RButton=0 Then
  1332. UnZipTimerR.enabled=1
  1333. End If
  1334. If RButton=1 Then
  1335. UnZipTimerCR.enabled=1
  1336. End If
  1337. LeftFlipper1.enabled=0 : RightFlipper1.enabled=0 : LeftFlipper.enabled=1 : RightFlipper.enabled=1
  1338. End If
  1339. TmushR.TransZ = 6
  1340. me.timerenabled = 1
  1341. If Odin = 1 Then OdinKick.enabled=1 End If
  1342. AddScore (100)
  1343. Light29.state=1
  1344. End If
  1345. End Sub
  1346.  
  1347. Sub TrigMushR_timer()
  1348. TmushR.TransZ = -6
  1349. me.timerenabled = 0
  1350. End Sub
  1351.  
  1352. Sub OdinKick_timer()
  1353. Kicker1.Kick 90, 3
  1354. DOF 112, DOFPulse
  1355. If Light24.state=1 Then AddScore 1000 : Light24.state=1 : BlinkingSC.enabled=0 : BlinkingSC1.enabled=0: BlinkingSC2.enabled=0: BlinkingSC3.enabled=0: BlinkingSC4.enabled=0 End If
  1356. If Light25.state=1 Then AddScore 2000 : Light25.state=1 : BlinkingSC.enabled=0 : BlinkingSC1.enabled=0: BlinkingSC2.enabled=0: BlinkingSC3.enabled=0: BlinkingSC4.enabled=0 End If
  1357. If Light26.state=1 Then AddScore 3000 : Light26.state=1 : BlinkingSC.enabled=0 : BlinkingSC1.enabled=0: BlinkingSC2.enabled=0: BlinkingSC3.enabled=0: BlinkingSC4.enabled=0 End If
  1358. If Light27.state=1 Then AddScore 4000 : Light27.state=1 : BlinkingSC.enabled=0 : BlinkingSC1.enabled=0: BlinkingSC2.enabled=0: BlinkingSC3.enabled=0: BlinkingSC4.enabled=0 End If
  1359. If Light28.state=1 Then AddScore 5000 : Light28.state=1 : BlinkingSC.enabled=0 : BlinkingSC1.enabled=0: BlinkingSC2.enabled=0: BlinkingSC3.enabled=0: BlinkingSC4.enabled=0 End If
  1360. OWBalls=OWBalls+1
  1361. Odin=0
  1362. OWDrain.enabled=1
  1363. OdinKick.enabled=0
  1364. End Sub
  1365.  
  1366. Sub WotanKick_timer()
  1367. DOF 113, DOFPulse
  1368. Kicker2.Kick 90 , 3
  1369. OWBalls=OWBalls+1
  1370. Wotan=0
  1371. OWDrain.enabled=1
  1372. WotanKick.enabled=0
  1373. End Sub
  1374.  
  1375. '********* Zipper Flippers *********
  1376.  
  1377. Sub ZipTimerL_timer()
  1378. ZipAnL.enabled=1
  1379. FlipperL.visible=0 : FlipperL2.visible=1
  1380. ZipTimerL.enabled=0
  1381. End Sub
  1382.  
  1383. Sub ZipAnL_timer()
  1384. ZipAn2L.enabled=1
  1385. FlipperL2.visible=0 : FlipperL3.visible=1
  1386. ZipAnL.enabled=0
  1387. End Sub
  1388.  
  1389. Sub ZipAn2L_timer()
  1390. FlipperL3.visible=0 : FlipperL1.visible=1
  1391. ZipAn3L.enabled=1
  1392. ZipAn2L.enabled=0
  1393. PlaySound "zipflip",0,0.6,-1
  1394. Wall80.IsDropped=false
  1395. Wall81.IsDropped=false
  1396. Zipper=1
  1397. End Sub
  1398.  
  1399. Sub ZipAn3L_timer()
  1400. FlipperL1.visible=0 : FlipperL4.visible=1
  1401. ZipAn4L.enabled=1
  1402. ZipAn3L.enabled=0
  1403. End Sub
  1404.  
  1405. Sub ZipAn4L_timer()
  1406. FlipperL4.visible=0 : FlipperL5.visible=1
  1407. ZipAn5L.enabled=1
  1408. ZipAn4L.enabled=0
  1409. End Sub
  1410.  
  1411. Sub ZipAn5L_timer()
  1412. FlipperL5.visible=0 : FlipperL1.visible=1
  1413. ZipAn5L.enabled=0
  1414. End Sub
  1415.  
  1416. Sub ZipTimerR_timer()
  1417. ZipAnR.enabled=1
  1418. FlipperR.visible=0 : FlipperR2.visible=1
  1419. ZipTimerR.enabled=0
  1420. End Sub
  1421.  
  1422. Sub ZipAnR_timer()
  1423. ZipAn2R.enabled=1
  1424. FlipperR2.visible=0 : FlipperR3.visible=1
  1425. ZipAnR.enabled=0
  1426. End Sub
  1427.  
  1428. Sub ZipAn2R_timer()
  1429. FlipperR3.visible=0 : FlipperR1.visible=1
  1430. ZipAn3R.enabled=1
  1431. ZipAn2R.enabled=0
  1432. PlaySound "zipflip",0,0.6,1
  1433. Wall80.IsDropped=false
  1434. Wall81.IsDropped=false
  1435. Zipper=1
  1436. End Sub
  1437.  
  1438. Sub ZipAn3R_timer()
  1439. FlipperR1.visible=0 : FlipperR4.visible=1
  1440. ZipAn4R.enabled=1
  1441. ZipAn3R.enabled=0
  1442. End Sub
  1443.  
  1444. Sub ZipAn4R_timer()
  1445. FlipperR4.visible=0 : FlipperR5.visible=1
  1446. ZipAn5R.enabled=1
  1447. ZipAn4R.enabled=0
  1448. End Sub
  1449.  
  1450. Sub ZipAn5R_timer()
  1451. FlipperR5.visible=0 : FlipperR1.visible=1
  1452. ZipAn5R.enabled=0
  1453. End Sub
  1454.  
  1455. Sub ZipTimerCL_timer()
  1456. ZipAnCL.enabled=1
  1457. FlipperL.visible=0 : FlipperL10.visible=1
  1458. ZipTimerCL.enabled=0
  1459. End Sub
  1460.  
  1461. Sub ZipAnCL_timer()
  1462. ZipAn2CL.enabled=1
  1463. FlipperL10.visible=0 : FlipperL9.visible=1
  1464. ZipAnCL.enabled=0
  1465. End Sub
  1466.  
  1467. Sub ZipAn2CL_timer()
  1468. ZipAn3CL.enabled=1
  1469. FlipperL9.visible=0 : FlipperL1.visible=1
  1470. ZipAn2CL.enabled=0
  1471. PlaySound "zipflip",0,0.6,-1
  1472. Wall80.IsDropped=false
  1473. Wall81.IsDropped=false
  1474. Zipper=1
  1475. End Sub
  1476.  
  1477. Sub ZipAn3CL_timer()
  1478. ZipAn4CL.enabled=1
  1479. FlipperL1.visible=0 : FlipperL11.visible=1
  1480. ZipAn3CL.enabled=0
  1481. End Sub
  1482.  
  1483. Sub ZipAn4CL_timer()
  1484. FlipperL11.visible=0 : FlipperL1.visible=1
  1485. ZipAn4CL.enabled=0
  1486. End Sub
  1487.  
  1488. Sub ZipTimerCR_timer()
  1489. ZipAnCR.enabled=1
  1490. FlipperR.visible=0 : FlipperR10.visible=1
  1491. ZipTimerCR.enabled=0
  1492. End Sub
  1493.  
  1494. Sub ZipAnCR_timer()
  1495. ZipAn2CR.enabled=1
  1496. FlipperR10.visible=0 : FlipperR9.visible=1
  1497. ZipAnCR.enabled=0
  1498. End Sub
  1499.  
  1500. Sub ZipAn2CR_timer()
  1501. ZipAn3CR.enabled=1
  1502. FlipperR9.visible=0 : FlipperR1.visible=1
  1503. ZipAn2CR.enabled=0
  1504. PlaySound "zipflip",0,0.6,-1
  1505. Wall80.IsDropped=false
  1506. Wall81.IsDropped=false
  1507. Zipper=1
  1508. End Sub
  1509.  
  1510. Sub ZipAn3CR_timer()
  1511. ZipAn4CR.enabled=1
  1512. FlipperR1.visible=0 : FlipperR11.visible=1
  1513. ZipAn3CR.enabled=0
  1514. End Sub
  1515.  
  1516. Sub ZipAn4CR_timer()
  1517. FlipperR11.visible=0 : FlipperR1.visible=1
  1518. ZipAn4CR.enabled=0
  1519. End Sub
  1520.  
  1521. Sub UnZipTimerL_timer()
  1522. UnZipAnL.enabled=1
  1523. FlipperL1.visible=0 : FlipperL3.visible=1
  1524. UnZipTimerL.enabled=0
  1525. End Sub
  1526.  
  1527. Sub UnZipAnL_timer()
  1528. UnZipAn2L.enabled=1
  1529. FlipperL3.visible=0 : FlipperL2.visible=1
  1530. UnZipAnL.enabled=0
  1531. End Sub
  1532.  
  1533. Sub UnZipAn2L_timer()
  1534. FlipperL2.visible=0 : FlipperL.visible=1
  1535. UnZipAn3L.enabled=1
  1536. UnZipAn2L.enabled=0
  1537. PlaySound "unzipflip",0,0.6,-1
  1538. Wall80.IsDropped=true
  1539. Wall81.IsDropped=true
  1540. Zipper=0
  1541. End Sub
  1542.  
  1543. Sub UnZipAn3L_timer()
  1544. FlipperL.visible=0 : FlipperL6.visible=1
  1545. UnZipAn4L.enabled=1
  1546. UnZipAn3L.enabled=0
  1547. End Sub
  1548.  
  1549. Sub UnZipAn4L_timer()
  1550. FlipperL6.visible=0 : FlipperL.visible=1
  1551. UnZipAn4L.enabled=0
  1552. End Sub
  1553.  
  1554. Sub UnZipTimerR_timer()
  1555. UnZipAnR.enabled=1
  1556. FlipperR1.visible=0 : FlipperR3.visible=1
  1557. UnZipTimerR.enabled=0
  1558. End Sub
  1559.  
  1560. Sub UnZipAnR_timer()
  1561. UnZipAn2R.enabled=1
  1562. FlipperR3.visible=0 : FlipperR2.visible=1
  1563. UnZipAnR.enabled=0
  1564. End Sub
  1565.  
  1566. Sub UnZipAn2R_timer()
  1567. FlipperR2.visible=0 : FlipperR.visible=1
  1568. UnZipAn3R.enabled=1
  1569. UnZipAn2R.enabled=0
  1570. PlaySound "unzipflip",0,0.6,1
  1571. Wall80.IsDropped=true
  1572. Wall81.IsDropped=true
  1573. Zipper=0
  1574. End Sub
  1575.  
  1576. Sub UnZipAn3R_timer()
  1577. FlipperR.visible=0 : FlipperR6.visible=1
  1578. UnZipAn4R.enabled=1
  1579. UnZipAn3R.enabled=0
  1580. End Sub
  1581.  
  1582. Sub UnZipAn4R_timer()
  1583. FlipperR6.visible=0 : FlipperR.visible=1
  1584. UnZipAn4R.enabled=0
  1585. End Sub
  1586.  
  1587. Sub UnZipTimerCL_timer()
  1588. UnZipAnCL.enabled=1
  1589. FlipperL1.visible=0 : FlipperL9.visible=1
  1590. UnZipTimerCL.enabled=0
  1591. End Sub
  1592.  
  1593. Sub UnZipAnCL_timer()
  1594. UnZipAn2CL.enabled=1
  1595. FlipperL9.visible=0 : FlipperL10.visible=1
  1596. UnZipAnCL.enabled=0
  1597. End Sub
  1598.  
  1599. Sub UnZipAn2CL_timer()
  1600. UnZipAn3CL.enabled=1
  1601. FlipperL10.visible=0 : FlipperL.visible=1
  1602. UnZipAn2CL.enabled=0
  1603. PlaySound "unzipflip",0,0.6,-1
  1604. Wall80.IsDropped=true
  1605. Wall81.IsDropped=true
  1606. Zipper=0
  1607. End Sub
  1608.  
  1609. Sub UnZipAn3CL_timer()
  1610. UnZipAn4CL.enabled=1
  1611. FlipperL.visible=0 : FlipperL12.visible=1
  1612. UnZipAn3CL.enabled=0
  1613. End Sub
  1614.  
  1615. Sub UnZipAn4CL_timer()
  1616. FlipperL12.visible=0 : FlipperL.visible=1
  1617. UnZipAn4CL.enabled=0
  1618. End Sub
  1619.  
  1620. Sub UnZipTimerCR_timer()
  1621. UnZipAnCR.enabled=1
  1622. FlipperR1.visible=0 : FlipperR9.visible=1
  1623. UnZipTimerCR.enabled=0
  1624. End Sub
  1625.  
  1626. Sub UnZipAnCR_timer()
  1627. UnZipAn2CR.enabled=1
  1628. FlipperR9.visible=0 : FlipperR10.visible=1
  1629. UnZipAnCR.enabled=0
  1630. End Sub
  1631.  
  1632. Sub UnZipAn2CR_timer()
  1633. UnZipAn3CR.enabled=1
  1634. FlipperR10.visible=0 : FlipperR.visible=1
  1635. UnZipAn2CR.enabled=0
  1636. PlaySound "unzipflip",0,0.6,-1
  1637. Wall80.IsDropped=true
  1638. Wall81.IsDropped=true
  1639. Zipper=0
  1640. End Sub
  1641.  
  1642. Sub UnZipAn3CR_timer()
  1643. UnZipAn4CR.enabled=1
  1644. FlipperR.visible=0 : FlipperR12.visible=1
  1645. UnZipAn3CR.enabled=0
  1646. End Sub
  1647.  
  1648. Sub UnZipAn4CR_timer()
  1649. FlipperR12.visible=0 : FlipperR.visible=1
  1650. UnZipAn4CR.enabled=0
  1651. End Sub
  1652.  
  1653. Sub FlipLAn_timer()
  1654. FlipperL.visible=0 : FlipperL8.visible=1
  1655. FlipLAn2.enabled=1
  1656. FlipLAn.enabled=0
  1657. End Sub
  1658.  
  1659. Sub FlipLAn2_timer()
  1660. FlipperL8.visible=0 : FlipperL.visible=1
  1661. FlipLAn2.enabled=0
  1662. End Sub
  1663.  
  1664. Sub FlipRAn_timer()
  1665. FlipperR.visible=0 : FlipperR8.visible=1
  1666. FlipRAn2.enabled=1
  1667. FlipRAn.enabled=0
  1668. End Sub
  1669.  
  1670. Sub FlipRAn2_timer()
  1671. FlipperR.visible=1 : FlipperR8.visible=0
  1672. FlipRAn2.enabled=0
  1673. End Sub
  1674.  
  1675. Sub FlipL1An_timer()
  1676. FlipperL1.visible=0 : FlipperL7.visible=1
  1677. FlipL1An2.enabled=1
  1678. FlipL1An.enabled=0
  1679. End Sub
  1680.  
  1681. Sub FlipL1An2_timer()
  1682. FlipperL7.visible=0 : FlipperL1.visible=1
  1683. FlipL1An2.enabled=0
  1684. End Sub
  1685.  
  1686. Sub FlipR1An_timer()
  1687. FlipperR1.visible=0 : FlipperR7.visible=1
  1688. FlipR1An2.enabled=1
  1689. FlipR1An.enabled=0
  1690. End Sub
  1691.  
  1692. Sub FlipR1An2_timer()
  1693. FlipperR7.visible=0 : FlipperR1.visible=1
  1694. FlipR1An2.enabled=0
  1695. End Sub
  1696.  
  1697. '***************************************
  1698.  
  1699. Sub Trigger4_Hit
  1700. PlaySound "fx_trigger"
  1701. If Tilt=false Then
  1702. Kicker4.enabled=1
  1703. Light23.state=1
  1704. End If
  1705. mTrigger.MagnetOn = 1
  1706. End Sub
  1707.  
  1708. Sub Trigger1_Hit
  1709. PlaySound "fx_trigger"
  1710. Kicker4.enabled=0
  1711. Light23.state=0
  1712. mTrigger.MagnetOn = 1
  1713. End Sub
  1714.  
  1715. Sub Trigger7_Hit
  1716. PlaySound "fx_trigger"
  1717. Kicker4.enabled=0
  1718. Light23.state=0
  1719. mTrigger.MagnetOn = 1
  1720. End Sub
  1721.  
  1722. Sub Trigger2_Hit
  1723. PlaySound "fx_trigger"
  1724. If Tilt=false Then AddScore (10) End If
  1725. mTrigger.MagnetOn = 1
  1726. End Sub
  1727.  
  1728. Sub Trigger3_Hit
  1729. PlaySound "fx_trigger"
  1730. If Tilt=false Then AddScore (10) End If
  1731. mTrigger.MagnetOn = 1
  1732. End Sub
  1733.  
  1734. Sub Trigger5_Hit
  1735. PlaySound "fx_trigger"
  1736. If Tilt=false Then AddScore (10) End If
  1737. mTrigger.MagnetOn = 1
  1738. End Sub
  1739.  
  1740. Sub Trigger6_Hit
  1741. PlaySound "fx_trigger"
  1742. If Tilt=false Then AddScore (10) End If
  1743. mTrigger.MagnetOn = 1
  1744. End Sub
  1745.  
  1746. Sub Trigger8_Hit
  1747. PlaySound "fx_trigger"
  1748. If Tilt=false Then AddScore (10) End If
  1749. mTrigger.MagnetOn = 1
  1750. End Sub
  1751.  
  1752. Sub Kicker4_Hit
  1753. me.timerenabled=1
  1754. End Sub
  1755.  
  1756. Sub Kicker4_Timer()
  1757. DOF 111, DOFPulse
  1758. StrongDir.enabled=1
  1759. Kicker4.Kick Dir, Strong
  1760. Stantuffo.enabled=1
  1761. AddScore (1000)
  1762. me.timerenabled=0
  1763. End Sub
  1764.  
  1765. Sub Stantuffo_timer()
  1766. Primitive83.TransY=-70
  1767. StantuffoR.enabled=1
  1768. Stantuffo.enabled=0
  1769. End Sub
  1770.  
  1771. Sub StantuffoR_timer()
  1772. Primitive83.TransY=Primitive83.TransY+5
  1773. If Primitive83.TransY=0 Then
  1774. StantuffoR.enabled=0
  1775. End If
  1776. End Sub
  1777.  
  1778. Sub Kicker4_UnHit
  1779. PlaySound "popper_ball",0,.75,0,0.25
  1780. End Sub
  1781.  
  1782. Sub StrongDir_timer()
  1783. KickIP = Int(Rnd*6)+1
  1784. Select Case KickIP
  1785. Case 1 : Dir = 0 : Strong = 30
  1786. Case 2 : Dir = 0 : Strong = 27
  1787. Case 3 : Dir = 0 : Strong = 24
  1788. Case 4 : Dir = 0 : Strong = 21
  1789. Case 5 : Dir = 5 : Strong = 30
  1790. Case 6 : Dir = 5 : Strong = 27
  1791. End Select
  1792. StrongDir.enabled=0
  1793. End Sub
  1794.  
  1795. Sub Wall66_Hit
  1796. PlaySound "target" , 1,0.5
  1797. If Tilt=false Then AddScore (10) End If
  1798. Rubber1.visible=0
  1799. Rubber11.visible=1
  1800. RubberTimer.enabled=1
  1801. End Sub
  1802.  
  1803. Sub RubberTimer_timer()
  1804. Rubber1.visible=1
  1805. Rubber11.visible=0
  1806. RubberTimer.enabled=0
  1807. End Sub
  1808.  
  1809. Sub Wall67_Hit
  1810. PlaySound "target" , 1,0.5
  1811. If Tilt=false Then AddScore (10) End If
  1812. Rubber2.visible=0
  1813. Rubber13.visible=1
  1814. RubberTimer1.enabled=1
  1815. End Sub
  1816.  
  1817. Sub RubberTimer1_timer()
  1818. Rubber2.visible=1
  1819. Rubber13.visible=0
  1820. RubberTimer1.enabled=0
  1821. End Sub
  1822.  
  1823. Sub Wall68_Hit
  1824. PlaySound "target" , 1,0.5
  1825. If Tilt=false Then AddScore (10) End If
  1826. Rubber10.visible=0
  1827. Rubber26.visible=1
  1828. RubberTimer2.enabled=1
  1829. End Sub
  1830.  
  1831. Sub RubberTimer2_timer()
  1832. Rubber10.visible=1
  1833. Rubber26.visible=0
  1834. RubberTimer2.enabled=0
  1835. End Sub
  1836.  
  1837. Sub Wall69_Hit
  1838. PlaySound "target" , 1,0.5
  1839. If Tilt=false Then AddScore (10) End If
  1840. Rubber14.visible=0
  1841. Rubber20.visible=1
  1842. RubberTimer3.enabled=1
  1843. End Sub
  1844.  
  1845. Sub RubberTimer3_timer()
  1846. Rubber14.visible=1
  1847. Rubber20.visible=0
  1848. RubberTimer3.enabled=0
  1849. End Sub
  1850.  
  1851. Sub Wall70_Hit
  1852. PlaySound "target" , 1,0.5
  1853. If Tilt=false Then AddScore (10) End If
  1854. Rubber12.visible=0
  1855. Rubber27.visible=1
  1856. RubberTimer4.enabled=1
  1857. End Sub
  1858.  
  1859. Sub RubberTimer4_timer()
  1860. Rubber12.visible=1
  1861. Rubber27.visible=0
  1862. RubberTimer4.enabled=0
  1863. End Sub
  1864.  
  1865. Sub Wall71_Hit
  1866. PlaySound "target" , 1,0.5
  1867. If Tilt=false Then AddScore (10) End If
  1868. Rubber15.visible=0
  1869. Rubber28.visible=1
  1870. RubberTimer5.enabled=1
  1871. End Sub
  1872.  
  1873. Sub RubberTimer5_timer()
  1874. Rubber15.visible=1
  1875. Rubber28.visible=0
  1876. RubberTimer5.enabled=0
  1877. End Sub
  1878.  
  1879. Sub Wall72_Hit
  1880. PlaySound "target" , 1,0.5
  1881. If Tilt=false Then AddScore (10) End If
  1882. Rubber9.visible=0
  1883. Rubber29.visible=1
  1884. RubberTimer6.enabled=1
  1885. End Sub
  1886.  
  1887. Sub RubberTimer6_timer()
  1888. Rubber9.visible=1
  1889. Rubber29.visible=0
  1890. RubberTimer6.enabled=0
  1891. End Sub
  1892.  
  1893. Sub Wall73_Hit
  1894. PlaySound "target" , 1,0.5
  1895. If Tilt=false Then AddScore (10) End If
  1896. Rubber5.visible=0
  1897. Rubber30.visible=1
  1898. RubberTimer7.enabled=1
  1899. End Sub
  1900.  
  1901. Sub RubberTimer7_timer()
  1902. Rubber5.visible=1
  1903. Rubber30.visible=0
  1904. RubberTimer7.enabled=0
  1905. End Sub
  1906.  
  1907. Sub Wall74_Hit
  1908. PlaySound "target" , 1,0.5
  1909. If Tilt=false Then AddScore (10) End If
  1910. Rubber4.visible=0
  1911. Rubber31.visible=1
  1912. RubberTimer8.enabled=1
  1913. End Sub
  1914.  
  1915. Sub RubberTimer8_timer()
  1916. Rubber4.visible=1
  1917. Rubber31.visible=0
  1918. RubberTimer8.enabled=0
  1919. End Sub
  1920.  
  1921. '*****************************************
  1922.  
  1923. '********** Sling Shot Animations ***************
  1924.  
  1925. Dim RStep, Lstep
  1926.  
  1927. Sub RightSlingShot_Slingshot
  1928. PlaySound SoundFXDOF("slingshot",106,DOFPulse,DOFContactors), 0, 1, 0.05, 0.05
  1929. RSling.Visible = 0
  1930. RSling1.Visible = 1
  1931. sling1.TransZ = -25
  1932. RStep = 0
  1933. RightSlingShot.TimerEnabled = 1
  1934. If Tilt = false Then
  1935. Addscore (10)
  1936. End If
  1937. End Sub
  1938.  
  1939. Sub RightSlingShot_Timer
  1940. Select Case RStep
  1941. Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.TransZ = -10
  1942. Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:sling1.TransZ = 0:RightSlingShot.TimerEnabled = 0
  1943. End Select
  1944. RStep = RStep + 1
  1945. End Sub
  1946.  
  1947. Sub LeftSlingShot_Slingshot
  1948. PlaySound SoundFXDOF("slingshot",107,DOFPulse,DOFContactors),0,1,-0.05,0.05
  1949. LSling.Visible = 0
  1950. LSling1.Visible = 1
  1951. sling2.TransZ = -25
  1952. LStep = 0
  1953. LeftSlingShot.TimerEnabled = 1
  1954. If Tilt = false Then
  1955. Addscore (10)
  1956. End If
  1957. End Sub
  1958.  
  1959. Sub LeftSlingShot_Timer
  1960. Select Case LStep
  1961. Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.TransZ = -10
  1962. Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:sling2.TransZ = 0:LeftSlingShot.TimerEnabled = 0
  1963. End Select
  1964. LStep = LStep + 1
  1965.  
  1966. End Sub
  1967.  
  1968. '*******************************************
  1969.  
  1970. '********** Bumpers **********************************************
  1971.  
  1972. Dim dirRing : dirRing = -1
  1973. Dim dirRing2 : dirRing2 = -1
  1974. Dim dirRing3 : dirRing3 = -1
  1975.  
  1976. Sub Bumper1_Hit
  1977. If Tilt = false Then
  1978. Me.TimerEnabled = 1
  1979. Dim BumpSound
  1980. BumpSound = Int(rnd*4)+1
  1981. Select Case BumpSound
  1982. Case 1: PlaySound SoundFXDOF("bump1",105,DOFPulse,DOFContactors)
  1983. Case 2: PlaySound SoundFXDOF("bump2",105,DOFPulse,DOFContactors)
  1984. Case 3: PlaySound SoundFXDOF("bump3",105,DOFPulse,DOFContactors)
  1985. Case 4: PlaySound SoundFXDOF("bump4",105,DOFPulse,DOFContactors)
  1986. End Select
  1987. If Light32.state = 0 Then
  1988. Addscore (10)
  1989. End If
  1990. If Light32.state = 1 Then
  1991. Addscore (100)
  1992. End If
  1993. End If
  1994.  
  1995. End Sub
  1996.  
  1997. Sub Bumper1_timer()
  1998. If Tilt = false Then
  1999. BumperRing1.Z = BumperRing1.Z + (5 * dirRing)
  2000. If BumperRing1.Z <= 0 Then dirRing = 1
  2001. If BumperRing1.Z >= 40 Then
  2002. dirRing = -1
  2003. BumperRing1.Z = 40
  2004. Me.TimerEnabled = 0
  2005. End If
  2006. End If
  2007.  
  2008. End Sub
  2009.  
  2010. Sub Bumper2_Hit
  2011. If Tilt = false Then
  2012. Me.TimerEnabled = 1
  2013. Dim BumpSound
  2014. BumpSound = Int(rnd*4)+1
  2015. Select Case BumpSound
  2016. Case 1: PlaySound SoundFXDOF("bump1",104,DOFPulse,DOFContactors)
  2017. Case 2: PlaySound SoundFXDOF("bump2",104,DOFPulse,DOFContactors)
  2018. Case 3: PlaySound SoundFXDOF("bump3",104,DOFPulse,DOFContactors)
  2019. Case 4: PlaySound SoundFXDOF("bump4",104,DOFPulse,DOFContactors)
  2020. End Select
  2021. If Light33.state = 0 Then
  2022. Addscore (10)
  2023. End If
  2024. If Light33.state = 1 Then
  2025. Addscore (100)
  2026. End If
  2027. End If
  2028.  
  2029. End Sub
  2030.  
  2031. Sub Bumper2_timer()
  2032. If Tilt = false Then
  2033. BumperRing2.Z = BumperRing2.Z + (5 * dirRing2)
  2034. If BumperRing2.Z <= 0 Then dirRing2 = 1
  2035. If BumperRing2.Z >= 40 Then
  2036. dirRing2 = -1
  2037. BumperRing2.Z = 40
  2038. Me.TimerEnabled = 0
  2039. End If
  2040. End If
  2041.  
  2042. End Sub
  2043.  
  2044. Sub Bumper3_Hit
  2045. If Tilt = false Then
  2046. Me.TimerEnabled = 1
  2047. Dim BumpSound
  2048. BumpSound = Int(rnd*4)+1
  2049. Select Case BumpSound
  2050. Case 1: PlaySound SoundFXDOF("bump1",103,DOFPulse,DOFContactors)
  2051. Case 2: PlaySound SoundFXDOF("bump2",103,DOFPulse,DOFContactors)
  2052. Case 3: PlaySound SoundFXDOF("bump3",103,DOFPulse,DOFContactors)
  2053. Case 4: PlaySound SoundFXDOF("bump4",103,DOFPulse,DOFContactors)
  2054. End Select
  2055. Addscore (100)
  2056. End If
  2057. End Sub
  2058.  
  2059. Sub Bumper3_timer()
  2060. If Tilt = false Then
  2061. BumperRing3.Z = BumperRing3.Z + (5 * dirRing3)
  2062. If BumperRing3.Z <= 0 Then dirRing3 = 1
  2063. If BumperRing3.Z >= 40 Then
  2064. dirRing3 = -1
  2065. BumperRing3.Z = 40
  2066. Me.TimerEnabled = 0
  2067. End If
  2068. End If
  2069.  
  2070. End Sub
  2071.  
  2072. '*****************************************************************************
  2073.  
  2074. ' *********************************************************************
  2075. ' Supporting Ball & Sound Functions
  2076. ' *********************************************************************
  2077.  
  2078. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  2079. Vol = Csng(BallVel(ball) ^2 / 4000)
  2080. End Function
  2081.  
  2082. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
  2083. Dim tmp
  2084. tmp = ball.x * 2 / Fireball.width-1
  2085. If tmp > 0 Then
  2086. Pan = Csng(tmp ^10)
  2087. Else
  2088. Pan = Csng(-((- tmp) ^10) )
  2089. End If
  2090. End Function
  2091.  
  2092. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  2093. Pitch = BallVel(ball) * 20
  2094. End Function
  2095.  
  2096. Function BallVel(ball) 'Calculates the ball speed
  2097. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  2098. End Function
  2099.  
  2100. '*****************************************
  2101. ' JP's VP10 Rolling Sounds
  2102. '*****************************************
  2103.  
  2104. Const tnob = 5 ' total number of balls
  2105. ReDim rolling(tnob)
  2106. InitRolling
  2107.  
  2108. Sub InitRolling
  2109. Dim i
  2110. For i = 0 to tnob
  2111. rolling(i) = False
  2112. Next
  2113. End Sub
  2114.  
  2115. Sub RollingTimer_Timer()
  2116. Dim BOT, b
  2117. BOT = GetBalls
  2118.  
  2119. ' stop the sound of deleted balls
  2120. For b = UBound(BOT) + 1 to tnob
  2121. rolling(b) = False
  2122. StopSound("fx_ballrolling" & b)
  2123. Next
  2124.  
  2125. ' exit the sub if no balls on the table
  2126. If UBound(BOT) = -1 Then Exit Sub
  2127.  
  2128. ' play the rolling sound for each ball
  2129. For b = 0 to UBound(BOT)
  2130. If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
  2131. rolling(b) = True
  2132. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0
  2133. Else
  2134. If rolling(b) = True Then
  2135. StopSound("fx_ballrolling" & b)
  2136. rolling(b) = False
  2137. End If
  2138. End If
  2139. Next
  2140. End Sub
  2141.  
  2142. '**********************
  2143. ' Ball Collision Sound
  2144. '**********************
  2145.  
  2146. Sub OnBallBallCollision(ball1, ball2, velocity)
  2147. PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
  2148. End Sub
  2149.  
  2150. '************************************
  2151. ' What you need to add to your table
  2152. '************************************
  2153.  
  2154. ' a timer called RollingTimer. With a fast interval, like 10
  2155. ' one collision sound, in this script is called fx_collide
  2156. ' as many sound files as max number of balls, with names ending with 0, 1, 2, 3, etc
  2157. ' for ex. as used in this script: fx_ballrolling0, fx_ballrolling1, fx_ballrolling2, fx_ballrolling3, etc
  2158.  
  2159.  
  2160. '******************************************
  2161. ' Explanation of the rolling sound routine
  2162. '******************************************
  2163.  
  2164. ' sounds are played based on the ball speed and position
  2165.  
  2166. ' the routine checks first for deleted balls and stops the rolling sound.
  2167.  
  2168. ' The For loop goes through all the balls on the table and checks for the ball speed and
  2169. ' if the ball is on the table (height lower than 30) then then it plays the sound
  2170. ' otherwise the sound is stopped, like when the ball has stopped or is on a ramp or flying.
  2171.  
  2172. ' The sound is played using the VOL, PAN and PITCH functions, so the volume and pitch of the sound
  2173. ' will change according to the ball speed, and the PAN function will change the stereo position according
  2174. ' to the position of the ball on the table.
  2175.  
  2176.  
  2177. '**************************************
  2178. ' Explanation of the collision routine
  2179. '**************************************
  2180.  
  2181. ' The collision is built in VP.
  2182. ' You only need to add a Sub OnBallBallCollision(ball1, ball2, velocity) and when two balls collide they
  2183. ' 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
  2184. ' depending of the speed of the collision.
  2185.  
  2186.  
  2187. '********* Others Sounds *************
  2188.  
  2189. Sub Trigger38_Hit
  2190. PlaySound "metal_hop"
  2191. Trigger41.enabled=1
  2192. End Sub
  2193.  
  2194. Sub Trigger41_Hit
  2195. PlaySound "drop",0,0.5
  2196. Trigger41.enabled=0
  2197. End Sub
  2198.  
  2199. Sub Wall75_Hit
  2200. PlaySound "toc",0,0.5
  2201. End Sub
  2202.  
  2203. Sub Wall76_Hit
  2204. PlaySound "metalhit_thin"
  2205. End Sub
  2206.  
  2207. Sub Wall77_Hit
  2208. PlaySound "metalhit_medium"
  2209. End Sub
  2210.  
  2211. Sub Rubber32_Hit
  2212. PlaySound "flip_hit_1"
  2213. End Sub
  2214.  
  2215. Sub Gate1_Hit
  2216. PlaySound "gate4"
  2217. End Sub
  2218.  
  2219. Sub Gate3_Hit
  2220. PlaySound "gate"
  2221. End Sub
  2222.  
  2223. Sub Wall57_Hit
  2224. PlaySound "metalhit_medium"
  2225. End Sub
  2226.  
  2227. Sub CallFlipOff_Timer()
  2228. FlipOff
  2229. CallFlipOff.enabled=0
  2230. End Sub
  2231.  
  2232. Sub Wall37_Hit
  2233. PlaySound "metalhit_medium"
  2234. End Sub
  2235.  
  2236. Sub Wall39_Hit
  2237. PlaySound "metalhit_medium"
  2238. End Sub
  2239.  
  2240. Sub Wall93_Hit
  2241. PlaySound "metalhit_medium"
  2242. End Sub
  2243.  
  2244. Sub Wall29_Hit
  2245. PlaySound "metalhit_medium"
  2246. End Sub
  2247.  
  2248. Sub Wall50_Hit
  2249. PlaySound "metalhit_medium"
  2250. End Sub
  2251.  
  2252. Sub Wall51_Hit
  2253. PlaySound "metalhit_medium"
  2254. End Sub
  2255.  
  2256. Sub Wall52_Hit
  2257. PlaySound "metalhit_medium"
  2258. End Sub
  2259.  
  2260. Sub Wall15_Hit
  2261. PlaySound "metalhit_medium"
  2262. End Sub
  2263.  
  2264. Sub Wall23_Hit
  2265. PlaySound "metalhit_medium"
  2266. End Sub
  2267.  
  2268. Sub Wall95_Hit
  2269. PlaySound "metalhit_medium"
  2270. End Sub
  2271.  
  2272. Sub Plastics_Hit (idx)
  2273. PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  2274. End Sub
  2275.  
  2276. Sub Metals_Thin_Hit (idx)
  2277. PlaySound "metalhit_thin", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  2278. End Sub
  2279.  
  2280. Sub Rubbers_Hit(idx)
  2281. dim finalspeed
  2282. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  2283. If finalspeed > 20 then
  2284. PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  2285. End if
  2286. If finalspeed >= 6 AND finalspeed <= 20 then
  2287. RandomSoundRubber()
  2288. End If
  2289. End Sub
  2290.  
  2291. Sub Posts_Hit(idx)
  2292. dim finalspeed
  2293. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  2294. If finalspeed > 16 then
  2295. PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  2296. End if
  2297. If finalspeed >= 6 AND finalspeed <= 16 then
  2298. RandomSoundRubber()
  2299. End If
  2300. End Sub
  2301.  
  2302. Sub RandomSoundRubber()
  2303. Select Case Int(Rnd*3)+1
  2304. Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  2305. Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  2306. Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  2307. End Select
  2308. End Sub
  2309.  
  2310. Sub LeftFlipper_Collide(parm)
  2311. PlaySound "fx_rubber2", 0, parm / 10, -0.1, 0.15
  2312. End Sub
  2313.  
  2314. Sub RightFlipper_Collide(parm)
  2315. PlaySound "fx_rubber2", 0, parm / 10, 0.1, 0.15
  2316. End Sub
  2317.  
  2318. Sub LeftFlipper1_Collide(parm)
  2319. PlaySound "fx_rubber2", 0, parm / 10, -0.1, 0.15
  2320. End Sub
  2321.  
  2322. Sub RightFlipper1_Collide(parm)
  2323. PlaySound "fx_rubber2", 0, parm / 10, 0.1, 0.15
  2324. End Sub
  2325.  
  2326. '*************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement