Advertisement
Guest User

Untitled

a guest
Nov 26th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.30 KB | None | 0 0
  1. '*********************************************************************
  2. '* *
  3. '* Doctor who *
  4. '* Script by *
  5. '* oooPLAYER1ooo & Unclewilly *
  6. '* 2010 *
  7. '* *
  8. '* Updated 2017 for VPX By *
  9. '* Sliderpoint *
  10. '*********************************************************************
  11.  
  12. Option Explicit
  13. Randomize
  14.  
  15. On Error Resume Next
  16. ExecuteGlobal GetTextFile("controller.vbs")
  17. If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
  18. On Error Goto 0
  19.  
  20. Sub LoadCoreVBS
  21. On Error Resume Next
  22. ExecuteGlobal GetTextFile("core.vbs")
  23. If Err Then MsgBox "Can't open core.vbs"
  24. On Error Goto 0
  25. End Sub
  26.  
  27. Const UseVPMModSol = 1
  28. Const BallMass = 1.7
  29.  
  30. LoadVPM "01560000", "WPC2.VBS", 3.26
  31.  
  32. '********************
  33. 'Standard definitions
  34. '********************
  35.  
  36. Const UseSolenoids = 1
  37. Const UseLamps = 1
  38. Const UseSync = 0
  39. Set GICallback2 = GetRef("UpdateGI")
  40.  
  41. ' Standard Sounds
  42. Const SSolenoidOn = "Solenoid"
  43. Const SSolenoidOff = ""
  44. Const SCoin = "quarter"
  45.  
  46. 'Rom Name
  47. Const cGameName = "dw_l2"
  48.  
  49.  
  50. 'XXXXXXXXXXXXX - Graphics Variables - XXXXXXXXXXX
  51. Const GI_Color = "White" ' Mixed - Red - Blue - White
  52. Const SideWallFlashers = 1 ' 1 On / 0 Off
  53. Const GISideWalls = 1 ' 1 On / 0 Off
  54. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  55.  
  56. 'Table Init
  57. Dim bsTrough,bsMiniPFL,bsMiniPFR,bsShooter,mMinipf,plungerIM
  58. Dim PFPos
  59. Dim xx
  60. Dim DayNight
  61. dim FastFlips
  62.  
  63. Sub Table1_Init
  64. vpmInit Me
  65. With Controller
  66. .GameName = cGameName
  67. If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
  68. .SplashInfoLine = "Doctor Who" & vbNewLine & "by Sliderpoint v0.5 vp10.2"
  69. .HandleKeyboard = 0
  70. .ShowTitle = 0
  71. .ShowDMDOnly = 1
  72. .ShowFrame = 0
  73. .HandleMechanics = 0
  74. .Hidden = 0
  75. .dip(0)=&h00 'Set to usa
  76. Controller.Switch(22) = 1 'close coin door
  77. Controller.Switch(24) = 1 'always closed
  78. Controller.Switch(82) = 1 'pfglass switch
  79. On Error Resume Next
  80. .Run
  81.  
  82. If Err Then MsgBox Err.Description
  83. On Error Goto 0
  84. End With
  85.  
  86. ' Impulse Plunger
  87. Const IMPowerSetting = 45
  88. Const IMTime = 0.7
  89. Set plungerIM = New cvpmImpulseP
  90. With plungerIM
  91. .InitImpulseP swplunger, IMPowerSetting, IMTime
  92. .InitExitSnd SoundFX("Solenoid",DOFContactors), SoundFX("plunger",DOFContactors)
  93. .CreateEvents "plungerIM"
  94. End With
  95.  
  96. ' Ballstacks
  97. set bstrough=new cvpmballstack
  98. bstrough.initsw 28,25,26,27,0,0,0,0
  99. bstrough.initkick ballrelease,0,1
  100. bstrough.InitExitSnd SoundFX("BallRelease",DOFContactors), SoundFX("solenoid",DOFContactors)
  101. bstrough.balls=3
  102.  
  103. set mMinipf=new cvpmmech
  104. with mMinipf
  105. .sol1=28
  106. .sol2=27
  107. .mtype=vpmMechOneDirSol+vpmmechlinear
  108. .length=270
  109. .steps=360
  110. .callback=getref("UpdateMiniPF")
  111. .start
  112. end with
  113.  
  114. 'Other Init
  115. sw71.isDropped = 1
  116. sw72.isDropped = 1
  117. sw73.isDropped = 1
  118. sw74.isDropped = 1
  119. sw75.isDropped = 1
  120.  
  121. DayNight = table1.NightDay
  122. Intensity 'sets GI brightness depending on day/night slider settings
  123.  
  124. 'Init switches
  125. Controller.Switch(22) = 1 'close coin door
  126. Controller.Switch(24) = 1 'always closed
  127. Controller.Switch(82) = 1 'pfglass switch
  128.  
  129. vpmNudge.TiltSwitch = 14
  130. vpmNudge.Sensitivity = 4
  131. vpmNudge.TiltObj = Array(Bumper1, Bumper2, Bumper4, LeftSling, RightSling)
  132.  
  133. 'Init Trapdoor
  134. tdenter.enabled=true
  135.  
  136. Set FastFlips = new cFastFlips
  137. with FastFlips
  138. .CallBackL = "SolLflipper" 'Point these to flipper subs
  139. .CallBackR = "SolRflipper" '...
  140. .CallBackUL = "SolULflipper"'...(upper flippers, if needed)
  141. ' .CallBackUR = "SolURflipper"'...
  142. .TiltObjects = True 'Optional, if True calls vpmnudge.solgameon automatically. IF YOU GET A LINE 1 ERROR, DISABLE THIS! (or setup vpmNudge.TiltObj!)
  143. '' .InitDelay "FastFlips", 100 'Optional, if > 0 adds some compensation for solenoid jitter (occasional problem on Bram Stoker's Dracula)
  144. .DebugOn = False 'Debug, always-on flippers. Call FastFlips.DebugOn True or False in debugger to enable/disable.
  145. end with
  146.  
  147.  
  148. 'Graphic Variables
  149. If GI_Color = "Mixed" then
  150. for each xx in GIG2:xx.Color = RGB(255, 0, 0):next
  151. for each xx in GIG3:xx.Color = RGB(255, 255, 0):next
  152. for each xx in GIG4:xx.Color = RGB(0, 0, 255):next
  153. for each xx in GIG2:xx.ColorFull = RGB(255, 0, 0):next
  154. for each xx in GIG3:xx.ColorFull = RGB(255, 255, 0):next
  155. for each xx in GIG4:xx.ColorFull = RGB(0, 0, 255):next
  156. for each xx in GIF2:xx.Color = RGB(255, 255, 128):Next
  157. for each xx in GIF3:xx.Color = RGB(255, 255, 0):Next
  158. for each xx in GIF4:xx.Color = RGB(0, 0, 255):Next
  159.  
  160. End If
  161.  
  162. If GI_Color = "Red" then
  163. for each xx in GIG2:xx.Color = RGB(255, 0, 0):next
  164. for each xx in GIG3:xx.Color = RGB(255, 0, 0):next
  165. for each xx in GIG4:xx.Color = RGB(255, 0, 0):next
  166. for each xx in GIG2:xx.ColorFull = RGB(255, 0, 0):next
  167. for each xx in GIG3:xx.ColorFull = RGB(255, 0, 0):next
  168. for each xx in GIG4:xx.ColorFull = RGB(255, 0, 0):next
  169. for each xx in GIF2:xx.Color = RGB(255, 0, 0):next
  170. for each xx in GIF3:xx.Color = RGB(255, 0, 0):next
  171. for each xx in GIF4:xx.Color = RGB(255, 0, 0):next
  172. End If
  173.  
  174. If GI_Color = "White" then
  175. for each xx in GIG2:xx.Color = RGB(255, 255, 0):next
  176. for each xx in GIG3:xx.Color = RGB(255, 255, 0):next
  177. for each xx in GIG4:xx.Color = RGB(255, 255, 0):next
  178. for each xx in GIF2:xx.Color = RGB(255, 255, 128):Next
  179. for each xx in GIF3:xx.Color = RGB(255, 255, 128):Next
  180. for each xx in GIF4:xx.Color = RGB(255, 255, 128):Next
  181. End If
  182.  
  183. If GI_Color = "Blue" then
  184. for each xx in GIG2:xx.Color = RGB(0, 0, 255):next
  185. for each xx in GIG3:xx.Color = RGB(0, 0, 255):next
  186. for each xx in GIG4:xx.Color = RGB(0, 0, 255):next
  187. for each xx in GIG2:xx.ColorFull = RGB(0, 0, 255):next
  188. for each xx in GIG3:xx.ColorFull = RGB(0, 0, 255):next
  189. for each xx in GIG4:xx.ColorFull = RGB(0, 0, 255):next
  190. for each xx in GIF2:xx.Color = RGB(0, 0, 255):Next
  191. for each xx in GIF3:xx.Color = RGB(0, 0, 255):Next
  192. for each xx in GIF4:xx.Color = RGB(0, 0, 255):Next
  193. End If
  194.  
  195. End Sub
  196.  
  197. PFPos=-1
  198.  
  199. Sub Table1_Paused:Controller.Pause = 1:End Sub
  200. Sub Table1_unPaused:Controller.Pause = 0:End Sub
  201. Sub Table1_exit:Controller.Stop: End Sub
  202.  
  203. '*********************keyboard handlers**************************
  204.  
  205. Sub Table1_KeyDown(ByVal Keycode)
  206. If keycode = plungerkey then controller.switch(34)=True
  207. ' If keycode = 3 then SolTrapDoor(1)
  208. If keycode = LeftTiltKey Then PlaySound "fx_nudge_left"
  209. If keycode = RightTiltKey Then PlaySound "fx_nudge_right"
  210. If keycode = CenterTiltKey Then :PlaySound "fx_nudge_forward"
  211. If keycode = LeftFlipperKey Then FastFlips.FlipL True :controller.Switch(swLLFlip) = True
  212. If keycode = KeyUpperLeft Then FastFlips.FlipUL True :controller.Switch(swULFlip) = True
  213. If KeyCode = RightFlipperKey then FastFlips.FlipR True
  214. If vpmKeyDown(keycode) Then Exit Sub
  215. End Sub
  216.  
  217. Sub Table1_KeyUp(ByVal Keycode)
  218. If vpmKeyUp(keycode) Then Exit Sub
  219. If keyuphandler(keycode) Then Exit Sub
  220. If keycode = plungerkey then controller.switch(34)=false
  221. ' If keycode = 3 then SolTrapDoor(0)
  222. If keycode = KeyUpperLeft Then FastFlips.FlipUL False :controller.Switch(swULFlip) = False
  223. If KeyCode = LeftFlipperKey then FastFlips.FlipL False :controller.Switch(swLLFlip) = False
  224. If KeyCode = RightFlipperKey then FastFlips.FlipR False
  225.  
  226. End Sub
  227.  
  228. 'Ball events
  229. sub Drain_hit():PlaySound "Drain":bsTrough.AddBall me:end sub
  230. sub sw77_hit():controller.switch(77) = 1:PlaySound"scoopenter":BallPrim2.visible = 1:end sub
  231. Sub sw77_unhit:controller.Switch(77) = 0:end sub
  232. sub sw76_hit():controller.switch(76) = 1:PlaySound"scoopenter":BallPrim.visible = 1:end sub
  233. Sub sw76_unhit:controller.switch(76) = 0:end Sub
  234. sub TardisEntrance_hit:Controller.Switch(31) = 1:end sub
  235. Sub ShooterLane_Hit:Controller.Switch(17)=1:End Sub
  236. Sub ShooterLane_Unhit:Controller.Switch(17)=0:End Sub
  237.  
  238. 'MiniPF Door Switches
  239. sub sw68_Hit:vpmTimer.PulseSw 68:End Sub
  240. sub sw68s_hit:PlaySound "scoopenter": End Sub
  241. sub sw38_Hit:vpmTimer.PulseSw 38:End Sub
  242. sub sw38s_Hit:Playsound "scoopenter": End Sub
  243. sub sw88_Hit:vpmTimer.PulseSw 88:End Sub
  244. sub sw88s_Hit:Playsound "scoopenter": End Sub
  245.  
  246. 'MiniPF Standup
  247. Sub sw78_Hit():vpmTimer.PulseSw 78:PlaySound "target":End Sub
  248.  
  249. 'MiniPf Buttons
  250. Sub sw75_Hit():vpmTimer.PulseSw 75:PlaySound "target":sw75p.Y = 440:TESHake:ButtonPrim.Enabled = 1:End Sub
  251. Sub sw74_Hit():vpmTimer.PulseSw 74:PlaySound "target":sw74p.Y = 440:TESHake:ButtonPrim.Enabled = 1:End Sub
  252. Sub sw73_Hit():vpmTimer.PulseSw 73:PlaySound "target":sw73p.Y = 440:TESHake:ButtonPrim.Enabled = 1:End Sub
  253. Sub sw72_Hit():vpmTimer.PulseSw 72:PlaySound "target":sw72p.Y = 440:TESHake:ButtonPrim.Enabled = 1:End Sub
  254. Sub sw71_Hit():vpmTimer.PulseSw 71:PlaySound "target":sw71p.Y = 440:TESHake:ButtonPrim.Enabled = 1:End Sub
  255.  
  256. Sub ButtonPrim_Timer
  257. sw75p.Y = 455
  258. sw74p.Y = 455
  259. sw73p.Y = 455
  260. sw72p.Y = 455
  261. sw71p.Y = 455
  262. Me.Enabled = 0
  263. End Sub
  264.  
  265. 'ramp gates
  266. Sub sw36_Hit:vpmTimer.PulseSw 36:PlaySound "gate":End Sub
  267. Sub gate3_Hit:vpmTimer.PulseSw 37:PlaySound "gate":End Sub
  268. Sub sw33_Hit:vpmTimer.PulseSw 33:PlaySound "gate":End Sub
  269. Sub gate5_Hit:vpmTimer.PulseSw 35:PlaySound "gate":End Sub
  270. Sub gate2_Hit:PlaySound "gate":End Sub
  271.  
  272. ' Activate transmat
  273. Sub sw58_Hit:vpmTimer.PulseSw 58:PlaySound "target":End Sub
  274.  
  275. ' Escape targets
  276. Sub sw41_Hit:vpmTimer.PulseSw 41:PlaySound "target":End Sub
  277. Sub sw42_Hit:vpmTimer.PulseSw 42:PlaySound "target":End Sub
  278. Sub sw43_Hit:vpmTimer.PulseSw 43:PlaySound "target":End Sub
  279. Sub sw44_Hit:vpmTimer.PulseSw 44:PlaySound "target":End Sub
  280. Sub sw45_Hit:vpmTimer.PulseSw 45:PlaySound "target":End Sub
  281. Sub sw46_Hit:vpmTimer.PulseSw 46:PlaySound "target":End Sub
  282.  
  283. 'repair targets
  284. Sub sw51_Hit:vpmTimer.PulseSw 51:PlaySound "target":End Sub
  285. Sub sw52_Hit:vpmTimer.PulseSw 52:PlaySound "target":End Sub
  286. Sub sw53_Hit:vpmTimer.PulseSw 53:PlaySound "target":End Sub
  287. Sub sw54_Hit:vpmTimer.PulseSw 54:PlaySound "target":End Sub
  288. Sub sw55_Hit:vpmTimer.PulseSw 55:PlaySound "target":End Sub
  289. Sub sw56_Hit:vpmTimer.PulseSw 56:PlaySound "target":End Sub
  290.  
  291. ' lane rollovers
  292. Sub RightOutlane_Hit:Controller.Switch(67) = 1:PlaySound "sensor":End Sub
  293. Sub RightOutlane_UnHit:Controller.Switch(67) = 0:End Sub
  294. Sub RightInlane_Hit:Controller.Switch(66) = 1:PlaySound "sensor":End Sub
  295. Sub RightInlane_UnHit:Controller.Switch(66) = 0:End Sub
  296. Sub LeftOutlane_Hit:Controller.Switch(64) = 1:PlaySound "sensor":End Sub
  297. Sub LeftOutlane_UnHit:Controller.Switch(64) = 0:End Sub
  298. Sub LeftInlane_Hit:Controller.Switch(65) = 1:PlaySound "sensor":End Sub
  299. Sub LeftInlane_UnHit:Controller.Switch(65) = 0:End Sub
  300. Sub LeftMiddle_Hit:Controller.Switch(47) = 1:PlaySound "sensor":End Sub
  301. Sub LeftMiddle_UnHit:Controller.Switch(47) = 0:End Sub
  302.  
  303. 'hidden rollovers
  304. Sub sw18_Hit:vpmTimer.PulseSw 18:PlaySound "sensor":End Sub
  305. Sub sw48_Hit:vpmTimer.PulseSw 48:PlaySound "sensor":End Sub
  306.  
  307. ' slings
  308. Sub leftsling_Slingshot():vpmTimer.PulseSw 15:PlaySound SoundFX("slingshot_L" ,DOFContactors):End Sub
  309. Sub rightsling_Slingshot():vpmTimer.PulseSw 16:PlaySound SoundFX("slingshot_R" ,DOFContactors):End Sub
  310.  
  311. 'Bumpers
  312. Dim Bump1,Bump2,Bump3
  313.  
  314. Sub Bumper2_Hit():vpmTimer.PulseSw 61:PlaySound SoundFX("Bumper1" ,DOFContactors):End Sub
  315. Sub Bumper1_Hit():vpmTimer.PulseSw 62:PlaySound SoundFX("Bumper2" ,DOFContactors):End Sub
  316. Sub Bumper4_Hit():vpmTimer.PulseSw 63:PlaySound SoundFX("Bumper3" ,DOFContactors):End Sub'
  317.  
  318. 'Solenoids
  319. solcallback(1)="SolTrapDoor"
  320. solcallback(2)="SolAutoFire"
  321. solcallback(3)="TardisExit"
  322. solcallback(4)="solmpfl"
  323. solcallback(5)="solmpfr"
  324. solModcallback(6)= "Flash06"
  325. solcallback(7)="vpmsolsound ""knocker"","
  326. 'solcallback(8)= 'doctor 3 flasher, in backbox
  327. 'solcallback(11)="bpr1"
  328. 'solcallback(12)="bpr2"
  329. 'solcallback(13)="bpr3"
  330. solcallback(15)="bsTrough.SolIn"
  331. solcallback(16)="bsTrough.SolOut"
  332. solModcallback(17)="Flash17"
  333. solModcallback(18)="Flash18"
  334. solModcallback(19)="Flash19"
  335. solModcallback(20)="flash20"
  336. solModcallback(21)="Flash21"
  337. solModCallback(22)= "who_h"
  338. solModCallback(23)= "who_o"
  339. solModcallback(24)="Flash24"
  340. SolCallBack(31) = "FastFlips.TiltSol"
  341.  
  342.  
  343. 'Solenoid Subs
  344. sub soltrapdoor(Enabled)
  345. if enabled then
  346. tdenter.enabled= false
  347. TDDownTimer.Enabled = 1
  348. Playsound SoundFX("FlapClos", DOFContactors), 0,.25,-1
  349. else
  350. tdenter.enabled= true
  351. TDUpTimer.Enabled = 1
  352. end if
  353. end sub
  354.  
  355. Sub TDUpTimer_timer
  356. If TD.RotX > 20 Then
  357. TD.RotX = TD.RotX - 1
  358. elseIf TD.RotX = 20 Then
  359. controller.switch(57)= False
  360. TDUpTimer.Enabled = 0
  361. Playsound SoundFX("FlapClos", DOFContactors), 0,.25,-1,1
  362. End If
  363. End Sub
  364.  
  365. Sub TDDownTimer_timer
  366. If TD.RotX < 55 Then
  367. TD.RotX = TD.RotX + 1
  368. elseIf TD.RotX = 55 Then
  369. controller.switch(57)= True
  370. TDDownTimer.Enabled = 0
  371. End If
  372. End Sub
  373.  
  374. Sub solAutofire(Enabled)
  375. If Enabled Then
  376. PlungerIM.AutoFire
  377. Playsound SoundFX("Solenoid" ,DOFContactors)
  378. End If
  379. End Sub
  380.  
  381. Sub TardisExit(enabled)
  382. If Enabled Then
  383. TardisEntrance.KickZ 180, 35, 92, 0
  384. Playsound SoundFX("FlapOpen" ,DOFContactors),0,1,.5,.5
  385. Controller.Switch (31) = 0
  386. End If
  387. End Sub
  388.  
  389. Sub solmpfl(enabled)
  390. If enabled then
  391. BallPrim.visible = 0
  392. sw76.kick 180, 5
  393. Playsound SoundFX("BallRelease2" ,DOFContactors)
  394. End If
  395. End Sub
  396.  
  397. Sub solmpfr(enabled)
  398. If enabled then
  399. BallPrim2.visible = 0
  400. sw77.kick 180, 5
  401. Playsound SoundFX("BallRelease2" ,DOFContactors)
  402. End If
  403. End Sub
  404.  
  405. Sub Flash06(Level)
  406. If Level > 0 Then
  407. FL06.IntensityScale = (Level / 2.55) / 100
  408. FL06b.IntensityScale = (Level / 2.55) / 100
  409. FL06.State = 1
  410. FL06b.State = 1
  411. Else
  412. FL06.State = 0
  413. FL06b.State = 0
  414. End If
  415. End Sub
  416.  
  417. Sub Flash17(Level)
  418. If Level > 0 Then
  419. FL17.IntensityScale = (Level / 2.55) / 100
  420. FL17.State = 1
  421. TEFlashP.image = "TopFlasherRedOn"
  422. Else
  423. FL17.State = 0
  424. TEFlashP.image = "TopFlasherRed"
  425. End If
  426. End Sub
  427.  
  428. Sub Flash18(Level)
  429. If Level > 0 Then
  430. FL18.IntensityScale = (Level / 2.55) / 100
  431. FL18.State = 1
  432. Else
  433. FL18.State = 0
  434. End If
  435. End Sub
  436.  
  437. Sub Flash19(Level)
  438. If Level > 0 Then
  439. FL19.IntensityScale = (Level / 2.55) / 100
  440. FL19.State = 1
  441. Else
  442. FL19.State = 0
  443. End If
  444. End Sub
  445.  
  446. Sub Flash20(Level)
  447. If Level > 0 Then
  448. FL20.Opacity = (Level / 2.55)
  449. FL20.visible = 1
  450. else
  451. FL20.Visible = 0
  452. end if
  453. end sub
  454.  
  455. Sub Flash21(Level)
  456. If Level > 0 Then
  457. FL21.IntensityScale = (Level / 2.55) / 100
  458. FL21b.IntensityScale = (Level / 2.55) / 100
  459. FL21.State = 1
  460. FL21b.State = 1
  461. If SideWallFlashers = 1 then
  462. FL21c.visible = 1
  463. FL21d.visible = 1
  464. End If
  465. Else
  466. FL21.State = 0
  467. FL21b.State = 0
  468. FL21c.visible = 0
  469. FL21d.visible = 0
  470.  
  471. End If
  472. End Sub
  473.  
  474. Sub who_h(Level)
  475. If Level > 0 Then
  476. FL22.IntensityScale = (Level / 2.55) / 100
  477. FL22.State = 1
  478. else
  479. FL22.State = 0
  480. end if
  481. End Sub
  482.  
  483. Sub who_o(Level)
  484. If Level > 0 Then
  485. FL23.IntensityScale = (Level / 2.55) / 100
  486. FL23.State = 1
  487. else
  488. FL23.State = 0
  489. end if
  490. End Sub
  491.  
  492. Sub Flash24(Level)
  493. If Level > 0 Then
  494. FL24.IntensityScale = (Level / 2.55) / 100
  495. FL24.State = 1
  496. Else
  497. FL24.State = 0
  498. End If
  499. End Sub
  500.  
  501.  
  502. '**************
  503. ' Flipper Subs
  504. '**************
  505. 'SolCallback(sLRFlipper) = "SolRFlipper"
  506. 'SolCallback(sLLFlipper) = "SolLFlipper"
  507. 'SolCallback(sULFlipper) = "solULFlipper"
  508.  
  509. Sub SolLFlipper(Enabled)
  510. If Enabled Then
  511. PlaySound SoundFX("flipperup" ,DOFFlippers),0,1,-.5:LeftFlipper.RotateToEnd
  512. Else
  513. PlaySound SoundFX("FlipperDown" ,DOFFlippers),0,1,-.5:LeftFlipper.RotateToStart
  514. End If
  515. End Sub
  516.  
  517. Sub SolULFlipper(Enabled)
  518. If Enabled Then
  519. PlaySound SoundFX("flipperup" ,DOFFlippers),0,1,-.5:LeftFlipper2.RotateToEnd
  520. Else
  521. PlaySound SoundFX("FlipperDown" ,DOFFlippers),0,1,-.5:LeftFlipper2.RotateToStart
  522. End If
  523. End Sub
  524.  
  525.  
  526. Sub SolRFlipper(Enabled)
  527. If Enabled Then
  528. PlaySound SoundFX("flipperup" ,DOFFLippers),0,1,.5:RightFlipper.RotateToEnd
  529. Else
  530. PlaySound SoundFX("FlipperDown" ,DOFFlippers),0,1,.5:RightFlipper.RotateToStart
  531. End If
  532. End Sub
  533.  
  534.  
  535. '**********************************************************
  536. ' MiniPF Animation
  537. '**********************************************************
  538. Dim ZPos
  539.  
  540. Sub UpdateMiniPF(aCurrPos,aSpeed,aLast)
  541.  
  542. If aCurrPos > 180 Then
  543. ZPos = (((aCurrPos - 180)* -1) +180)
  544. Else
  545. ZPos = aCurrPos
  546. End If
  547.  
  548. For Each XX in MiniPF
  549. XX.TransZ = (ZPos * .7843)
  550. Playsound SoundFX("Motor-Old1" ,DOFGear),0,0.1,0,.1
  551. Next
  552.  
  553. For Each XX in MiniPF2
  554. XX.Z = ((ZPos * .7843) - 84.18)
  555. Next
  556. For Each XX in MiniPFLights
  557. XX.BulbHaloHeight = (ZPos * .7843)
  558. Next
  559.  
  560. Dim OldLevel :OldLevel = PFPos
  561. If aCurrPos < 35 then Controller.Switch(32) = false
  562. If aCurrPos > 35 and aCurrPos < 90 then Controller.Switch(32) = true
  563. If aCurrPos > 90 and aCurrPos < 145 then Controller.Switch(32) = false
  564. If aCurrPos > 145 and aCurrPos < 180 then Controller.Switch(32) = true
  565. If aCurrPos > 180 and aCurrPos < 190 then Controller.Switch(32) = false
  566. If aCurrPos > 190 and aCurrPos < 270 then Controller.Switch(32) = true
  567. If aCurrPos > 270 and aCurrPos < 350 then Controller.Switch(32) = false
  568. If aCurrPos > 350then Controller.Switch(32) = true
  569. If aCurrPos < 46 then PFPos = 0
  570. If aCurrPos > 45 and aCurrPos < 136 then PFPos = 1
  571. If aCurrPos > 135 and aCurrPos < 226 then PFPos = 2
  572. If aCurrPos > 225 and aCurrPos < 316 then PFPos = 1
  573. If aCurrPos > 315 then PFPos = 0
  574. If OldLevel <> PFPos Then
  575. Select Case PFPos
  576. Case 0:'Ground level
  577. Gate68.Collidable = 0
  578. Gate38.Collidable = 0
  579. Gate88.Collidable = 0
  580. sw68s.Enabled = 0
  581. sw38s.Enabled = 0
  582. sw88s.Enabled = 0
  583. sw71.isDropped = 1
  584. sw72.isDropped = 1
  585. sw73.isDropped = 1
  586. sw74.isDropped = 1
  587. sw75.isDropped = 1
  588. Pin1.Collidable = 0
  589. Pin2.Collidable = 0
  590. Pin3.Collidable = 0.
  591. Pin4.Collidable = 0
  592. Wall20.IsDropped = 1
  593. Wall21.IsDropped = 1
  594. Scoop3.Collidable = 0
  595. Scoop4.Collidable = 0
  596. Scoop5.Collidable = 0
  597. Case 1:'Buttons
  598. sw71.isDropped = 0
  599. sw72.isDropped = 0
  600. sw73.isDropped = 0
  601. sw74.isDropped = 0
  602. sw75.isDropped = 0
  603. Case 2:'Doors
  604. Gate68.Collidable = 1
  605. Gate38.Collidable = 1
  606. Gate88.Collidable = 1
  607. sw68s.Enabled = 1
  608. sw38s.Enabled = 1
  609. sw88s.Enabled = 1
  610. sw71.isDropped = 1
  611. sw72.isDropped = 1
  612. sw73.isDropped = 1
  613. sw74.isDropped = 1
  614. sw75.isDropped = 1
  615. Pin1.Collidable = 1
  616. Pin2.Collidable = 1
  617. Pin3.Collidable = 1
  618. Pin4.Collidable = 1
  619. Wall20.IsDropped = 0
  620. Wall21.IsDropped = 0
  621. Scoop3.Collidable = 1
  622. Scoop4.Collidable = 1
  623. Scoop5.Collidable = 1
  624. End Select
  625. End If
  626. End Sub
  627.  
  628. Sub TEHit_hit (idx)
  629. TEShake
  630. End Sub
  631.  
  632. Sub TEShake
  633. Playsound "metalhit2"
  634. For Each XX in MiniPF
  635. XX.TransY = (Pitch(activeball) * -.01)/2
  636. Next
  637. For Each XX in MiniPF2
  638. XX.TransY = (Pitch(activeball) * -.01)/2
  639. Next
  640. ResetMPF.Enabled = 1
  641. End Sub
  642.  
  643. Sub ResetMPF_timer
  644. For Each XX in MiniPF
  645. XX.TransY = 0
  646. Next
  647. For Each XX in MiniPF2
  648. XX.TransY = 0
  649. Next
  650. me.Enabled = 0
  651. End Sub
  652.  
  653. '**********************G.I STRING********************************
  654. Sub UpdateGI(giNo, status)
  655. Dim ii
  656. Select Case giNo
  657. ' Case 0 'BackBox 1,Insert in ROM
  658.  
  659. ' Case 1 'BackBox 2,Insert in ROM
  660.  
  661. Case 2 'String 3,PFa/Inserta in ROM
  662. If Status > 0 Then
  663. For each xx in GIG2
  664. xx.State = 1
  665. xx.IntensityScale = Status * .25: Next
  666. If GISideWalls = 1 then
  667. For each xx in GIF2
  668. xx.visible = 1: Next
  669. end if
  670. Else
  671. For each xx in GIG2: xx.State = 0: Next
  672. For each xx in GIF2: xx.visible = 0: Next
  673. End If
  674.  
  675. Case 3 'String 4,PFb/Insertb in ROM
  676. If Status > 0 Then
  677. For each xx in GIG3
  678. xx.State = 1
  679. xx.IntensityScale = Status * .25: Next
  680. If GISideWalls = 1 then
  681. For each xx in GIF3
  682. xx.visible = 1: Next
  683. End If
  684. Else
  685. For each xx in GIG3: xx.State = 0: Next
  686. For each xx in GIF3: xx.visible = 0:Next
  687. End If
  688.  
  689. Case 4 'String 5,PFc/Insertc in ROM
  690. If Status > 0 Then
  691. For each xx in GIG4
  692. xx.State = 1
  693. xx.IntensityScale = Status * .25: Next
  694. If GISideWalls = 1 then
  695. For each xx in GIF4
  696. xx.visible = 1: Next
  697. End if
  698. Else
  699. For each xx in GIG4: xx.State = 0: Next
  700. For each xx in GIF4: xx.visible = 0: Next
  701. End If
  702.  
  703. ' Case 5 'never passed from ROM 'PFc/Insertc in ROM
  704. End Select
  705.  
  706. End Sub
  707.  
  708. Dim GILevel
  709.  
  710. Sub Intensity
  711. If DayNight <= 20 Then
  712. GILevel = .5
  713. ElseIf DayNight <= 40 Then
  714. GILevel = .4125
  715. ElseIf DayNight <= 60 Then
  716. GILevel = .325
  717. ElseIf DayNight <= 80 Then
  718. GILevel = .2375
  719. Elseif DayNight <= 100 Then
  720. GILevel = .15
  721. End If
  722.  
  723. For each xx in GIG2: xx.Intensity = xx.Intensity * GILevel: Next
  724. For each xx in GIG3: xx.Intensity = xx.Intensity * GILevel: Next
  725. For each xx in GIG4: xx.Intensity = xx.Intensity * GILevel: Next
  726. End Sub
  727.  
  728. '*************Basic Insert Lights*****************
  729. '****set the timer internval to be the ROM Lamp number on the light Object
  730. '*********add lights to the AllLights collection, Create a LampTimer Timer object.
  731.  
  732. vpmMapLights AllLights
  733. '******************************************
  734.  
  735. ' misc
  736.  
  737.  
  738. Sub PrimTimer_Timer
  739. gate68p.RotX = Gate68.currentAngle
  740. Gate88p.RotX = gate88.CurrentAngle
  741. Gate38p.RotX = Gate38.CurrentAngle
  742. If Controller.Lamp(67) = 0 Then
  743. l67on.visible = 0
  744. If SideWallFlashers = 1 then
  745. l67onb.visible = 0
  746. End If
  747. Else
  748. L67on.visible = 1
  749. If SideWallFlashers = 1 then
  750. l67onb.visible = 1
  751. End If
  752. End If
  753. If SideWallFlashers = 1 then
  754. If GI33.State = 1 Then
  755. GI33b.visible = 1
  756. Else
  757. GI33b.visible =0
  758. End If
  759. If GI32.State = 1 Then
  760. GI32b.visible = 1
  761. Else
  762. GI32b.visible = 0
  763. End If
  764. End if
  765. If Light3.state = 1 Then
  766. Flasher4.visible = 1
  767. Else
  768. Flasher4.visible = 0
  769. End If
  770.  
  771. If Light2.state = 1 Then
  772. Flasher5.visible = 1
  773. Flasher6.visible = 1
  774. Else
  775. Flasher5.visible = 0
  776. Flasher6.visible = 0
  777. End If
  778.  
  779. 'TextBox2.Text = ABS(gi11.Intensity)
  780. 'TextBox1.Text =
  781. End Sub
  782.  
  783. ' *********************************************************************
  784. ' Supporting Ball & Sound Functions
  785. ' *********************************************************************
  786. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  787. Vol = Csng(BallVel(ball) ^2 / 2000)
  788. End Function
  789.  
  790. Function Vol2(ball1, ball2) ' Calculates the Volume of the sound based on the speed of two balls
  791. Vol2 = (Vol(ball1) + Vol(ball2) ) / 2
  792. End Function
  793.  
  794. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
  795. Dim tmp
  796. tmp = ball.x * 2 / table1.width-1
  797. If tmp> 0 Then
  798. Pan = Csng(tmp ^10)
  799. Else
  800. Pan = Csng(-((- tmp) ^10) )
  801. End If
  802. End Function
  803.  
  804. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  805. Pitch = BallVel(ball) * 20
  806. End Function
  807.  
  808. Function BallVel(ball) 'Calculates the ball speed
  809. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  810. End Function
  811.  
  812. '*****************************************
  813. ' JP's VP10 Collision & Rolling Sounds
  814. '*****************************************
  815. Const tnob = 8 ' maximum number of balls on the table (including locked/newton Balls)
  816. ReDim rolling(tnob)
  817. ReDim collision(tnob)
  818. Initcollision
  819.  
  820. Sub Initcollision
  821. Dim i
  822. For i = 0 to tnob
  823. collision(i) = -1
  824. rolling(i) = False
  825. Next
  826. End Sub
  827.  
  828. Sub CollisionTimer_Timer()
  829. Dim BOT, B, B1, B2, dx, dy, dz, distance, radii
  830. BOT = GetBalls
  831.  
  832. ' rolling
  833. For B = UBound(BOT) +1 to tnob
  834. rolling(b) = False
  835. StopSound("fx_ballrolling" & b)
  836. Next
  837.  
  838. If UBound(BOT) = -1 Then Exit Sub
  839.  
  840. For B = 0 to UBound(BOT)
  841. If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
  842. rolling(b) = True
  843. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0
  844. Else
  845. If rolling(b) = True Then
  846. StopSound("fx_ballrolling" & b)
  847. rolling(b) = False
  848. End If
  849. End If
  850. Next
  851.  
  852. 'collision
  853. If UBound(BOT) < 1 Then Exit Sub
  854.  
  855. For B1 = 0 to UBound(BOT)
  856. For B2 = B1 + 1 to UBound(BOT)
  857. dz = INT(ABS((BOT(b1).z - BOT(b2).z) ) )
  858. radii = BOT(b1).radius + BOT(b2).radius
  859. If dz <= radii Then
  860.  
  861. dx = INT(ABS((BOT(b1).x - BOT(b2).x) ) )
  862. dy = INT(ABS((BOT(b1).y - BOT(b2).y) ) )
  863. distance = INT(SQR(dx ^2 + dy ^2) )
  864.  
  865. If distance <= radii AND (collision(b1) = -1 OR collision(b2) = -1) Then
  866. collision(b1) = b2
  867. collision(b2) = b1
  868. PlaySound("fx_collide"), 0, Vol2(BOT(b1), BOT(b2)), Pan(BOT(b1)), 0, Pitch(BOT(b1)), 0, 0
  869. Else
  870. If distance > (radii + 10) Then
  871. If collision(b1) = b2 Then collision(b1) = -1
  872. If collision(b2) = b1 Then collision(b2) = -1
  873. End If
  874. End If
  875. End If
  876. Next
  877. Next
  878. End Sub
  879.  
  880. 'ball drops
  881. Sub RHelp_Hit:PlaySound "DROP_RIGHT":StopSound "WireRamp":End Sub' 'ActiveBall.VelY=0
  882. Sub RHelp2_Hit:ActiveBall.VelY=0:PlaySound "DROP_LEFT":End Sub
  883. Sub LaneEnd1_hit:Playsound "rubber_hit_2",0,1,1,.5 :end Sub
  884. Sub LaneEnd2_hit:Playsound "rubber_hit_2",0,1,-1,.5 :end Sub
  885. Sub Kicker4_hit:Playsound "Trough1",0,1,.8,.5 :end Sub
  886. Sub Trigger2_Hit:PlaySound "WireRamp",0,1,.75,.1:end Sub
  887. Sub tdenter_hit:playsound "DROP_LEFT",0,.5,0:end sub
  888.  
  889. Sub Pins_Hit (idx)
  890. PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  891. End Sub
  892.  
  893. Sub Targets_Hit (idx)
  894. PlaySound "target", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
  895. End Sub
  896.  
  897. Sub Metals_Thin_Hit (idx)
  898. PlaySound "metalhit_thin", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  899. End Sub
  900.  
  901. Sub Metals_Medium_Hit (idx)
  902. PlaySound "metalhit2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  903. End Sub
  904.  
  905. Sub Metals2_Hit (idx)
  906. PlaySound "metalhit", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  907. End Sub
  908.  
  909. Sub Gates_Hit (idx)
  910. PlaySound "gate4", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  911. End Sub
  912.  
  913. Sub Rubbers_Hit(idx)
  914. dim finalspeed
  915. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  916. If finalspeed > 20 then
  917. PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  918. End if
  919. If finalspeed >= 6 AND finalspeed <= 20 then
  920. RandomSoundRubber()
  921. End If
  922. End Sub
  923.  
  924. Sub RubberPosts_Hit(idx)
  925. dim finalspeed
  926. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  927. If finalspeed > 16 then
  928. PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  929. End if
  930. If finalspeed >= 6 AND finalspeed <= 16 then
  931. RandomSoundRubber()
  932. End If
  933. End Sub
  934.  
  935. Sub RandomSoundRubber()
  936. Select Case Int(Rnd*3)+1
  937. Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  938. Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  939. Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  940. End Select
  941. End Sub
  942.  
  943. Sub LeftFlipper_Collide(parm)
  944. RandomSoundFlipper()
  945. End Sub
  946.  
  947. Sub RightFlipper_Collide(parm)
  948. RandomSoundFlipper()
  949. End Sub
  950.  
  951. Sub RandomSoundFlipper()
  952. Select Case Int(Rnd*3)+1
  953. Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  954. Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  955. Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
  956. End Select
  957. End Sub
  958.  
  959. 'cFastFlips by nFozzy
  960. 'Bypasses pinmame callback for faster and more responsive flippers
  961. 'Version 1.1 beta2 (More proper behaviour, extra safety against script errors)
  962.  
  963. 'Flipper / game-on Solenoid # reference
  964. 'Atari: Sol16
  965. 'Astro: ?
  966. 'Bally Early 80's: Sol19
  967. 'Bally late 80's (Blackwater 100, etc): Sol19
  968. 'Game Plan: Sol16
  969. 'Gottlieb System 1: Sol17
  970. 'Gottlieb System 80: No dedicated flipper solenoid? GI circuit Sol10?
  971. 'Gottlieb System 3: Sol32
  972. 'Playmatic: Sol8
  973. 'Spinball: Sol25
  974. 'Stern (80's): Sol19
  975. 'Taito: ?
  976. 'Williams System 3, 4, 6: Sol23
  977. 'Williams System 7: Sol25
  978. 'Williams System 9: Sol23
  979. 'Williams System 11: Sol23
  980. 'Bally / Williams WPC 90', 92', WPC Security: Sol31
  981. 'Data East (and Sega pre-whitestar): Sol23
  982. 'Zaccaria: ???
  983.  
  984. '********************Setup*******************:
  985.  
  986. '....somewhere outside of any subs....
  987. 'dim FastFlips
  988. '....table init....
  989. 'Set FastFlips = new cFastFlips
  990. 'with FastFlips
  991. ' .CallBackL = "SolLflipper" 'Point these to flipper subs
  992. ' .CallBackR = "SolRflipper" '...
  993. '' .CallBackUL = "SolULflipper"'...(upper flippers, if needed)
  994. '' .CallBackUR = "SolURflipper"'...
  995. ' .TiltObjects = True 'Optional, if True calls vpmnudge.solgameon automatically. IF YOU GET A LINE 1 ERROR, DISABLE THIS! (or setup vpmNudge.TiltObj!)
  996. '' .InitDelay "FastFlips", 100 'Optional, if > 0 adds some compensation for solenoid jitter (occasional problem on Bram Stoker's Dracula)
  997. '' .DebugOn = False 'Debug, always-on flippers. Call FastFlips.DebugOn True or False in debugger to enable/disable.
  998. 'end with
  999.  
  1000. '...keydown section... commenting out upper flippers is not necessary as of 1.1
  1001. 'If KeyCode = LeftFlipperKey then FastFlips.FlipL True : FastFlips.FlipUL True
  1002. 'If KeyCode = RightFlipperKey then FastFlips.FlipR True : FastFlips.FlipUR True
  1003. '(Do not use Exit Sub, this script does not handle switch handling at all!)
  1004.  
  1005. '...keyUp section...
  1006. 'If KeyCode = LeftFlipperKey then FastFlips.FlipL False : FastFlips.FlipUL False
  1007. 'If KeyCode = RightFlipperKey then FastFlips.FlipR False : FastFlips.FlipUR False
  1008.  
  1009. '...Solenoid...
  1010. 'SolCallBack(31) = "FastFlips.TiltSol"
  1011. '//////for a reference of solenoid numbers, see top /////
  1012.  
  1013.  
  1014. 'One last note - Because this script is super simple it will call flipper return a lot.
  1015. 'It might be a good idea to add extra conditional logic to your flipper return sounds so they don't play every time the game on solenoid turns off
  1016. 'Example:
  1017. 'Instead of
  1018. 'LeftFlipper.RotateToStart
  1019. 'playsound SoundFX("FlipperDown",DOFFlippers), 0, 1, 0.01 'return
  1020. 'Add Extra conditional logic:
  1021. 'LeftFlipper.RotateToStart
  1022. 'if LeftFlipper.CurrentAngle = LeftFlipper.StartAngle then
  1023. ' playsound SoundFX("FlipperDown",DOFFlippers), 0, 1, 0.01 'return
  1024. 'end if
  1025. 'That's it]
  1026. '*************************************************
  1027. Function NullFunction(aEnabled):End Function '1 argument null function placeholder
  1028. Class cFastFlips
  1029. Public TiltObjects, DebugOn, hi
  1030. Private SubL, SubUL, SubR, SubUR, FlippersEnabled, Delay, LagCompensation, Name, FlipState(3)
  1031.  
  1032. Private Sub Class_Initialize()
  1033. Delay = 0 : FlippersEnabled = False : DebugOn = False : LagCompensation = False
  1034. Set SubL = GetRef("NullFunction"): Set SubR = GetRef("NullFunction") : Set SubUL = GetRef("NullFunction"): Set SubUR = GetRef("NullFunction")
  1035. End Sub
  1036.  
  1037. 'set callbacks
  1038. Public Property Let CallBackL(aInput) : Set SubL = GetRef(aInput) : Decouple sLLFlipper, aInput: End Property
  1039. Public Property Let CallBackUL(aInput) : Set SubUL = GetRef(aInput) : End Property
  1040. Public Property Let CallBackR(aInput) : Set SubR = GetRef(aInput) : Decouple sLRFlipper, aInput: End Property
  1041. Public Property Let CallBackUR(aInput) : Set SubUR = GetRef(aInput) : End Property
  1042. Public Sub InitDelay(aName, aDelay) : Name = aName : delay = aDelay : End Sub 'Create Delay
  1043. 'Automatically decouple flipper solcallback script lines (only if both are pointing to the same sub) thanks gtxjoe
  1044. Private Sub Decouple(aSolType, aInput) : If StrComp(SolCallback(aSolType),aInput,1) = 0 then SolCallback(aSolType) = Empty End If : End Sub
  1045.  
  1046. 'call callbacks
  1047. Public Sub FlipL(aEnabled)
  1048. FlipState(0) = aEnabled 'track flipper button states: the game-on sol flips immediately if the button is held down (1.1)
  1049. If not FlippersEnabled and not DebugOn then Exit Sub
  1050. subL aEnabled
  1051. End Sub
  1052.  
  1053. Public Sub FlipR(aEnabled)
  1054. FlipState(1) = aEnabled
  1055. If not FlippersEnabled and not DebugOn then Exit Sub
  1056. subR aEnabled
  1057. End Sub
  1058.  
  1059. Public Sub FlipUL(aEnabled)
  1060. FlipState(2) = aEnabled
  1061. If not FlippersEnabled and not DebugOn then Exit Sub
  1062. subUL aEnabled
  1063. End Sub
  1064.  
  1065. Public Sub FlipUR(aEnabled)
  1066. FlipState(3) = aEnabled
  1067. If not FlippersEnabled and not DebugOn then Exit Sub
  1068. subUR aEnabled
  1069. End Sub
  1070.  
  1071. Public Sub TiltSol(aEnabled) 'Handle solenoid / Delay (if delayinit)
  1072. If delay > 0 and not aEnabled then 'handle delay
  1073. vpmtimer.addtimer Delay, Name & ".FireDelay" & "'"
  1074. LagCompensation = True
  1075. else
  1076. If Delay > 0 then LagCompensation = False
  1077. EnableFlippers(aEnabled)
  1078. end If
  1079. End Sub
  1080.  
  1081. Sub FireDelay() : If LagCompensation then EnableFlippers False End If : End Sub
  1082.  
  1083. Private Sub EnableFlippers(aEnabled)
  1084. If aEnabled then SubL FlipState(0) : SubR FlipState(1) : subUL FlipState(2) : subUR FlipState(3)
  1085. FlippersEnabled = aEnabled
  1086. If TiltObjects then vpmnudge.solgameon aEnabled
  1087. If Not aEnabled then
  1088. subL False
  1089. subR False
  1090. If not IsEmpty(subUL) then subUL False
  1091. If not IsEmpty(subUR) then subUR False
  1092. End If
  1093. End Sub
  1094.  
  1095. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement