Advertisement
Arngrim

TWDLE DOF

Dec 20th, 2016
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.82 KB | None | 0 0
  1. '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2. '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  3. '@@@@@@@@@@@@@@@@@@: M@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  4. '@@@@@@@@@@@@@@@@@@W@#@ B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  5. '@@@@@@@@@@@@@@@@@@8@#S 4@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  6. '@@@@@@@@@@@@@@@@@@8@#@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  7. '@@@@@@@@@@@@@@@@@@8@#@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  8. '@@@@@@@@@@@@@@@@@@W@*@ :+8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  9. '@@@###M#@M##M@M##M@MM#*#B@@####@@@@###MBMM##@##M#@###8BMM#M@@MS¤¤S@B@@@
  10. '@@@: :::W+: +B+ :M@+:: 4@@+ :B@@@::::B: ::B::::W+: :B+::4B+ :::+B@@
  11. '@@@:::: 9::::@: :@8 :::::@@::::@@@@ :::@::::@ ::@ : @:: K4 :: ::::@@@
  12. '@@@9+:: ¤ :: B ::@S ::: @@::::@@@@ :: 4 :: @ ::@ :::@:: K : :::::8B@
  13. '@@@@::: :: 9 ::@: :::: @@::::@@@@::: : ::#@::::@ :: *:: K : #: ::#@@
  14. '@@@@::: ::: ¤ :@ ::: : @@::::@@@@::: + @@::: @ ::: +K :+# :::*@@
  15. '@@@@::: ::::: ::@ :: :::@@::::@@@@::::::::@@::: @ :: : K :: # :::*@@
  16. '@@@@::::: ::::::+@:::¤:::@@::::@@@@::::::::@@::: @ :::::: K :::W@@@@@@@
  17. '@@@@::::::::::: 4@:::K+::@@::::@@@@::::::: @@::: @ :::::: K :: M: KB@
  18. '@@@@: :::::::: @@:::8:::8@::::@@@@::::::::@@::: @ :::::: K :: #: ::K@@
  19. '@@@@ :::::::::::@@:::@ ::£@::::@@@@::::::::@@::: @ :::::: K :: #: ::K@@
  20. '@@@@ ::::¤ ::::@# : @: ::@::::@@@@ :: :::@@::: @ ::: :: K :: #: :K@@
  21. '@@@@S:::::*:::::@¤ : ::: @::::@@@@ : ::::@@::: @ :: :: K :::M :::K@@
  22. '@@@@W+::: B:::::@ :::::::@::::@@@B: : :8@::: @ ::K::: K :: # ::K@@
  23. '@@@@@:::::@:::: @ ::::::::@::: : 8: :: :::¤@::: @ ::@::: K :: 4 +::K@@
  24. '@@@@@:::: @ :::¤@:::: :::@ ::::::@::: +:: @ :: @ ::@::: 9 : :: :::M@@
  25. '@@@@@:::: @::::#@:: #@: ::B :::: :@::: *::::@ :: @ ::@ : K8++ :: : @@@
  26. '@@@@@ :: £@::: @@ @@::: 4 :: : @ : @ : +: @ B#: :K@9+:::: B@@@
  27. '@@@@@B@@@@B@@@B@@@@@@@@@@@@@@@@@@@B@@@@@B@@@@@@@@B@@@@@@B@@@@@@@@@@@@@@
  28. '@@@K44KK44449#@B@@@@KK444KK4KKKK4@@@@@KKKKK4444W@@@@K44444444K#@@@@@@@@
  29. '@@@:::::::::::: +@@@ ::::::::::::@@@@@:::::::::S@@@@ :::::::::: :@@@@@
  30. '@@@:::::::::::::: @@ ::::::::::::@@@@@::::::::: @@@@ :::::::::::::+@@@@
  31. '@@@:::::::::::::::@@ ::::::::::::@@@BW::::::::: @@@@ ::::::::::::::W@@@
  32. '@@@::::::::::::::::B ::::::::::::@@@@S :::::::::@@@@ ::::::::::::: +B@@
  33. '@@@::::::: ::::::::@ ::::::: :: @@@@ :::::::: @@@@ ::::: +::::::@@@
  34. '@@@:::::::#£+:::: :@ :::::: @@@@ ::::::::: @@@@ ::::::£4:::::::@@@
  35. '@@@:::::::@B+ :::::@ ::::: @@@@B@@@@ ::::::::: B@@@ ::::::£B+::::::@@@
  36. '@@@:::::::@@:::::::@ ::::: @@@@@@@@@ ::::::::: 4B@@ :::::4@: :::::@@@
  37. '@@@:::::::@@:::::::@ ::::: @@@@@@@@@ ::::+::::::@@@ ::::: 4@ ::::::@@@
  38. '@@@:::::::@@ :::::@ ::::: @@@@@@@@W :::K:: :: @@@ ::::: 4@ ::::::@@@
  39. '@@@:::::::@@ ::::::@ ::::: @@@@@@@@£:::::#:::: @@@ ::::: 4@ ::::::@@@
  40. '@@@:::::::@@ ::::::@ :::::::::: @@@ ::::@::::::@@@ ::::: 4@ ::::::@@@
  41. '@@@:::::::@@ ::::::@ :::::::::::@@@ :::::@::::::@@@ :::: 4@ ::::::@@@
  42. '@@@:::::::@@ ::::::@ :::::::::::@@@::::: @:::: :@@@ :::: 4@ ::::::@@@
  43. '@@@:::::::@@ ::::::@ :::::::::::@@@:::: @ :::::*@@ :::: 4@ ::::::@@@
  44. '@@@:::::::@@ ::::::@ :::::::: ::@@@ ::++@:::::: @@ ::::: 4@ ::::::@@@
  45. '@@@:::::::@@ ::::::@ :::::: ::@@B: :::£@:::::: @@ ::::: 4@ ::::::@@@
  46. '@@@:::::::@@ ::::::@ ::::: KKKKK@@4: :::M@:::::: @@ ::::: 4@ ::::::@@@
  47. '@@@:::::::@@ ::::::@ ::::: @@@@@@@::::: B@:::::::@@ ::::: 4@ ::::::@@@
  48. '@@@:::::::@@ ::::::@ ::::: @@@@@@@ :::::@@ ::::: @@ ::::: 4@ ::::::@@@
  49. '@@@:::::::@@ ::::::@ ::::: @@@@@@@::::: +: ::::: @@ ::::: 4@ ::::::@@@
  50. '@@@:::::::@@:::::::@ :::::: @@@@@@@ ::::::::::::::@@ :::: 4@ ::::::@@@
  51. '@@@:::::::@@:::::::@ :::::: @@@@@@@:::::::::::::: 8@ :::: 4@ ::::::@@@
  52. '@@@:::::::#S :::: :@ :::::: 8@:::::::::::::: KB ::::: £4 ::::::@@@
  53. '@@@:::::::+ :::::::@ ::::::::::: @@::::::::::::::: B ::::: +: ::::::@@@
  54. '@@@:::::::::::::: :@ ::::::::::: @M+:::: ::::::: @ :::: ::::::: :@@@
  55. '@@@:::::::::::::: @@ ::::::::::::@S ::::¤@@@+::::: @ ::::::::::::+M@@@
  56. '@@@:::::::::::::: @@ ::::::::::::@ ::::9@@@:::::::@ ::::::::::::::@@@@
  57. '@@@:::::::::::: +@@@:::::::::::::@ :::::8@@@::::: B :::::::::::::@@@@@
  58. '@@@4KKKKKKKK9#BB@@@@KKKKKKKKKKKKK@4KKKKK@@@@4KKKKKKBKKKKKKKKKK#@@@@@@@@
  59. '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  60. '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  61. '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  62. '@@@@@@@@@@@@@@@ TABLE BY ICPJUGGLA AND FRENETICAMNESIC @@@@@@@@@@@@@@@@
  63. '@@@@@@@@@@@@@@@@ SCRIPT BY FRENETICAMNESIC AND GTXJOE @@@@@@@@@@@@@@@@@
  64. '@@@@@@ MODELS BY FRENETICAMNESIC, RANDR, FLUPPER, DARK, AND ZANY @@@@@@
  65. '@@@@@ RESOURCES PROVIDED BY NORTHVIBE, URIELL, PAULO, AND PINBILL @@@@@
  66. '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  67. '
  68. '
  69. '@ LE Conversion By Dozer - 3D Models / Ramps / Tex by DARK / Flupper @
  70. '@@@@@@ Crossbow Technical Support provided by PinBill @@@@@@@@
  71.  
  72. Option Explicit
  73. Randomize
  74.  
  75. On Error Resume Next
  76. ExecuteGlobal GetTextFile("controller.vbs")
  77. If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
  78. On Error Goto 0
  79.  
  80. Const UseVPMModSol = 1 ' Don't touch this.
  81. Const Dozer_Cab = 0 ' Don't touch this either.
  82.  
  83. 'You can change these :)
  84.  
  85. '@@@@@ GFX OPTIONS START @@@@@@
  86.  
  87. Const Flasher_Halo = 1 ' Render flasher halos on the table.
  88. Const Laser_Mod = 1 ' Draw a laser beam when the crossbow swings out.
  89. Const Crossbow_Model = 1 ' Render a model of a crossbow on the end of the crossbow mech.
  90. Const GiPulse = 1 'Dark GI transition - Leave at 0 for normal brightness playfield.
  91. Const BGAnimate = 1 'Animate Bicyle Girl when lift ramp is up.
  92. Const PWAnimate = 1 'Animate Prison Walker when doors are open.
  93. Const FullLengthWellWalkerShadow = 1 'Render a large WellWalker shadow almost full playfield length.
  94. Const RampAmbient = 1 'Render lights on the plastic ramps (Upper lights near backwall will always be active).
  95.  
  96. '@@@@@ GFX OPTIONS END @@@@@@
  97.  
  98. If RampAmbient = 1 Then
  99. RL1.Intensity = 5
  100. RL2.Intensity = 5
  101. RL3.Intensity = 5
  102. RL4.Intensity = 5
  103. RL5.Intensity = 5
  104. RL6.Intensity = 5
  105. RL7.Intensity = 5
  106. RL8.Intensity = 5
  107. else
  108. RL1.Intensity = 0
  109. RL2.Intensity = 0
  110. RL3.Intensity = 0
  111. RL4.Intensity = 0
  112. RL5.Intensity = 0
  113. RL6.Intensity = 0
  114. RL7.Intensity = 0
  115. RL8.Intensity = 0
  116. End If
  117.  
  118. If FullLengthWellWalkerShadow = 1 Then
  119. Flasher2.visible = 1
  120. else
  121. Flasher2.visible = 0
  122. End If
  123.  
  124. 'If DarkWellWalker = 1 Then
  125. 'WellZombie.visible = 1
  126. 'WellZombie1.visible = 0
  127. 'else
  128. 'WellZombie.visible = 0
  129. 'WellZombie1.visible = 1
  130. 'End If
  131.  
  132. Dim xxf
  133.  
  134. If Flasher_Halo = 1 Then
  135. for each xxf In Halos:xxf.visible = 1:next
  136. else
  137. for each xxf In Halos:xxf.visible = 0:next
  138. End If
  139.  
  140. 'If Puppy_Mod = 1 Then
  141. 'Puppy.Visible = 1
  142. 'Primitive_bicycleGirlHAIR.visible = 0
  143. 'BGirl.visible = 0
  144. 'else
  145. 'Puppy.Visible = 0
  146. 'Primitive_bicycleGirlHAIR.visible = 1
  147. 'BGirl.visible = 1
  148. 'End If
  149.  
  150. If Crossbow_Model = 1 Then
  151. Cannon_Locater.visible = 1
  152. else
  153. Cannon_Locater.visible = 0
  154. End If
  155.  
  156. Dim VarHidden, UseVPMDMD
  157. If table.ShowDT = true then
  158. UseVPMDMD = true
  159. VarHidden = 1
  160. Ramp19.visible = 1
  161. Ramp18.visible = 1
  162. TextBox.visible = true
  163. else
  164. Ramp19.visible = 0
  165. Ramp18.visible = 0
  166. UseVPMDMD = false
  167. VarHidden = 0
  168. TextBox.visible = false
  169. end if
  170.  
  171. LoadVPM "01560000", "sam.VBS", 3.10
  172.  
  173. '********************
  174. 'Standard definitions
  175. '********************
  176.  
  177. Const cGameName = "twd_156h" 'change the romname here
  178.  
  179. Const UseSolenoids = 1
  180. Const UseLamps = 0
  181. Const UseSync = 1
  182. Const HandleMech = 0
  183.  
  184. 'Standard Sounds
  185. Const SSolenoidOn = "Solenoid"
  186. Const SSolenoidOff = ""
  187. Const SCoin = "coin"
  188.  
  189. '********************************************************************
  190.  
  191. '************
  192. ' Table init.
  193. '************
  194. 'Variables
  195. Dim xx
  196. Dim Bump1,Bump2,Bump3,Mech3bank,bsTrough,bsVUK,visibleLock,bsTEject,bsceject
  197. Dim dtUDrop,dtLDrop,dtRDrop
  198. Dim PlungerIM
  199. Dim PMag, DMag, WMag
  200.  
  201.  
  202. Sub Table_Init
  203. With Controller
  204. vpmInit Me
  205. .GameName = cGameName
  206. If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
  207. .SplashInfoLine = "The Walking Dead"
  208. .HandleKeyboard = 0
  209. .ShowTitle = 0
  210. .ShowDMDOnly = 1
  211. .ShowFrame = 0
  212. .HandleMechanics = 1
  213. .Hidden = 0
  214. .Games(cGameName).Settings.Value("sound") = 1
  215. On Error Resume Next
  216. .Run GetPlayerHWnd
  217. If Err Then MsgBox Err.Description
  218. End With
  219.  
  220.  
  221. On Error Goto 0
  222.  
  223. '**Trough
  224. Set bsTrough = New cvpmBallStack
  225. bsTrough.InitSw 0, 21, 20, 19, 18, 0, 0, 0
  226. bsTrough.InitKick BallRelease, 90, 8
  227. bsTrough.InitExitSnd SoundFX("ballrel",DOFContactors), SoundFX("fxSolenoid",DOFContactors)
  228. bsTrough.Balls = 4
  229.  
  230. Set PMag=New cvpmMagnet
  231. PMag.InitMagnet PrisonMag,42
  232. PMag.GrabCenter=False
  233.  
  234. Set WMag=New cvpmMagnet
  235. WMag.InitMagnet WWMag,42
  236. WMag.GrabCenter=False
  237.  
  238. Set DMag=New cvpmMagnet
  239. DMag.InitMagnet Divmagnet,100
  240. DMag.GrabCenter=True
  241.  
  242. '**Nudging
  243. vpmNudge.TiltSwitch=-7
  244. vpmNudge.Sensitivity=1
  245. vpmNudge.TiltObj=Array(LeftSlingshot,RightSlingshot)
  246.  
  247. Set dtLDrop = new cvpmDropTarget
  248. With dtLDrop
  249. .Initdrop Array(sw9, sw10, sw11), Array(9, 10, 11)
  250. .InitSnd SoundFX("droptarget_l",DOFDropTargets),SoundFX("resetdrop",DOFContactors)
  251. End With
  252.  
  253. '**Main Timer init
  254. PinMAMETimer.Interval = PinMAMEInterval
  255. PinMAMETimer.Enabled = 1
  256.  
  257.  
  258. bgwall1.isdropped = 1
  259. bgwall2.isdropped = 1
  260.  
  261. End Sub
  262.  
  263. '*****Keys
  264. Sub Table_KeyDown(ByVal Keycode)
  265. 'If Keycode = 3 Then lpos=1:Laser.enabled = 1:cbdir=1:Darryl.enabled = 1
  266. If Keycode = LeftFlipperKey then
  267. 'SolLFlipper true
  268. End If
  269. If Keycode = RightFlipperKey then
  270. 'SolRFlipper true
  271. End If
  272. If keycode = PlungerKey Then
  273. Plunger.Pullback
  274. If NOT Controller.Switch(23) = True Then
  275. Controller.Switch(71) = 1
  276. End If
  277. End If
  278. If keycode = LeftTiltKey Then nudgebobble(keycode):End If
  279. If keycode = RightTiltKey Then nudgebobble(keycode):End If
  280. If Keycode = StartGameKey Then Controller.Switch(16) = 1
  281. ' If keycode = CenterTiltKey Then CenterNudge 0, 1, 25 End If
  282. If keycode = RightMagnaSave Then Controller.Switch(71) = 1
  283. If vpmKeyDown(keycode) Then Exit Sub
  284. End Sub
  285.  
  286. Sub Table_KeyUp(ByVal keycode)
  287. If vpmKeyUp(keycode) Then Exit Sub
  288. If keycode = PlungerKey Then dmag.MagnetOn = False
  289. If Keycode = LeftFlipperKey then
  290. SolLFlipper false
  291. End If
  292. If Keycode = RightFlipperKey then
  293. SolRFlipper False
  294. End If
  295. If Keycode = StartGameKey Then Controller.Switch(16) = 0
  296. If keycode = RightMagnaSave Then Controller.Switch(71) = 0
  297. If keycode = PlungerKey Then
  298. Plunger.Fire
  299. PlaySound "plunger"
  300. Controller.Switch(71) = 0
  301. End If
  302. End Sub
  303.  
  304.  
  305. 'Solenoids
  306. SolCallback(1) = "solTrough"
  307. SolCallback(2) = "solAutofire"
  308. SolCallback(3) = "PrisonDoorsPower"
  309. SolCallback(4) = "PrisonDoorsHold"
  310. SolCallback(6) = "WMag.MagnetOn="
  311. SolCallback(5) = "DMag.MagnetOn="
  312. SolCallback(7) = "PMag.MagnetOn="
  313. SolCallback(9) = "SolLeftPop" 'left pop bumper
  314. SolCallback(10) = "SolRightPop" 'right pop bumper
  315. SolCallback(11) = "SolTopPop" 'top pop bumper
  316. SolCallback(12) = "SolLeftBank"
  317. SolCallback(15) = "SolLFlipper"
  318. SolCallback(16) = "SolRFlipper"
  319. SolModCallback(17) = "Sol17"
  320. SolModCallback(18) = "Sol18"
  321. SolModCallback(19) = "WellWalkerFlash" 'wellwalker flasher
  322. SolCallback(21) = "Dazz_Motor" 'horde flasher
  323. SolModCallback(22) = "Sol22"
  324. SolModCallback(23) = "Sol23"
  325. SolCallback(24) = "vpmSolSound SoundFX(""knocker"",DOFKnocker),"
  326. SolModCallback(25) = "FlashPops" 'flash pops
  327. SolModCallback(26) = "Prison_Top" 'prison top flasher
  328. SolModCallback(27) = "Prison_Front" 'prison l/r flasher x2
  329. SolModCallback(28) = "LeftDome" 'left dome flasher
  330. SolModCallback(29) = "RightDome" 'right dome flasher
  331. SolModCallback(32) = "Sol32" 'center lane flasher
  332. SolModCallback(20) = "Sol20"
  333. SolModCallback(31) = "Sol31"
  334. SolCallback(51) = "Shoot_Cannon"
  335. SolCallback(52) = "DT_Down"
  336. SolCallback(53) = "DT_UP"
  337. SolCallback(56) = "Corpse_Ramp"
  338.  
  339. Sub DT_Down(Enabled)
  340. If enabled Then
  341. WDDT.isdropped = 1
  342. Controller.Switch(48) = 1
  343. PlaySound SoundFX("DTR",DOFTargets)
  344. End If
  345. End Sub
  346.  
  347. Sub DT_Up(Enabled)
  348. If enabled Then
  349. WDDT.isdropped = 0
  350. Controller.Switch(48) = 0
  351. PlaySound SoundFX("DTR",DOFTargets)
  352. End If
  353. End Sub
  354.  
  355. Sub WDDT_Hit()
  356. vpmTimer.PulseSw 48
  357. End Sub
  358.  
  359. Sub Prison_Top(Enabled)
  360. F26a.Intensity = Enabled / 5
  361. F26b.Intensity = Enabled / 5
  362. End Sub
  363.  
  364. Sub Prison_Front(Enabled)
  365. F27a.Intensity = Enabled / 5
  366. F27b.Intensity = Enabled / 5
  367. Flasher3.Opacity = Enabled / 5
  368. f28a2.Intensity = Enabled / 5
  369. If enabled < 200 Then
  370. Flasher5.opacity = Enabled / 5
  371. End If
  372. If enabled > 20 Then
  373. Barn.image = "prisonmap_s"
  374. else
  375. Barn.image = "prisonmap"
  376. End If
  377. If LampState(106) AND LampState(107) AND LampState(108) < 100 Then
  378. Flasher2.Opacity = Enabled / 5
  379. else
  380. Flasher2.Opacity = 0
  381. End If
  382. End Sub
  383.  
  384. Sub Sol31(Enabled)
  385. F31a.Intensity = Enabled / 5
  386. F31b.Intensity = Enabled / 5
  387. End Sub
  388.  
  389. Sub Sol32(Enabled)
  390. F32.Intensity = Enabled / 5
  391. End Sub
  392.  
  393. Sub Sol20(Enabled)
  394. F20a.Intensity = Enabled / 5
  395. F20b.Intensity = Enabled / 5
  396. End Sub
  397.  
  398. Sub Sol23(Enabled)
  399. F23c.Intensity = Enabled / 5
  400. 'F20b.Intensity = Enabled / 5
  401. End Sub
  402.  
  403. Sub Sol17(Enabled)
  404. F17.Intensity = Enabled / 5
  405. F17F.opacity = Enabled
  406. F17s.opacity = Enabled / 5
  407. 'F20b.Intensity = Enabled / 5
  408. End Sub
  409.  
  410. Sub Sol18(Enabled)
  411. F18.Intensity = Enabled / 5
  412. F18F.opacity = Enabled
  413. 'F20b.Intensity = Enabled / 5
  414. End Sub
  415.  
  416. Sub Sol22(Enabled)
  417. F22.Intensity = Enabled / 5
  418. F22F.opacity = Enabled
  419. F22S.opacity = Enabled / 5
  420. 'F20b.Intensity = Enabled / 5
  421. End Sub
  422.  
  423. Sub PrisonDoorsPower(Enabled)
  424. 'debug.print "Door Power " & enabled & ", " & timer
  425. If Enabled Then 'Open Door
  426. prisonstate = false
  427. 'WWRL1.visible = 0
  428. PlaySound SoundFX("fx_solenoid",DOFContactors)
  429. PrisonT.enabled = true
  430. gspos = 1:gateshadow.enabled = 1
  431. If PWAnimate = 1 Then
  432. pwpos = 1
  433. pwt.enabled = 1
  434. End If
  435. End If
  436. End Sub
  437.  
  438. Sub PrisonDoorsHold(Enabled)
  439. 'debug.print "Door Hold " & enabled & ", " & timer
  440. If Enabled Then
  441.  
  442. Else 'Close Door
  443. prisonstate = true
  444. 'WWRL1.visible = 1
  445. PlaySound SoundFX("fx_solenoid",DOFContactors)
  446. PrisonT.enabled = true
  447. gspos1 = 1:gateshadowc.enabled = 1
  448. pwt.enabled = 0
  449. Primitive271.RotY = 0
  450. Primitive271.RotX = 114
  451. End If
  452. End Sub
  453.  
  454. Sub SolLeftBank(Enabled)
  455. If Enabled Then
  456. dtLDrop.DropSol_On
  457. End If
  458. End Sub
  459.  
  460. Sub WellWalkerFlash(Enabled)
  461. F19a.Intensity = Enabled
  462. F28a1.Intensity = Enabled
  463. If Enabled > 0 Then
  464. WellZombie.image = "wellzombie4_u"
  465. else
  466. WellZombie.image = "WellWalkerCompleteMap"
  467. End If
  468. End Sub
  469.  
  470. Sub FlashPops(Enabled)
  471. F25a.Intensity = Enabled / 5
  472. F25b.Intensity = Enabled / 30
  473. End Sub
  474.  
  475. Sub LeftDome(Enabled)
  476. F28_Flash.opacity = Enabled * 10
  477. F28a.Intensity = Enabled / 20
  478. F28b.Intensity = Enabled
  479. F28d.opacity = Enabled * 4
  480. If Enabled > 20 AND LampState(106) AND LampState(107) AND LampState(108) < 100 Then
  481. WellZombie.image = "wellzombie4_l"
  482. 'WellZombie1.image = "wellzombie4_l_F"
  483. else
  484. WellZombie.image = "wellwalkercompletemap"
  485. 'WellZombie1.image = "wellzombie4"
  486. End If
  487. Flasher4.opacity = Enabled / 5
  488. End Sub
  489.  
  490. Sub RightDome(Enabled)
  491. F29_Flash.opacity = Enabled * 10
  492. F29a.Intensity = Enabled / 20
  493. F29b.Intensity = Enabled
  494. F29d.opacity = Enabled * 4
  495. If Enabled > 20 AND LampState(106) AND LampState(107) AND LampState(108) < 100 Then
  496. WellZombie.image = "wellzombie4_r"
  497. 'WellZombie1.image = "wellzombie4_r_F"
  498. else
  499. WellZombie.image = "wellwalkercompletemap"
  500. 'WellZombie1.image = "wellzombie4"
  501. End If
  502. Flasher1.opacity = Enabled / 5
  503. End Sub
  504.  
  505. Sub SolTopPop(Enabled)
  506. If Enabled Then
  507. SetLamp 60, 1
  508. Primitive5.Image = "bulb red on"
  509. Else
  510. SetLamp 60, 0
  511. Primitive5.Image = "bulb red off"
  512. End If
  513. End Sub
  514.  
  515. Sub SolRightPop(Enabled)
  516. If Enabled Then
  517. SetLamp 61, 1
  518. Primitive4.Image = "bulb red on"
  519. Else
  520. SetLamp 61, 0
  521. Primitive4.Image = "bulb red off"
  522. End If
  523. End Sub
  524.  
  525. Sub SolLeftPop(Enabled)
  526. If Enabled Then
  527. SetLamp 62, 1
  528. Primitive3.Image = "bulb red on"
  529. Else
  530. SetLamp 62, 0
  531. Primitive3.Image = "bulb red off"
  532. End If
  533. End Sub
  534.  
  535. Sub solTrough(Enabled)
  536. If Enabled Then
  537. bsTrough.ExitSol_On
  538. vpmTimer.PulseSw 22
  539. End If
  540. End Sub
  541.  
  542. Sub solAutofire(Enabled)
  543. If Enabled Then
  544. PlungerIM.AutoFire
  545. End If
  546. End Sub
  547.  
  548. 'primitive flippers!
  549. dim MotorCallback
  550. Set MotorCallback = GetRef("GameTimer")
  551. Sub GameTimer
  552. UpdateFlipperLogos
  553. End Sub
  554.  
  555. Sub UpdateFlipperLogos
  556. LFLogo.RotY = LeftFlipper.CurrentAngle
  557. RFlogo.RotY = RightFlipper.CurrentAngle
  558. End Sub
  559.  
  560. Sub SolLFlipper(Enabled)
  561. If Enabled Then
  562. PlaySound SoundFX("FlipperUpLeft",DOFFlippers)
  563. LeftFlipper.RotateToEnd:
  564. Else
  565. PlaySound SoundFX("FlipperDown",DOFFlippers)
  566. LeftFlipper.RotateToStart:
  567. End If
  568. End Sub
  569.  
  570. Sub SolRFlipper(Enabled)
  571. If Enabled Then
  572. PlaySound SoundFX("FlipperUpRight",DOFFlippers)
  573. RightFlipper.RotateToEnd
  574. Else
  575. PlaySound SoundFX("FlipperDown",DOFFlippers)
  576. RightFlipper.RotateToStart
  577. End If
  578. End Sub
  579.  
  580. Sub Drain_Hit
  581. PlaySound "Drain"
  582. bsTrough.AddBall Me
  583. End Sub
  584.  
  585. Sub RLS_Timer()
  586. sw34p.RotX = -(sw34.currentangle)
  587. sw35p.RotX = -(sw35.currentangle)
  588. sw42p.RotX = -(sw42.currentangle)
  589. sw43p.RotX = -(sw43.currentangle)
  590. End Sub
  591.  
  592.  
  593. Sub WZ_Init
  594. Controller.Switch (2) = 1
  595. End Sub
  596.  
  597. Dim WZOpen:WZOpen = False
  598.  
  599. Sub WZT_Timer()
  600. If WZOpen = True then wzf.rotatetoend 'WellZombie.ObjRotX = WellZombie.ObjRotX + 4
  601. If WZOpen = False then wzf.rotatetostart 'WellZombie.ObjRotX = WellZombie.ObjRotX - 4
  602. If WellZombie.ObjRotX >= 30 then WZOpen = False: Controller.Switch (2) = 1
  603. WellZombie.ObjRotX = wzf.CurrentAngle
  604. 'WellZombie1.ObjRotX = wzf.CurrentAngle
  605. If WellZombie.ObjRotX >= 30 Then
  606. 'WW1.visible = 0
  607. wwst=1:ww_shadow.enabled = 1
  608. else
  609. 'WW1.visible = 1
  610. End if
  611. End Sub
  612.  
  613. Dim wwst
  614. wwst = 1
  615. Sub WW_Shadow_Timer()
  616. Select Case wwst
  617. Case 1:WW1.visible = 0:WW2.visible = 1:wwst = 2
  618. Case 2:WW2.visible = 0:WW3.visible = 1:wwst = 3
  619. Case 3:WW3.visible = 0:WW4.visible = 1:wwst = 4
  620. Case 4:WW4.visible = 0:WW5.visible = 1:wwst = 5
  621. Case 5:WW5.visible = 0:WW6.visible = 1:wwst = 6
  622. Case 6:WW6.visible = 0:WW7.visible = 1:wwst = 7
  623. Case 7:WW7.visible = 0:WW8.visible = 1:wwst = 8
  624.  
  625. Case 8:WW8.visible = 0:WW7.visible = 1:wwst = 9
  626. Case 9:WW7.visible = 0:WW6.visible = 1:wwst = 10
  627. Case 10:WW6.visible = 0:WW5.visible = 1:wwst = 11
  628. Case 11:WW5.visible = 0:WW4.visible = 1:wwst = 12
  629. Case 12:WW4.visible = 0:WW3.visible = 1:wwst = 13
  630. Case 13:WW3.visible = 0:WW2.visible = 1:wwst = 14
  631. Case 14:WW2.visible = 0:WW1.visible = 1:me.enabled = 0
  632.  
  633. End Select
  634. End Sub
  635.  
  636.  
  637. Sub WZ_Hit:Controller.Switch(2) = 0:WZOpen = True: Playsound "metalhit_thin":End Sub
  638.  
  639. Dim prisonstate
  640. prisonstate = False
  641. Sub PrisonT_Timer()
  642. If prisonstate = False then 'Opening
  643. If ld.ObjRotZ < 96 then
  644. ld.ObjRotZ = ld.ObjRotZ + 3
  645. rd.ObjRotZ = rd.ObjRotZ - 3
  646. Else
  647. PrisonT.Enabled = False
  648. Controller.Switch(4) = 1
  649. 'debug.print "Door Switch set"
  650. 'prisonstate = True
  651. End If
  652. sw4.isdropped = true
  653. Else 'Closing
  654. If ld.ObjRotZ > 0 then
  655. ld.ObjRotZ = ld.ObjRotZ - 3
  656. rd.ObjRotZ = rd.ObjRotZ + 3
  657. Else
  658. PrisonT.Enabled = False
  659. Controller.Switch(4) = 0
  660. 'debug.print "Door Switch open"
  661. 'prisonstate = False
  662. End If
  663. sw4.isdropped = false
  664. End If
  665. ld1.ObjRotZ = ld.ObjRotZ
  666. rd1.ObjRotZ = rd.ObjRotZ
  667. 'if ld.ObjRotZ > 15 then sw4.isdropped = true else sw4.isdropped = false
  668. End Sub
  669.  
  670. Dim xlss
  671.  
  672. Sub Dazz_Motor(enabled)
  673. If enabled Then
  674. cbdir = 1
  675. Darryl.enabled = 1
  676. If Laser_Mod = 1 Then
  677. lpos = 1
  678. laser.enabled = 1
  679. End If
  680. prim_ball.enabled = 1
  681. else
  682. laser.enabled = 0
  683. Darryl.enabled = 0
  684. for each xlss In PewPew:xlss.state = 0:next
  685. Crossbow.RotY = 119.9
  686. Ball.ObjRotZ = 299
  687. Cannon_Locater.RotZ = 0
  688. End If
  689. End Sub
  690.  
  691. Dim cbdir, ckdir, ccount
  692.  
  693. cbdir = 1
  694.  
  695. Sub Darryl_Timer()
  696. PlaySound SoundFX("bridge2",DOFGear), , 0.001
  697. ckdir = Crossbow.RotY - 180
  698. Select Case cbdir
  699.  
  700. Case 1:
  701. If Crossbow.RotY => 122 Then
  702. Controller.Switch(50) = 0
  703. Controller.Switch(52) = 0
  704. End If
  705.  
  706. If Crossbow.RotY => 160 Then
  707. Controller.Switch(51) = 1
  708. End If
  709.  
  710. If Crossbow.RotY => 198 Then
  711. cbdir = 3
  712. End If
  713. Crossbow.RotY = Crossbow.RotY + 0.4
  714. Ball.ObjRotZ = Ball.ObjRotZ + 0.4
  715. Cannon_Locater.RotZ = Cannon_Locater.RotZ + 0.4
  716.  
  717. Case 2:
  718. If Crossbow.RotY <= 122 Then
  719. Controller.Switch(50) = 1
  720. End If
  721.  
  722. If Crossbow.RotY <= 160 Then
  723. Controller.Switch(51) = 0
  724. End If
  725.  
  726. If Crossbow.RotY <= 119.7 Then
  727. me.enabled = 0 'cbdir = 1
  728. End If
  729. Crossbow.RotY = Crossbow.RotY - 0.4
  730. Ball.ObjRotZ = Ball.ObjRotZ - 0.4
  731. Cannon_Locater.RotZ = Cannon_Locater.RotZ - 0.4
  732.  
  733.  
  734. Case 3:
  735. laser.enabled = 0
  736. If ccount = 20 Then
  737. cbdir = 2
  738. ccount = 0
  739. If laser_mod = 1 Then
  740. laser.enabled = 1
  741. End If
  742. End If
  743. ccount = ccount + 1
  744. End Select
  745. End Sub
  746.  
  747. Sub prim_ball_Timer()
  748. If bic = 1 AND darryl.enabled = True Then
  749. If Ball.Transz => -350 Then
  750. me.enabled = 0
  751. End If
  752. Ball.TransZ = Ball.TransZ + 1
  753. End If
  754. End Sub
  755.  
  756. Dim Lpos
  757. lpos = 1
  758. Sub Laser_Timer()
  759. Select Case lpos
  760. Case 1:LZ1.State = 1:lpos=2
  761. Case 2:LZ1.State = 0:LZ2.State = 1:lpos=3
  762. Case 3:LZ2.State = 0:LZ3.State = 1:lpos=4
  763. Case 4:LZ3.State = 0:LZ4.State = 1:lpos=5
  764. Case 5:LZ4.State = 0:LZ5.State = 1:lpos=6
  765. Case 6:LZ5.State = 0:LZ6.State = 1:lpos=7
  766. Case 7:LZ6.State = 0:LZ7.State = 1:lpos=8
  767. Case 8:LZ7.State = 0:LZ8.State = 1:lpos=9
  768. Case 9:LZ8.State = 0:LZ9.State = 1:lpos=10
  769. Case 10:LZ9.State = 0:LZ10.State = 1:lpos=11
  770. Case 11:LZ10.State = 0:LZ11.State = 1:lpos=12
  771. Case 12:LZ11.State = 0:LZ12.State = 1:lpos=13
  772. Case 13:LZ12.State = 0:LZ13.State = 1:lpos=14
  773. Case 14:LZ13.State = 0:LZ14.State = 1:lpos=15
  774. Case 15:LZ14.State = 0:LZ15.State = 1:lpos=16
  775. Case 16:LZ15.State = 0:LZ16.State = 1:lpos=17
  776. Case 17:LZ16.State = 0:LZ17.State = 1:lpos=18
  777. Case 18:LZ17.State = 0:LZ18.State = 1:lpos=19
  778. Case 19:LZ18.State = 0:LZ19.State = 1:lpos=20
  779. Case 20:LZ19.State = 0:LZ20.State = 1:lpos=21
  780. Case 21:LZ20.State = 0:LZ21.State = 1:lpos=22
  781. Case 22:LZ21.State = 0:LZ22.State = 1:lpos=23
  782. Case 23:LZ22.State = 0:LZ23.State = 1:lpos=24
  783. Case 24:LZ23.State = 0:LZ24.State = 1:lpos=25
  784. Case 25:LZ24.State = 0:LZ25.State = 1:lpos=26
  785. Case 26:LZ25.State = 0:LZ26.State = 1:lpos=27
  786. Case 27:LZ26.State = 0:LZ27.State = 1:lpos=28
  787. Case 28:LZ27.State = 0:LZ28.State = 1:lpos=29
  788. Case 29:LZ28.State = 0:LZ29.State = 1:lpos=30
  789. Case 30:LZ29.State = 0:LZ30.State = 1:lpos=31
  790. Case 31:LZ30.State = 0:LZ31.State = 1:lpos=32
  791. Case 32:LZ31.State = 0:LZ32.State = 1:lpos=33
  792. Case 33:LZ32.State = 0:LZ33.State = 1:lpos=34
  793. Case 34:LZ33.State = 0:LZ34.State = 1:lpos=35
  794. Case 35:LZ34.State = 0:LZ35.State = 1:lpos=36
  795. Case 36:LZ35.State = 0:LZ36.State = 1:lpos=37
  796. Case 37:LZ36.State = 0:LZ37.State = 1:lpos=38
  797. Case 38:LZ37.State = 0:LZ38.State = 1:lpos=39
  798. Case 39:LZ38.State = 0:LZ39.State = 1:lpos=40
  799. Case 40:LZ39.State = 0:LZ40.State = 1:lpos=41
  800. Case 41:LZ40.State = 0:LZ41.State = 1:lpos=42
  801. Case 42:LZ41.State = 0:LZ42.State = 1:LZF42.visible = 1:lpos=43
  802. Case 43:LZ42.State = 0:LZ43.State = 1:lpos=44
  803. Case 44:LZ43.State = 0:LZ44.State = 1:lpos=45
  804. Case 45:LZ44.State = 0:LZ45.State = 1:LZF42.visible = 0:lpos=46
  805. Case 46:LZ45.State = 0:LZ46.State = 1:lpos=47
  806. Case 47:LZ46.State = 0:LZ47.State = 1:lpos=48
  807. Case 48:LZ47.State = 0:LZ48.State = 1:lpos=49
  808. Case 49:LZ48.State = 0:LZ49.State = 1:LZF50.visible = 1:lpos=50
  809. Case 50:LZ49.State = 0:LZ50.State = 1:lpos=51
  810. Case 51:LZ50.State = 0:LZ51.State = 1:lpos=52
  811. Case 52:LZ51.State = 0:LZ52.State = 1:lpos=53
  812. Case 53:LZ52.State = 0:LZ53.State = 1:lpos=54
  813. Case 54:LZ53.State = 0:LZ54.State = 1:lpos=55
  814. Case 55:LZ54.State = 0:LZ55.State = 1:LZF50.visible = 0:lpos=56
  815. Case 56:LZ55.State = 0:LZ56.State = 1:lpos=57
  816. Case 57:LZ56.State = 0:LZ57.State = 1:lpos=58
  817. Case 58:LZ57.State = 0:LZ58.State = 1:lpos=59
  818. Case 59:LZ58.State = 0:LZ59.State = 1:lpos=60
  819. Case 60:LZ59.State = 0:LZ60.State = 1:lpos=61
  820. Case 61:LZ60.State = 0:LZ61.State = 1:lpos=62
  821. Case 62:LZ61.State = 0:LZ62.State = 1:lpos=63
  822. Case 63:LZ62.State = 0:LZ63.State = 1:lpos=64
  823. Case 64:LZ63.State = 0:LZ64.State = 1:lpos=65
  824. Case 65:LZ64.State = 0:LZ65.State = 1:lpos=66
  825. Case 66:LZ65.State = 0:LZ66.State = 1:lpos=67
  826. Case 67:LZ66.State = 0:LZ67.State = 1:lpos=68
  827. Case 68:LZ67.State = 0:LZ68.State = 1:lpos=69
  828. Case 69:LZ68.State = 0:LZ69.State = 1:lpos=70
  829. Case 70:LZ69.State = 0:LZ70.State = 1:LZF70.visible = 1:lpos=71
  830. Case 71:LZ70.State = 0:LZ71.State = 1:lpos=72
  831. Case 72:LZ71.State = 0:LZ72.State = 1:lpos=73
  832. Case 73:LZ72.State = 0:LZ73.State = 1:lpos=74
  833. Case 74:LZ73.State = 0:LZ74.State = 1:lpos=75
  834. Case 75:LZ74.State = 0:LZ75.State = 1:LZF70.visible = 0:lpos=76
  835. Case 76:LZ75.State = 0:LZ76.State = 1:lpos=77
  836. Case 77:LZ76.State = 0:LZ77.State = 1:lpos=78
  837. Case 78:LZ77.State = 0:LZ78.State = 1:lpos=79
  838. Case 79:LZ78.State = 0:LZ79.State = 1:lpos=200
  839.  
  840. Case 200:lpos = 201
  841. Case 201:lpos = 80
  842.  
  843. Case 80:LZ79.State = 0:LZ78.State = 1:lpos=81
  844. Case 81:LZ78.State = 0:LZ77.State = 1:lpos=82
  845. Case 82:LZ77.State = 0:LZ76.State = 1:lpos=83
  846. Case 83:LZ76.State = 0:LZ75.State = 1:lpos=84
  847. Case 84:LZ75.State = 0:LZ74.State = 1:lpos=85
  848. Case 85:LZ74.State = 0:LZ73.State = 1:lpos=86
  849. Case 86:LZ73.State = 0:LZ72.State = 1:lpos=87
  850. Case 87:LZ72.State = 0:LZ71.State = 1:lpos=88
  851. Case 88:LZ71.State = 0:LZ70.State = 1:lpos=89
  852. Case 89:LZ70.State = 0:LZ69.State = 1:LZF70.visible = 1:lpos=90
  853. Case 90:LZ69.State = 0:LZ68.State = 1:lpos=91
  854. Case 91:LZ68.State = 0:LZ67.State = 1:lpos=92
  855. Case 92:LZ67.State = 0:LZ66.State = 1:lpos=93
  856. Case 93:LZ66.State = 0:LZ65.State = 1:LZF70.visible = 0:lpos=94
  857. Case 94:LZ65.State = 0:LZ64.State = 1:lpos=95
  858. Case 95:LZ64.State = 0:LZ63.State = 1:lpos=96
  859. Case 96:LZ63.State = 0:LZ62.State = 1:lpos=97
  860. Case 97:LZ62.State = 0:LZ61.State = 1:lpos=98
  861. Case 98:LZ61.State = 0:LZ60.State = 1:lpos=99
  862. Case 99:LZ60.State = 0:LZ59.State = 1:lpos=100
  863. Case 100:LZ59.State = 0:LZ58.State = 1:lpos=101
  864. Case 101:LZ58.State = 0:LZ57.State = 1:lpos=102
  865. Case 102:LZ57.State = 0:LZ56.State = 1:lpos=103
  866. Case 103:LZ56.State = 0:LZ55.State = 1:lpos=104
  867. Case 104:LZ55.State = 0:LZ54.State = 1:lpos=105
  868. Case 105:LZ54.State = 0:LZ53.State = 1:lpos=106
  869. Case 106:LZ53.State = 0:LZ52.State = 1:lpos=107
  870. Case 107:LZ52.State = 0:LZ51.State = 1:lpos=108
  871. Case 108:LZ51.State = 0:LZ50.State = 1:LZF50.visible = 1:lpos=109
  872. Case 109:LZ50.State = 0:LZ49.State = 1:lpos=110
  873. Case 110:LZ49.State = 0:LZ48.State = 1:lpos=111
  874. Case 111:LZ48.State = 0:LZ47.State = 1:lpos=112
  875. Case 112:LZ47.State = 0:LZ46.State = 1:lpos=113
  876. Case 113:LZ46.State = 0:LZ45.State = 1:LZF50.visible = 0:lpos=114
  877. Case 114:LZ45.State = 0:LZ44.State = 1:lpos=115
  878. Case 115:LZ44.State = 0:LZ43.State = 1:lpos=116
  879. Case 116:LZ43.State = 0:LZ42.State = 1:lpos=117
  880. Case 117:LZ42.State = 0:LZ41.State = 1:LZF42.visible = 1:lpos=118
  881. Case 118:LZ41.State = 0:LZ40.State = 1:lpos=119
  882. Case 119:LZ40.State = 0:LZ39.State = 1:lpos=120
  883. Case 120:LZ39.State = 0:LZ38.State = 1:lpos=121
  884. Case 121:LZ38.State = 0:LZ37.State = 1:LZF42.visible = 0:lpos=122
  885. Case 122:LZ37.State = 0:LZ36.State = 1:lpos=123
  886. Case 123:LZ36.State = 0:LZ35.State = 1:lpos=124
  887. Case 124:LZ35.State = 0:LZ34.State = 1:lpos=125
  888. Case 125:LZ34.State = 0:LZ33.State = 1:lpos=126
  889. Case 126:LZ33.State = 0:LZ32.State = 1:lpos=127
  890. Case 127:LZ32.State = 0:LZ31.State = 1:lpos=128
  891. Case 128:LZ31.State = 0:LZ30.State = 1:lpos=129
  892. Case 129:LZ30.State = 0:LZ29.State = 1:lpos=130
  893. Case 130:LZ29.State = 0:LZ28.State = 1:lpos=131
  894. Case 131:LZ28.State = 0:LZ27.State = 1:lpos=132
  895. Case 132:LZ27.State = 0:LZ26.State = 1:lpos=133
  896. Case 133:LZ26.State = 0:LZ25.State = 1:lpos=134
  897. Case 134:LZ25.State = 0:LZ24.State = 1:lpos=135
  898. Case 135:LZ24.State = 0:LZ23.State = 1:lpos=136
  899. Case 136:LZ23.State = 0:LZ22.State = 1:lpos=137
  900. Case 137:LZ22.State = 0:LZ21.State = 1:lpos=138
  901. Case 138:LZ21.State = 0:LZ20.State = 1:lpos=139
  902. Case 139:LZ20.State = 0:LZ19.State = 1:lpos=140
  903. Case 140:LZ19.State = 0:LZ18.State = 1:lpos=141
  904. Case 141:LZ18.State = 0:LZ17.State = 1:lpos=142
  905. Case 142:LZ17.State = 0:LZ16.State = 1:lpos=143
  906. Case 143:LZ16.State = 0:LZ15.State = 1:lpos=144
  907. Case 144:LZ15.State = 0:LZ14.State = 1:lpos=145
  908. Case 145:LZ14.State = 0:LZ13.State = 1:lpos=146
  909. Case 146:LZ13.State = 0:LZ12.State = 1:lpos=147
  910. Case 147:LZ12.State = 0:LZ11.State = 1:lpos=148
  911. Case 148:LZ11.State = 0:LZ10.State = 1:lpos=149
  912. Case 149:LZ10.State = 0:LZ9.State = 1:lpos=150
  913. Case 150:LZ9.State = 0:LZ8.State = 1:lpos=151
  914. Case 151:LZ8.State = 0:LZ7.State = 1:lpos=152
  915. Case 152:LZ7.State = 0:LZ6.State = 1:lpos=153
  916. Case 153:LZ6.State = 0:LZ5.State = 1:lpos=154
  917. Case 154:LZ5.State = 0:LZ4.State = 1:lpos=155
  918. Case 155:LZ4.State = 0:LZ3.State = 1:lpos=156
  919. Case 156:LZ3.State = 0:LZ2.State = 1:lpos=157
  920. Case 157:LZ2.State = 0:LZ1.State = 1:lpos=162
  921. Case 162:LZ1.State = 0:me.enabled = 0
  922. End Select
  923. End Sub
  924.  
  925. Dim bic
  926. Sub Cannon_Load_Hit()
  927. bic = 1
  928. PlaySound "kicker_enter_center"
  929. me.destroyball
  930. Ball.visible = 1
  931. Cannon_Fire.createball
  932. Controller.Switch(52) = 1
  933. End Sub
  934.  
  935. Sub Shoot_Cannon(Enabled)
  936. If enabled Then
  937. bic = 0
  938. Cannon_Fire.kick ckdir, 50
  939. 'Controller.Switch(52) = 0
  940. Ball.visible = 0
  941. Ball.Transz = -405
  942. playsound SoundFX("popper_ball",DOFContactors)
  943. End If
  944. End Sub
  945.  
  946. Sub Left_Spinner_Spin()
  947. vpmTimer.PulseSw 40
  948. PlaySound "fx_spinner"
  949. End Sub
  950.  
  951. Sub Right_Spinner_Spin()
  952. vpmTimer.PulseSw 1
  953. PlaySound "fx_spinner"
  954. End Sub
  955.  
  956. Sub sw49_Hit()
  957. vpmTimer.PulseSw 49
  958. BGirl.TransY = Bgirl.TransY + 5
  959. Primitive_bicycleGirlHAIR.TransY = Primitive_bicycleGirlHAIR.TransY + 5
  960. 'Puppy.TransY = Puppy.TransY + 5
  961. Playsound SoundFX("target",DOFShaker)
  962. me.timerenabled = 1
  963. End Sub
  964.  
  965. Sub sw49_Timer()
  966. BGirl.TransY = Bgirl.TransY - 5
  967. Primitive_bicycleGirlHAIR.TransY = Primitive_bicycleGirlHAIR.TransY - 5
  968. 'Puppy.TransY = Puppy.TransY - 5
  969. me.timerenabled = 0
  970. End Sub
  971.  
  972. Sub Corpse_Ramp(Enabled)
  973. If enabled Then
  974. brpos = 1
  975. Bottom_Ramp.enabled = 1
  976. If bganimate = 1 Then
  977. bgstep = 1
  978. Bicycle_Girl.enabled = 1
  979. End If
  980. else
  981. brpos = 2
  982. Bottom_Ramp.enabled = 1
  983. Bicycle_Girl.enabled = 0
  984. 'BGirl.RotY = -13
  985. 'BGirl.RotX = 105
  986. Home_BG
  987. End If
  988. End Sub
  989.  
  990.  
  991. Dim bgx, bgy
  992.  
  993. Sub Home_BG()
  994. bgx = BGirl.RotY
  995. bgy = BGirl.RotX
  996.  
  997. If BGirl.RotY = -13 Then
  998. Exit Sub
  999. End If
  1000.  
  1001. If BGirl.RotY < -13 Then
  1002. homeYAdd.enabled = 1
  1003. End If
  1004.  
  1005. If BGirl.RotY > -13 Then
  1006. homeYMinus.enabled = 1
  1007. End If
  1008.  
  1009. If BGirl.RotX = 105 Then
  1010. Exit Sub
  1011. End If
  1012.  
  1013. If BGirl.RotX > 105 Then
  1014. homeXMinus.enabled = 1
  1015. End If
  1016.  
  1017. End Sub
  1018.  
  1019. Sub homeYAdd_Timer()
  1020. If BGirl.RotY => -13 Then
  1021. BGirl.RotY = -13
  1022. me.enabled = 0
  1023. End If
  1024. BGirl.RotY = BGirl.RotY + 1
  1025. End Sub
  1026.  
  1027. Sub homeYMinus_Timer()
  1028. If BGirl.RotY <= -13 Then
  1029. BGirl.RotY = -13
  1030. me.enabled = 0
  1031. End If
  1032. BGirl.RotY = BGirl.RotY - 1
  1033. End Sub
  1034.  
  1035. Sub homeXMinus_Timer()
  1036. If BGirl.RotX <= 105 Then
  1037. BGirl.RotX = 105
  1038. me.enabled = 0
  1039. End If
  1040. BGirl.RotX = BGirl.RotX - 1
  1041. End Sub
  1042.  
  1043. Dim brpos
  1044.  
  1045. Sub Bottom_Ramp_Timer()
  1046. Select Case brpos
  1047. Case 1:
  1048. If RotXfrom74to90.RotX = 90 Then
  1049. RotXfrom74to90.RotX = 90
  1050. BotRamp1.collidable = 0
  1051. Botramp.visible = 0
  1052. BG_Lamp.state = 1
  1053. bg_lamp2.state = 1
  1054. bg_lamp3.state = 1
  1055. PlaySound SoundFX("fx_solenoid",DOFContactors)
  1056. bgwall1.isdropped = 0
  1057. bgwall2.isdropped = 0
  1058. me.enabled = 0
  1059. End If
  1060. RotXfrom74to90.RotX = RotXfrom74to90.RotX + 1
  1061. Case 2:
  1062. If RotXfrom74to90.RotX = 74 Then
  1063. RotXfrom74to90.RotX = 74
  1064. BotRamp1.collidable = 1
  1065. Botramp.visible = 1
  1066. BG_Lamp.state = 0
  1067. bg_lamp2.state = 0
  1068. bg_lamp3.state = 0
  1069. PlaySound SoundFX("fx_solenoid",DOFContactors)
  1070. bgwall1.isdropped = 1
  1071. bgwall2.isdropped = 1
  1072. me.enabled = 0
  1073. End If
  1074. RotXfrom74to90.RotX = RotXfrom74to90.RotX - 1
  1075. End Select
  1076. End Sub
  1077.  
  1078. Dim cgdown, cgdownon
  1079. Sub Cgrade_down_Timer()
  1080. cgdownon = 1
  1081. Select Case cgdown
  1082. Case 1:Table.ColorGradeImage = "ColorGrade_on":cgdown = 2
  1083. Case 2:Table.ColorGradeImage = "ColorGrade_7":cgdown = 3
  1084. Case 3:Table.ColorGradeImage = "ColorGrade_6":cgdown = 4
  1085. Case 4:Table.ColorGradeImage = "ColorGrade_5":cgdown = 5
  1086. Case 5:Table.ColorGradeImage = "ColorGrade_4":cgdown = 6
  1087. Case 6:Table.ColorGradeImage = "ColorGrade_4":cgdown = 7
  1088. Case 7:Table.ColorGradeImage = "ColorGrade_4":cgdown = 8
  1089. Case 8:Table.ColorGradeImage = "ColorGrade_4":cgdown = 9
  1090. Case 9:Table.ColorGradeImage = "ColorGrade_4_blue":cgupon = 0:me.enabled = 0
  1091. End Select
  1092. End Sub
  1093.  
  1094. Dim cgup, cgupon
  1095. Sub Cgrade_up_Timer()
  1096. cgupon = 1
  1097. Select Case cgup
  1098. Case 1:Table.ColorGradeImage = "ColorGrade_0":cgup = 2
  1099. Case 2:Table.ColorGradeImage = "ColorGrade_1":cgup = 3
  1100. Case 3:Table.ColorGradeImage = "ColorGrade_2":cgup = 4
  1101. Case 4:Table.ColorGradeImage = "ColorGrade_3":cgup = 5
  1102. Case 5:Table.ColorGradeImage = "ColorGrade_4":cgup = 6
  1103. Case 6:Table.ColorGradeImage = "ColorGrade_5":cgup = 7
  1104. Case 7:Table.ColorGradeImage = "ColorGrade_6":cgup = 8
  1105. Case 8:Table.ColorGradeImage = "ColorGrade_7":cgup = 9
  1106. Case 9:Table.ColorGradeImage = "ColorGrade_On":cgdownon = 0:me.enabled = 0
  1107. End Select
  1108. End Sub
  1109.  
  1110. Dim bgstep
  1111.  
  1112. bgstep = 1
  1113.  
  1114. Sub Bicycle_Girl_Timer
  1115. Select case bgstep
  1116. Case 1:
  1117. If BGirl.RotY <= -25 Then
  1118. bgstep = 2
  1119. End If
  1120. BGirl.RotY = BGirl.RotY - 1
  1121. 'Primitive_bicycleGirlHAIR.RotY = Primitive_bicycleGirlHAIR.RotY - 1
  1122. Case 2:
  1123. If BGirl.RotY => -13 Then
  1124. bgstep = 3
  1125. End If
  1126. BGirl.RotY = BGirl.RotY + 1
  1127. 'Primitive_bicycleGirlHAIR.RotY = Primitive_bicycleGirlHAIR.RotY + 1
  1128. Case 3:
  1129. If BGirl.RotY => 0 Then
  1130. bgstep = 4
  1131. End If
  1132. BGirl.RotY = BGirl.RotY + 1
  1133. 'Primitive_bicycleGirlHAIR.RotY = Primitive_bicycleGirlHAIR.RotY + 1
  1134. Case 4:
  1135. If BGirl.RotY <= -13 Then
  1136. bgstep = 5
  1137. End If
  1138. BGirl.RotY = BGirl.RotY - 1
  1139. 'Primitive_bicycleGirlHAIR.RotY = Primitive_bicycleGirlHAIR.RotY - 1
  1140. Case 5:
  1141. If BGirl.RotY <= -13 Then
  1142. bgstep = 6
  1143. End If
  1144. BGirl.RotY = BGirl.RotY - 1
  1145. 'Primitive_bicycleGirlHAIR.RotY = Primitive_bicycleGirlHAIR.RotY - 1
  1146. Case 6:
  1147. If BGirl.RotX => 115 Then
  1148. bgstep = 7
  1149. 'me.enabled = 0
  1150. End If
  1151. BGirl.RotX = BGirl.RotX + 1
  1152. 'Primitive_bicycleGirlHAIR.RotX = Primitive_bicycleGirlHAIR.RotX + 1
  1153. Case 7:
  1154. If BGirl.RotX <= 105 Then
  1155. bgstep = 1
  1156. 'me.enabled = 0
  1157. End If
  1158. BGirl.RotX = BGirl.RotX - 1
  1159. 'Primitive_bicycleGirlHAIR.RotX = Primitive_bicycleGirlHAIR.RotX - 1
  1160. End Select
  1161. End Sub
  1162.  
  1163. Sub Trigger1_Hit()
  1164. If Activeball.velY < 11 Then
  1165. PlaySound "plastic_ramp"
  1166. End If
  1167. End Sub
  1168.  
  1169. Sub Trigger2_Hit()
  1170. If Activeball.velY < 20 Then
  1171. PlaySound "plastic_ramp"
  1172. End If
  1173. End Sub
  1174.  
  1175. Dim gspos
  1176. gspos = 1
  1177. Sub gateshadow_timer()
  1178. Select Case gspos
  1179. Case 1:
  1180. f28a2.state = 0
  1181. L1.visible = 1:L1R.visible = 1
  1182. gspos = 2
  1183. Case 2:
  1184. L1.visible = 0:L1R.visible = 0
  1185. L2.visible = 1:L2R.visible = 1
  1186. gspos = 3
  1187. Case 3:
  1188. L2.visible = 0:L2R.visible = 0
  1189. L3.visible = 1:L3R.visible = 1
  1190. gspos = 4
  1191. Case 4:
  1192. L3.visible = 0:L3R.visible = 0
  1193. L4.visible = 1:L4R.visible = 1
  1194. 'gspos = 1
  1195. f28a2.state = 1
  1196. me.enabled = 0
  1197. End Select
  1198. End Sub
  1199.  
  1200. Dim gspos1
  1201. gspos1 = 1
  1202. Sub gateshadowc_timer()
  1203. Select Case gspos1
  1204. Case 1:
  1205. f28a2.state = 0
  1206. L4.visible = 1:L4R.visible = 1
  1207. gspos1 = 2
  1208. Case 2:
  1209. L4.visible = 0:L4R.visible = 0
  1210. L3.visible = 1:L3R.visible = 1
  1211. gspos1 = 3
  1212. Case 3:
  1213. L3.visible = 0:L3R.visible = 0
  1214. L2.visible = 1:L2R.visible = 1
  1215. gspos1 = 4
  1216. Case 4:
  1217. L2.visible = 0:L2R.visible = 0
  1218. L1.visible = 1:L1R.visible = 1
  1219. gspos1 = 5
  1220. Case 5:
  1221. L1.visible = 0:L1R.visible = 0
  1222. f28a2.state = 1
  1223. me.enabled = 0
  1224. End Select
  1225. End Sub
  1226.  
  1227. Dim pwpos
  1228.  
  1229. pwpos = 1
  1230.  
  1231. Sub pwt_Timer()
  1232. Select Case pwpos
  1233. Case 1:
  1234. If Primitive271.RotY => 10 Then
  1235. pwpos = 2
  1236. End If
  1237. Primitive271.RotY = Primitive271.RotY + 0.1
  1238. Case 2:
  1239. If Primitive271.RotY <= 0 Then
  1240. pwpos = 3
  1241. End If
  1242. Primitive271.RotY = Primitive271.RotY - 0.1
  1243. Case 3:
  1244. If Primitive271.RotY <= - 10 Then
  1245. pwpos = 4
  1246. End If
  1247. Primitive271.RotY = Primitive271.RotY - 0.1
  1248. Case 4:
  1249. If Primitive271.RotY => 0 Then
  1250. pwpos = 5
  1251. End If
  1252. Primitive271.RotY = Primitive271.RotY + 0.1
  1253. Case 5:
  1254. If Primitive271.RotX => 120 Then
  1255. pwpos = 6
  1256. End If
  1257. Primitive271.RotX = Primitive271.RotX + 0.5
  1258. Case 6:
  1259. If Primitive271.RotX <= 114 Then
  1260. pwpos = 7
  1261. End If
  1262. Primitive271.RotX = Primitive271.RotX - 0.5
  1263. Case 7:
  1264. If Primitive271.RotX <= 108 Then
  1265. pwpos = 8
  1266. End If
  1267. Primitive271.RotX = Primitive271.RotX - 0.1
  1268. Case 8:
  1269. If Primitive271.RotX => 114 Then
  1270. pwpos = 1
  1271. End If
  1272. Primitive271.RotX = Primitive271.RotX + 0.1
  1273. End Select
  1274. End Sub
  1275.  
  1276. '''*****************************************************************************************
  1277. '''*freneticamnesic level nudge script, based on rascals nudge bobble with help from gtxjoe*
  1278. '''* add timers and "Nudgebobble(keycode)" to left and right tilt keys to activate *
  1279. '''*****************************************************************************************
  1280. Dim bgcharctr:bgcharctr = 2
  1281. Dim centerlocation:centerlocation = 90
  1282. Dim bgdegree:bgdegree = 4 'move +/- 4 degrees
  1283. Dim bgdurationctr:bgdurationctr = 0
  1284. Dim bgcharctr2:bgcharctr2 = 2
  1285. Dim centerlocation2:centerlocation2 = 0
  1286. Dim bgdegree2:bgdegree2 = 4 'move +/- 6 degrees
  1287. Dim bgdurationctr2:bgdurationctr2 = 0
  1288.  
  1289. Sub LevelT_Timer()
  1290. Level.RotAndTra7 = Level.RotAndTra7 + bgcharctr 'change rotation value by bgcharctr
  1291. If Level.RotAndTra7 >= bgdegree + centerlocation then bgcharctr = -1:bgdurationctr = bgdurationctr + 1 'if level moves past max degrees, change direction and increate durationctr
  1292. If Level.RotAndTra7 <= -bgdegree + centerlocation then bgcharctr = 1 'if level moves past min location, change direction
  1293. 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
  1294. If bgdegree <= 0 then LevelT.Enabled = False:bgdegree = 4 'if amount of movement is 0, turn off LevelT timer and reset movement back to max 7 degrees
  1295. End Sub
  1296.  
  1297. Sub LevelT2_Timer()
  1298. 'Dim loopctr
  1299. 'Level.RotAndTra7 = Level.RotAndTra7 + bgcharctr 'change rotation value by bgcharctr
  1300. leftzombie.ObjRotY = leftzombie.ObjRotY + bgcharctr2
  1301. middlezombie.ObjRotY = middlezombie.ObjRotY + bgcharctr2
  1302. rightzombie.ObjRotY = rightzombie.ObjRotY + bgcharctr2
  1303. 'debug.print "Degrees: " & Level.RotAndTra7 & " Max degree offset: " & bgdegree & " Cycle count: " & bgdurationctr ''debug print
  1304. If leftzombie.ObjRotY >= bgdegree2 + centerlocation2 then bgcharctr2 = -1:bgdurationctr2 = bgdurationctr2 + 1 'if level moves past max degrees, change direction and increate durationctr
  1305. If leftzombie.ObjRotY <= -bgdegree2 + centerlocation2 then bgcharctr2 = 1 'if level moves past min location, change direction
  1306. If bgdurationctr2 = 4 then bgdegree2 = bgdegree2 - 2:bgdurationctr2 = 0 'if level has moved back and forth 5 times, decrease amount of movement by -2 and repeat by resetting durationctr
  1307. If bgdegree2 <= 0 then LevelT2.Enabled = False:bgdegree2 = 4 'if amount of movement is 0, turn off LevelT timer and reset movement back to max 7 degrees
  1308. End Sub
  1309.  
  1310.  
  1311. Sub Nudgebobble(keycode)
  1312. If keycode = LeftTiltKey then bgcharctr = -1:bgcharctr2 = -1 'if nudge left, move in - direction
  1313. If keycode = RightTiltKey then bgcharctr = 1:bgcharctr2 = 1 'if nudge left, move in + direction
  1314. 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
  1315. Dim randombobble:randombobble = Int(2 * Rnd + 1)
  1316. If randombobble = 1 then randombobble = -2
  1317. bgcharctr = randombobble
  1318. End If
  1319. LevelT.Enabled = True:bgdurationctr = 0:bgdegree = 4
  1320. LevelT2.Enabled = True:bgdurationctr2 = 0:bgdegree2 = 4
  1321. End Sub
  1322.  
  1323. '''walking dead pro switches
  1324. Sub sw3_Hit()
  1325. vpmTimer.PulseSw 3
  1326. playsound SoundFX("fx_chapa",DOFTargets)
  1327. Primitive271.TransY = Primitive271.TransY + 2
  1328. me.timerenabled = 1
  1329. End Sub
  1330.  
  1331. Sub sw3_timer()
  1332. Primitive271.TransY = Primitive271.TransY - 2
  1333. sw3.timerenabled = 0
  1334. End Sub
  1335. 'Sub sw3_UnHit: Controller.Switch(3) = 0: End Sub
  1336. 'Sub sw4_Hit : vpmTimer.PulseSw 4: playsound SoundFX("fx_chapa"): End Sub ' prison door closed
  1337. Sub sw4_Hit : playsound SoundFX("fx_chapa",DOFShaker): End Sub ' prison door closed
  1338. 'Sub sw4_UnHit: Controller.Switch(4) = 0: End Sub
  1339.  
  1340. Sub sw9_Hit:Me.TimerEnabled = 1:dtLDrop.Hit 1:End Sub
  1341. Sub sw9_Timer:Me.TimerEnabled = 0:End Sub
  1342. Sub sw10_Hit:Me.TimerEnabled = 1:dtLDrop.Hit 2:End Sub
  1343. Sub sw10_Timer:Me.TimerEnabled = 0:End Sub
  1344. Sub sw11_Hit:Me.TimerEnabled = 1:dtLDrop.Hit 3:End Sub
  1345. Sub sw11_Timer:Me.TimerEnabled = 0:End Sub
  1346.  
  1347. Sub sw72_Hit : Controller.Switch(72) = 1: End Sub ' star top
  1348. Sub sw72_UnHit: Controller.Switch(72) = 0: End Sub
  1349. Sub sw70_Hit : Controller.Switch(70) = 1: End Sub ' star bottom
  1350. Sub sw70_UnHit: Controller.Switch(70) = 0: End Sub
  1351. Sub sw23_Hit : Controller.Switch(23) = 1: Playsound "rollover": GI_TroughCheck: End Sub ' shooter lane
  1352. Sub sw23_UnHit: Controller.Switch(23) = 0: End Sub
  1353. Sub sw24_Hit : Controller.Switch(24) = 1: Playsound "rollover": End Sub ' left outlane
  1354. Sub sw24_UnHit: Controller.Switch(24) = 0: End Sub
  1355. Sub sw25_Hit : Controller.Switch(25) = 1: Playsound "rollover": End Sub ' left inlane
  1356. Sub sw25_UnHit: Controller.Switch(25) = 0: End Sub
  1357. Sub sw28_Hit : Controller.Switch(28) = 1: Playsound "rollover": End Sub ' right inlane
  1358. Sub sw28_UnHit: Controller.Switch(28) = 0: End Sub
  1359. Sub sw29_Hit : Controller.Switch(29) = 1: Playsound "rollover": End Sub ' right outlane
  1360. Sub sw29_UnHit: Controller.Switch(29) = 0: End Sub
  1361. Sub sw33_Hit : Controller.Switch(33) = 1: Playsound "rollover": End Sub ' upper shooter lane
  1362. Sub sw33_UnHit: Controller.Switch(33) = 0: End Sub
  1363. Sub sw34_Hit : Controller.Switch(34) = 1: Playsound "Gate": End Sub ' upper shooter lane
  1364. Sub sw34_UnHit: Controller.Switch(34) = 0: End Sub
  1365. Sub sw35_Hit : vpmTimer.PulseSw 35: Playsound "Gate": End Sub ' l ramp exit
  1366. Sub sw36_Hit : Controller.Switch(36) = 1: Playsound "rollover": End Sub 'left top lane
  1367. Sub sw36_UnHit: Controller.Switch(36) = 0: End Sub
  1368. Sub sw37_Hit : Controller.Switch(37) = 1: Playsound "rollover": End Sub 'right top lane
  1369. Sub sw37_UnHit: Controller.Switch(37) = 0: End Sub
  1370. Sub sw38_Hit : vpmTimer.PulseSw 38: Playsound SoundFX("Target",DOFTargets): End Sub 'tower standup
  1371. Sub sw39_Hit : Controller.Switch(39) = 1: Playsound "rollover": End Sub 'right loop
  1372. Sub sw39_UnHit: Controller.Switch(39) = 0: End Sub
  1373. Sub sw41_Hit : Controller.Switch(41) = 1: Playsound "rollover": End Sub 'left loop
  1374. Sub sw41_UnHit: Controller.Switch(41) = 0: End Sub
  1375. Sub sw42_Hit : vpmTimer.PulseSw 42: Playsound "Gate": End Sub ' R ramp exit
  1376. Sub sw43_Hit : vpmTimer.PulseSw 43: Playsound "Gate": End Sub ' L ramp entrance
  1377. Sub sw44_Hit : Me.TimerEnabled = 1:SU1.TransX = -4:vpmTimer.PulseSw 44: Playsound SoundFX("Target",DOFTargets): End Sub 'l prison standup
  1378. Sub sw44_Timer:Me.TimerEnabled = 0:SU1.TransX = 0:End Sub
  1379. Sub sw45_Hit : Me.TimerEnabled = 1:SU2.TransX = -4:vpmTimer.PulseSw 45: Playsound SoundFX("Target",DOFTargets): End Sub 'r prison standup
  1380. Sub sw45_Timer:Me.TimerEnabled = 0:SU2.TransX = 0:End Sub
  1381.  
  1382. Sub door_hit_hit()
  1383. Controller.Switch(46) = 1
  1384. If ld.ObjRotZ = 0 Then
  1385. PlaySound "metalhit2"
  1386. ld.ObjRotZ = ld.ObjRotZ -2
  1387. rd.ObjRotZ = rd.ObjRotZ +2
  1388. me.timerenabled = 1
  1389. End If
  1390.  
  1391. End Sub
  1392.  
  1393. Sub door_hit_timer()
  1394.  
  1395. ld.ObjRotZ = ld.ObjRotZ +2
  1396. rd.ObjRotZ = rd.ObjRotZ -2
  1397. me.timerenabled = 0
  1398. End Sub
  1399.  
  1400. Sub door_hit_Unhit()
  1401. Controller.Switch(46) = 0
  1402. End Sub
  1403.  
  1404. Sub LHD_Hit()
  1405. PlaySound "ball_bounce"
  1406. StopSound "plastic_ramp"
  1407. End Sub
  1408.  
  1409. Sub RHD_Hit()
  1410. PlaySound "ball_bounce"
  1411. StopSound "plastic_ramp"
  1412. End Sub
  1413.  
  1414. Sub sw47_Hit : Controller.Switch(47) = 1: Playsound "rollover":End Sub 'center lane
  1415. Sub sw47_UnHit: Controller.Switch(47) = 0: End Sub
  1416.  
  1417. Sub PrisonMag_Hit:PMag.AddBall ActiveBall:End Sub
  1418. Sub PrisonMag_UnHit:PMag.RemoveBall ActiveBall:End Sub
  1419.  
  1420. Sub DivMagnet_Hit:DMag.AddBall ActiveBall:End Sub
  1421. Sub DivMagnet_UnHit:DMag.RemoveBall ActiveBall:End Sub
  1422.  
  1423. Sub WWMag_Hit:WMag.AddBall ActiveBall:End Sub
  1424. Sub WWMag_UnHit:WMag.RemoveBall ActiveBall:End Sub
  1425. '***********************************************
  1426. '***********************************************
  1427. 'Slings
  1428. '***********************************************
  1429. '***********************************************
  1430.  
  1431. Sub LeftSlingShot_Slingshot
  1432. Leftsling = True
  1433. Controller.Switch(26) = 1
  1434. PlaySound Soundfx("left_slingshot",DOFContactors):LeftSlingshot.TimerEnabled = 1
  1435. End Sub
  1436.  
  1437. Dim Leftsling:Leftsling = False
  1438.  
  1439. Sub LS_Timer()
  1440. If Leftsling = True and Left1.ObjRotZ < -7 then Left1.ObjRotZ = Left1.ObjRotZ + 2
  1441. If Leftsling = False and Left1.ObjRotZ > -20 then Left1.ObjRotZ = Left1.ObjRotZ - 2
  1442. If Left1.ObjRotZ >= -7 then Leftsling = False
  1443. If Leftsling = True and Left2.ObjRotZ > -212.5 then Left2.ObjRotZ = Left2.ObjRotZ - 2
  1444. If Leftsling = False and Left2.ObjRotZ < -199 then Left2.ObjRotZ = Left2.ObjRotZ + 2
  1445. If Left2.ObjRotZ <= -212.5 then Leftsling = False
  1446. If Leftsling = True and Left3.TransZ > -23 then Left3.TransZ = Left3.TransZ - 4
  1447. If Leftsling = False and Left3.TransZ < -0 then Left3.TransZ = Left3.TransZ + 4
  1448. If Left3.TransZ <= -23 then Leftsling = False
  1449. End Sub
  1450.  
  1451. Sub LeftSlingShot_Timer:Me.TimerEnabled = 0:Controller.Switch(26) = 0:End Sub
  1452.  
  1453. Sub RightSlingShot_Slingshot
  1454. Rightsling = True
  1455. Controller.Switch(27) = 1
  1456. PlaySound Soundfx("right_slingshot",DOFContactors):RightSlingshot.TimerEnabled = 1
  1457. End Sub
  1458.  
  1459. Dim Rightsling:Rightsling = False
  1460.  
  1461. Sub RS_Timer()
  1462. If Rightsling = True and Right1.ObjRotZ > 7 then Right1.ObjRotZ = Right1.ObjRotZ - 2
  1463. If Rightsling = False and Right1.ObjRotZ < 20 then Right1.ObjRotZ = Right1.ObjRotZ + 2
  1464. If Right1.ObjRotZ <= 7 then Rightsling = False
  1465. If Rightsling = True and Right2.ObjRotZ < 212.5 then Right2.ObjRotZ = Right2.ObjRotZ + 2
  1466. If Rightsling = False and Right2.ObjRotZ > 199 then Right2.ObjRotZ = Right2.ObjRotZ - 2
  1467. If Right2.ObjRotZ >= 212.5 then Rightsling = False
  1468. If Rightsling = True and Right3.TransZ > -23 then Right3.TransZ = Right3.TransZ - 4
  1469. If Rightsling = False and Right3.TransZ < -0 then Right3.TransZ = Right3.TransZ + 4
  1470. If Right3.TransZ <= -23 then Rightsling = False
  1471. End Sub
  1472.  
  1473. Sub RightSlingShot_Timer:Me.TimerEnabled = 0:Controller.Switch(27) = 0:End Sub
  1474.  
  1475. ' Impulse Plunger
  1476. Const IMPowerSetting = 50
  1477. Const IMTime = 0.6
  1478. Set plungerIM = New cvpmImpulseP
  1479. With plungerIM
  1480. .InitImpulseP sw23, IMPowerSetting, IMTime
  1481. .Switch 23
  1482. .Random 1.5
  1483. .InitExitSnd SoundFX("plunger",0), SoundFX("plunger",0)
  1484. .CreateEvents "plungerIM"
  1485. End With
  1486.  
  1487. 'Bumpers
  1488. Sub Bumper1_Hit:vpmTimer.PulseSw 30:PlaySound SoundFX("BumperRight",DOFContactors):BS1.visible = 0:me.timerenabled = 1:End Sub
  1489.  
  1490. Sub Bumper2_Hit:vpmTimer.PulseSw 31:PlaySound SoundFX("BumperRight",DOFContactors):BS2.visible = 0:me.timerenabled = 1:End Sub
  1491.  
  1492. Sub Bumper3_Hit:vpmTimer.PulseSw 32:PlaySound SoundFX("BumperRight",DOFContactors):BS3.visible = 0:me.timerenabled = 1:End Sub
  1493.  
  1494. Sub Bumper3_Timer:BS3.visible = 1:End Sub
  1495. Sub Bumper2_Timer:BS2.visible = 1:End Sub
  1496. Sub Bumper1_Timer:BS1.visible = 1:End Sub
  1497. '***********************************************
  1498. '***********************************************
  1499. ' Lamps
  1500. '***********************************************
  1501. '***********************************************
  1502.  
  1503.  
  1504.  
  1505. Dim LampState(300), FadingLevel(300), FadingState(300)
  1506. Dim FlashState(200), FlashLevel(200)
  1507. Dim FlashSpeedUp, FlashSpeedDown
  1508. Dim x
  1509.  
  1510. AllLampsOff()
  1511. LampTimer.Interval = 40 'lamp fading speed
  1512. LampTimer.Enabled = 1
  1513. '
  1514. FlashInit()
  1515. FlasherTimer.Interval = 10 'flash fading speed
  1516. FlasherTimer.Enabled = 1
  1517.  
  1518. Sub LampTimer_Timer()
  1519. Dim chgLamp, num, chg, ii
  1520. chgLamp = Controller.ChangedLamps
  1521. If Not IsEmpty(chgLamp) Then
  1522. For ii = 0 To UBound(chgLamp)
  1523. LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
  1524. FadingLevel(chgLamp(ii, 0) ) = chgLamp(ii, 1) + 4
  1525. 'FlashState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
  1526. Next
  1527. End If
  1528.  
  1529. UpdateLamps
  1530. End Sub
  1531.  
  1532. Sub FlashInit
  1533. Dim i
  1534. For i = 0 to 200
  1535. FlashState(i) = 0
  1536. FlashLevel(i) = 0
  1537. Next
  1538.  
  1539. FlashSpeedUp = 500 ' fast speed when turning on the flasher
  1540. FlashSpeedDown = 100 ' slow speed when turning off the flasher, gives a smooth fading
  1541. AllFlashOff()
  1542. End Sub
  1543.  
  1544. Sub AllFlashOff
  1545. Dim i
  1546. For i = 0 to 200
  1547. FlashState(i) = 0
  1548. Next
  1549. End Sub
  1550.  
  1551. Sub UpdateLamps()
  1552. nFadeL 3, l3
  1553. nFadeL 4, l4
  1554. nFadeL 5, l5
  1555. nFadeL 6, l6
  1556. nFadeL 7, l7
  1557. nFadeL 8, l8
  1558. nFadeL 9, l9
  1559. nFadeL 10, l10
  1560. nFadeL 11, l11
  1561. nFadeL 12, l12
  1562. nFadeL 13, l13
  1563. nFadeL 14, l14
  1564. nFadeL 15, l15
  1565. nFadeL 16, l16
  1566. nFadeL 17, l17
  1567. nFadeL 18, l18
  1568. nFadeL 19, l19
  1569. nFadeL 20, l20
  1570. nFadeL 21, l21
  1571. nFadeL 22, l22
  1572. nFadeL 23, l23
  1573. 'nFadeL 24, l24
  1574. nFadeL 25, l25
  1575. nFadeL 26, l26
  1576. nFadeL 27, l27
  1577. nFadeL 28, l28
  1578. nFadeL 29, l29
  1579. nFadeL 30, l30
  1580. nFadeL 31, l31
  1581. nFadeL 32, l32
  1582. 'nFadeL 33, l33
  1583. nFadeL 34, l34
  1584. nFadeL 35, l35
  1585. 'nFadeL 36, l36
  1586. nFadeL 37, l37
  1587. nFadeL 38, l38
  1588. nFadeL 39, l39
  1589. nFadeL 40, l40
  1590. 'nFadeL 41, l41
  1591. nFadeL 42, l42
  1592. nFadeL 43, l43
  1593. nFadeL 44, l44
  1594. nFadeL 45, l45
  1595. nFadeL 46, l46
  1596. nFadeL 47, l47
  1597. nFadeL 48, l48
  1598. nFadeL 49, l49
  1599. nFadeL 50, l50
  1600. nFadeL 51, l51
  1601. nFadeL 52, l52
  1602. nFadeL 53, l53
  1603. nFadeL 54, l54
  1604. nFadeL 55, l55
  1605. nFadeL 56, l56
  1606. 'nFadeL 57, l57
  1607. nFadeL 58, l58
  1608. nFadeL 59, l59
  1609. nFadeL 60, l60
  1610. nFadeL 61, l61
  1611. nFadeL 62, l62
  1612. nFadeL 63, l63
  1613. nFadeL 64, l64
  1614. nFadeL 65, l65
  1615. nFadeL 66, l66
  1616. nFadeL 67, l67
  1617. nFadeL 68, l68
  1618. nFadeL 69, l69
  1619. nFadeL 70, l70
  1620. nFadeL 71, l71
  1621. nFadeLm 72, l72r
  1622. nFadeL 72, l72
  1623. nFadeLm 73, l73
  1624. nFadeLm 73, l73b
  1625. nFadeL 73, l73a
  1626. nFadeLm 74, l74
  1627. nFadeL 74, l74a
  1628. nFadeLm 75, l75
  1629. nFadeLm 75, l75b
  1630. nFadeL 75, l75a
  1631. nFadeL 76, l76
  1632. nFadeL 77, l77
  1633. nFadeL 78, l78
  1634. 'nFadeL 132, f32
  1635.  
  1636. Light10.Intensity = LampState(98) / 10
  1637.  
  1638. l33.ColorFull = RGB(Lampstate(195),Lampstate(196),Lampstate(197))
  1639. l57.ColorFull = RGB(Lampstate(187),Lampstate(188),Lampstate(189))
  1640. l36.ColorFull = RGB(Lampstate(203),Lampstate(204),Lampstate(205))
  1641. l24.ColorFull = RGB(Lampstate(168),Lampstate(169),Lampstate(170))
  1642. l41.ColorFull = RGB(Lampstate(152),Lampstate(153),Lampstate(154))
  1643. l80.ColorFull = RGB(Lampstate(133),Lampstate(134),Lampstate(135))
  1644. l79.ColorFull = RGB(Lampstate(136),Lampstate(137),Lampstate(138))
  1645. L106.ColorFull = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
  1646. L107.ColorFull = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
  1647.  
  1648. dim bulb
  1649. for each bulb In GI
  1650.  
  1651. bulb.color = RGB(0,0,0)
  1652. bulb.colorfull = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
  1653. next
  1654.  
  1655. Back_Flash.color = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
  1656. Back_Flash1.color = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
  1657.  
  1658. F22F1.color = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
  1659. F22F2.color = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
  1660. F22F3.color = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
  1661.  
  1662. F22F6.color = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
  1663.  
  1664. F22F4.color = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
  1665. F22F5.color = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
  1666.  
  1667. Back_Flash2.color = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
  1668. Back_Flash3.color = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
  1669.  
  1670. If LampState(106) AND LampState(107) AND LampState(108) > 100 Then
  1671.  
  1672. If Dozer_Cab = 1 Then
  1673. Controller.B2SSetData 133,1
  1674. Controller.B2SSetData 134,0
  1675. End If
  1676.  
  1677. If NOT cgupon = 1 AND GiPulse = 1 Then
  1678. cgup = 1:cgrade_up.enabled = 1
  1679. End If
  1680.  
  1681. Else
  1682.  
  1683. If Dozer_Cab = 1 Then
  1684. Controller.B2SSetData 133,0
  1685. Controller.B2SSetData 134,1
  1686. End If
  1687.  
  1688. If NOT cgdownon = 1 AND GiPulse = 1 Then
  1689. cgdown = 1:cgrade_down.enabled = 1
  1690. End If
  1691.  
  1692. End If
  1693.  
  1694. dim bulb2
  1695. for each bulb2 In GI2
  1696. bulb2.color = RGB(0,0,0)
  1697. bulb2.colorfull = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
  1698. next
  1699.  
  1700. L184.State = Lampstate(184)
  1701. L219.State = Lampstate(219)
  1702.  
  1703. End Sub
  1704.  
  1705. Sub FadePrim(nr, pri, a, b, c, d)
  1706. Select Case FadingLevel(nr)
  1707. Case 2:pri.image = d:FadingLevel(nr) = 0
  1708. Case 3:pri.image = c:FadingLevel(nr) = 1
  1709. Case 4:pri.image = b:FadingLevel(nr) = 2
  1710. Case 5:pri.image = a:FadingLevel(nr) = 3
  1711. End Select
  1712. End Sub
  1713.  
  1714. ''Lights
  1715.  
  1716. Sub NFadeL(nr, a)
  1717. Select Case FadingLevel(nr)
  1718. Case 4:a.state = 0:FadingLevel(nr) = 0
  1719. Case 5:a.State = 1:FadingLevel(nr) = 1
  1720. End Select
  1721. End Sub
  1722.  
  1723. Sub NFadeLm(nr, a)
  1724. Select Case FadingLevel(nr)
  1725. Case 4:a.state = 0
  1726. Case 5:a.State = 1
  1727. End Select
  1728. End Sub
  1729.  
  1730. Sub Flash(nr, object)
  1731. Select Case FlashState(nr)
  1732. Case 0 'off
  1733. FlashLevel(nr) = FlashLevel(nr) - FlashSpeedDown
  1734. If FlashLevel(nr) < 0 Then
  1735. FlashLevel(nr) = 0
  1736. FlashState(nr) = -1 'completely off
  1737. End if
  1738. Object.opacity = FlashLevel(nr)
  1739. Case 1 ' on
  1740. FlashLevel(nr) = FlashLevel(nr) + FlashSpeedUp
  1741. If FlashLevel(nr) > 1000 Then
  1742. FlashLevel(nr) = 1000
  1743. FlashState(nr) = -2 'completely on
  1744. End if
  1745. Object.opacity = FlashLevel(nr)
  1746. End Select
  1747. End Sub
  1748.  
  1749. Sub Flashm(nr, object) 'multiple flashers, it doesn't change the flashstate
  1750. Select Case FlashState(nr)
  1751. Case 0 'off
  1752. Object.opacity = FlashLevel(nr)
  1753. Case 1 ' on
  1754. Object.opacity = FlashLevel(nr)
  1755. End Select
  1756. End Sub
  1757.  
  1758. 'Sub AllLampsOff():For x = 1 to 200:LampState(x) = 4:FadingLevel(x) = 4:Next:UpdateLamps:UpdateLamps:Updatelamps:End Sub
  1759. Sub AllLampsOff()
  1760. On Error Resume Next
  1761.  
  1762. Dim x
  1763. For x = 0 to 360
  1764. LampState(x) = 0
  1765. Next
  1766.  
  1767. UpdateLamps:UpdateLamps:Updatelamps
  1768. End Sub
  1769.  
  1770. Sub SetLamp(nr, value)
  1771. If value = 0 AND LampState(nr) = 0 Then Exit Sub
  1772. If value = 1 AND LampState(nr) = 1 Then Exit Sub
  1773. LampState(nr) = abs(value) + 4
  1774. FadingLevel(nr ) = abs(value) + 4: FadingState(nr ) = abs(value) + 4
  1775. End Sub
  1776.  
  1777. Sub SetFlash(nr, stat)
  1778. FlashState(nr) = ABS(stat)
  1779. End Sub
  1780.  
  1781. Sub FlasherTimer_Timer()
  1782. End Sub
  1783.  
  1784. Sub BallstopL_Hit: PlaySound "drop_left":End Sub
  1785. Sub BallstopR_Hit: PlaySound "drop_Right": End Sub
  1786. Sub Gate3_Hit: PlaySound "Gate": End Sub
  1787.  
  1788. ' *********************************************************************
  1789. ' Supporting Ball & Sound Functions
  1790. ' *********************************************************************
  1791.  
  1792. Sub Pins_Hit (idx)
  1793. PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  1794. End Sub
  1795.  
  1796. Sub Targets_Hit (idx)
  1797. PlaySound "target", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  1798. End Sub
  1799.  
  1800. Sub Metals_Thin_Hit (idx)
  1801. PlaySound "metalhit_thin", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1802. End Sub
  1803.  
  1804. Sub Metals_Medium_Hit (idx)
  1805. PlaySound "metalhit_medium", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1806. End Sub
  1807.  
  1808. Sub Metals2_Hit (idx)
  1809. PlaySound "metalhit2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1810. End Sub
  1811.  
  1812. Sub Gates_Hit (idx)
  1813. PlaySound "gate4", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1814. End Sub
  1815.  
  1816. Sub Spinner_Spin
  1817. PlaySound "fx_spinner",0,.25,0,0.25
  1818. End Sub
  1819.  
  1820. Sub Rubbers_Hit(idx)
  1821. dim finalspeed
  1822. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1823. If finalspeed > 20 then
  1824. PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1825. End if
  1826. If finalspeed >= 6 AND finalspeed <= 20 then
  1827. RandomSoundRubber()
  1828. End If
  1829. End Sub
  1830.  
  1831. Sub Posts_Hit(idx)
  1832. dim finalspeed
  1833. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1834. If finalspeed > 16 then
  1835. PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1836. End if
  1837. If finalspeed >= 6 AND finalspeed <= 16 then
  1838. RandomSoundRubber()
  1839. End If
  1840. End Sub
  1841.  
  1842. Sub RandomSoundRubber()
  1843. Select Case Int(Rnd*3)+1
  1844. Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1845. Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1846. Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1847. End Select
  1848. End Sub
  1849.  
  1850. Sub LeftFlipper_Collide(parm)
  1851. RandomSoundFlipper()
  1852. End Sub
  1853.  
  1854. Sub RightFlipper_Collide(parm)
  1855. RandomSoundFlipper()
  1856. End Sub
  1857.  
  1858. Sub RandomSoundFlipper()
  1859. Select Case Int(Rnd*3)+1
  1860. Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1861. Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1862. Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  1863. End Select
  1864. End Sub
  1865.  
  1866. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  1867. Vol = Csng(BallVel(ball) ^2 / 20000)
  1868. End Function
  1869.  
  1870. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
  1871. Dim tmp
  1872. tmp = ball.x * 2 / table.width-1
  1873. If tmp > 0 Then
  1874. Pan = Csng(tmp ^10)
  1875. Else
  1876. Pan = Csng(-((- tmp) ^10) )
  1877. End If
  1878. End Function
  1879.  
  1880. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  1881. Pitch = BallVel(ball) * 20
  1882. End Function
  1883.  
  1884. Function BallVel(ball) 'Calculates the ball speed
  1885. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  1886. End Function
  1887.  
  1888. '*****************************************
  1889. ' JP's VP10 Rolling Sounds
  1890. '*****************************************
  1891.  
  1892. Const tnob = 8 ' total number of balls in this table is 4, but always use a higher number here bacuse of the timing
  1893. ReDim rolling(tnob)
  1894. InitRolling
  1895.  
  1896. Sub InitRolling
  1897. Dim i
  1898. For i = 0 to tnob
  1899. rolling(i) = False
  1900. Next
  1901. End Sub
  1902.  
  1903. Sub RollingTimer_Timer()
  1904. Dim BOT, b
  1905. BOT = GetBalls
  1906.  
  1907. ' stop the sound of deleted balls
  1908. For b = UBound(BOT) + 1 to tnob
  1909. rolling(b) = False
  1910. StopSound("fx_ballrolling" & b)
  1911. Next
  1912.  
  1913. ' exit the sub if no balls on the table
  1914. If UBound(BOT) = -1 Then Exit Sub
  1915.  
  1916. ' play the rolling sound for each ball
  1917. For b = 0 to UBound(BOT)
  1918. If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
  1919. rolling(b) = True
  1920. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0
  1921. Else
  1922. If rolling(b) = True Then
  1923. StopSound("fx_ballrolling" & b)
  1924. rolling(b) = False
  1925. End If
  1926. End If
  1927. Next
  1928. End Sub
  1929.  
  1930. '**********************
  1931. ' Ball Collision Sound
  1932. '**********************
  1933.  
  1934. Sub OnBallBallCollision(ball1, ball2, velocity)
  1935. PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
  1936. End Sub
  1937.  
  1938. Sub Table_exit()
  1939. Controller.Pause = False
  1940. Controller.Stop
  1941. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement