Arngrim

Hign Roller Casino

Jan 24th, 2020
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.16 KB | None | 0 0
  1.  
  2. ' ,***
  3. ' .,,*,,,. . /,
  4. ' .*(((*. .,,,,.,,..,,.,,,,. ./(((( .,., **. *,,.
  5. ' .*(#(((((,. ,,,,,,,,,,/##/,,,,,,,,,. .*(((((((( .//(/*. .**, .*((/*
  6. ' *%((/(((/(((//*,,,,,,*(%&(,,#&&(*,,,,,,//((((/((((((%# .,**,**,/****
  7. ' *((/((#(((((((#(((#%%/* .,*/(#%%(#(((#(((((#((((((, ,**/***,
  8. ' *(((((#(((/(((#((((((((,/(((((####(%(((((#(((((((, .***/***,**,
  9. ' .,,/(#((#####((#(,((((((%((((#%%%#(((/*((((#(#((((#(/*,. .,,(*, .*/, .//,,.
  10. ' .,*,,,,*(###((((#(##(.((((#(((((((((*(##/(((%(((##((((###(,.,,,*, .//, **. */*
  11. ' .,*,,,.,,,((###(##((###(.((###((#(###(*,(#####(%(######((####/*,,.,,,*,. /,
  12. ' .,,*,,,,,,*(&&%#(###((((####(*((###((#(####((&(###(#((####((((###(#%&%#*,..,,,,,,. ,,,,
  13. ' ..,**,,..,*/%/..*(######/#############(#%(##########(#(######/######(( .*#(,,,,,,,*,,,.
  14. ' .,,,.,,,,*/%&%/, ./&%%&&&%%%%%%%%&&%%%%%%%.*%%%##%&&%%%&&%%%%%%%&&&&&& ./&**,,,,.,,,..
  15. ' .,,,,*/////(%&&/*, */////////, ,(((/*/(//* *///***********.,*****(&&%(**,,,,,,,,.
  16. ' ,,,,,,,,(((((((#####(((, .*//((((/*. ((#######(, ./(######((* ((###########((*((#######(((((/*,,,,.,,,.
  17. ' .*,.,,,,*#&%##############(,*((##/(((####(((##(####((%, ./#(####(##/ (#(####((((####(#(############(#&&%/,,,,.,,.
  18. '.,,,,*/%&%* (#(#####(#(##(((#(((*,..,***,/(###%#####((. *((###(/. .*(####(%%(((##(%%#####(######((, ,(&%(,*,,,
  19. ',, .*(, ((((((/,((////(//,.. ..,,,,***(##(#((((( ,((((#(* .((((#(#(((%#(((/(((((((/((((((/ .(,,.*
  20. ',,,,,, (((((((*((((((%//*..... .,*(##(((((( , ,((((((* .(((((((((((%%%**(((((((*((((((/ ,,,,*
  21. ',/,,.,*,. ((//((((((///#(//#,. .*(##(///((#(((((( *(((/((((((* *((,,(((((((((((.. *((//(((((///((* ,,,,..,(
  22. ' /%(,,,,.,,,,,(/////////((%#///#//((((////(#*//((///(( ,/(/(##((///(* /(((#%((///(%((((,((.*((//////*/*/(#/,,,..,,,*%,
  23. ' ,(&%(*,,,..*(//*//(/**/(%#/**/*,,,,,...,//*/(#/***((((/*/#%((/,**((((/**/#/(/***(##((((((((#/**/(//*/((%(,.,,,*/%.
  24. ' *%&%(,,(//*//(/***/(%#/*,,,. *(%%%###%*,,,,,,***(##/******,,,,*/#%(/,,,,/((##(/*/#((/**/((/**/(/**(%,.
  25. ' .(&&%//*//%(**,,*(&%(/,,,,,/%%%%%%%%%%%####%%%&&&*(&&&&&%%####(((((/*,,,,,***,,,/#/(/,**(#(/*//%&%/,
  26. ' .(/***/##/*,,,*/%%(/(#%%%%&@@&%%%(,,,.. .,,,...,,*/.(%&&%#(///**,,*(%(/,,,*(##/**/((
  27. ' .(/*,,*/#(/,,,*/(*,*/&%%%%#/,.,%%%# **, (%%%%, */*/(###* ,%%%%%%%%%%(//,,,,,*((*,,/(*
  28. ' *(/,,,,,*#%(/(#%&(*,*#%%%%*. ,%&&/. *#%#%* ,%%%%/ #%%%%%%%#%*#%%%%%%%#%%/#&&%((/**(#/,,*/(*.
  29. ' /(*,,*/(#%*/, .*%&&%%%%%*.,,/#%%%%%%(..%%%%#%( .%%%&/./%%%%/#%%%%#%%%*%%%%&%* ./%%%%(/*,,//.
  30. ' /(((#&%(, #%%%**#%%%%%%%%#. /%%%&%%%%%%%%#,/%%%%/#%%%%&%%%%%%%%%%#* .,%%%((//.
  31. ' (%%/, .%%%%(/%&%%%%#%%%%#//%&&(,/%%%%%%%%%%%%%%*#%%##%%&&&%%%%%/. ./(%#,
  32. ' ,%###. /%%%&&&%%%%%%%%%%###%%%#%%%%%%%%(,.**(&@&(,..... .
  33. ' *%%#%. ,%%%%%%%%%%%%%(/(##%#/,,******.***#&*.
  34. ' .%%%%#(,*/(%%%%%%%//#&%#/*,,,..,,,,*(%&(*
  35. ' *%%%%%%%%%###%%%%* .*%&&(****(%/.
  36. ' ,(%%%%%%%%%%#((* ./%&&%/,
  37. '
  38. ' High Roller Casino
  39. ' Stern 2001
  40. '
  41. ' Table by DJRobX & Dids666
  42. ' Plastics renderings and dynamic drop shadow technique by Bord
  43. '
  44. ' Special thanks to:
  45. '
  46. ' Stern for creating this fun table. Go put some quarters in a real machine soon!
  47. ' Knorr for his Stern Apron prim.
  48. ' Destruk, TAB, bmiki75 for the previous versions of this table that were used as a reference for this one
  49. ' VPX and VPinmame dev teams
  50. ' NFozzy, Rothbauerw for their excellent physics tutorial and fading lights classes.
  51. ' Ninuzzu, JPSalas and others who have contributed script and other bits that make this work!
  52. ' Nailbuster for his autoQA script
  53. ' G5k, Nailbuster, TerryRed, Flupper, Freezy and all of the other inspirational contributors that keep this hobby interesting
  54. ' RandR, Dazz, and Noah Fentz for hosting our community
  55. '
  56. ' About this Table
  57. '
  58. ' Straight up, the resources we had weren't great. There's no pretty 4k playfield scan, no crisp plastic scans. Photoshop and upscalers
  59. ' can only take it so far. If better resources become available we will update the table!
  60. '
  61. ' Vpinmame 3.3 rev 4895 or later is REQUIRED! This table has a 4-solenoid stepper motor that cannot be read correctly without
  62. ' this code update.
  63. '
  64. ' Known issues:
  65. '
  66. ' 1) The ROM complains a lot about "possibly broken" switches. The switches that the diagnostic report identifies are very random.
  67. ' 2) The game may hang onto a ball at the pop entrance under the roulette wheel. I've caught this a couple times and confirmed
  68. ' that VPinMame thinks Switch 32 is active but the test menu shows it is not. So this must be either a bug in the game code or a bug in the emulation, probably the latter.
  69. ' Once the game does a ball hunt it will let go of it, so it's not a showstopper.
  70. ' 3) The roulette wheel is fairly complex for VPX. In multiball, if it dumps 3+ balls onto it at once, some of that dogpiling activity
  71. ' may slow down some systems. MaxBallsRoulette will delay autoplunges to try to mitigate this.
  72. '
  73. ' This table is for personal use only, and should not be included with a commercial product.
  74. '
  75. ' This table will be free to mod without permission after Septeember 1,2020.
  76. ' Before then, please reach out to DJRobX or Dids666 before distributing mods of this table.
  77.  
  78.  
  79.  
  80.  
  81. Option Explicit
  82. Randomize
  83.  
  84. Const cGameName = "hirolcas"
  85.  
  86. Dim AutoQA, MaxBallsRoulette, LUTmeUP, DisableLUTSelector
  87.  
  88. MaxBallsRoulette = 2 'Limit number of balls that can be active in the roulette wheel at once. Reduce to 1 if you are getting multiball stutter.
  89. AutoQA= False 'Enable AI player
  90. LUTMeUp = 2 '0 = No LUT. 1 = More vibrant color, 2 = Photoshop autocurve based on screeenshot, 3 = Autocurve with more saturation
  91. DisableLUTSelector = 0 ' Disables the ability to change LUT option with magna saves in game when set to 1
  92.  
  93.  
  94. On Error Resume Next
  95. ExecuteGlobal GetTextFile("controller.vbs")
  96. If Err Then MsgBox "Can't open controller.vbs"
  97. On Error Goto 0
  98.  
  99. Dim DesktopMode:DesktopMode = Table1.ShowDT
  100. Dim UseVPMDMD:UseVPMDMD = True
  101.  
  102. LoadVPM "02000000", "Sega.VBS", 3.43
  103.  
  104. Const UseSolenoids = 2
  105. Const UseLamps = False
  106. Const UseSync = False
  107. Const MaxLut = 3
  108.  
  109. ' Standard Sounds
  110. Const SSolenoidOn = ""
  111. Const SSolenoidOff = ""
  112. Const SCoin = "fx_coin"
  113.  
  114. Dim NullFader : set NullFader = new NullFadingObject
  115. Dim FadeLights : Set FadeLights = New LampFader
  116. Dim bsTrough, dtDrop,bsVLock,mMagnet,mRoulette,mRoulMag,bsSlot,mSlotRamp
  117. Dim BallInRampArea: BallInRampArea = False
  118.  
  119. NoUpperLeftFlipper
  120. NoUpperRightFlipper
  121.  
  122. Sub Table1_Init
  123. if not DesktopMode then ScoreText.Y = -500
  124. if table1.VersionMinor < 6 AND table1.VersionMajor = 10 then MsgBox "This table requires VPX 10.6, you have " & table1.VersionMajor & "." & table.VersionMinor
  125. if VPinMAMEDriverVer < 3.57 then MsgBox "This table requires core.vbs 3.57 or higher, which is included with VPX 10.6. You have " & VPinMAMEDriverVer & ". Be sure scripts folder is up to date, and that there are no old .vbs files in your table folder."
  126.  
  127. With Controller
  128. .GameName = cGameName
  129. If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
  130. .SplashInfoLine = ""
  131. .HandleKeyboard = 0
  132. .ShowTitle = 0
  133. .ShowDMDOnly = 1
  134. .ShowFrame = 0
  135. .HandleMechanics = False
  136. .Hidden = UseVPMDMD
  137. On Error Resume Next
  138. .Run GetPlayerHWnd
  139. If Err Then MsgBox Err.Description
  140. On Error Goto 0
  141. End With
  142.  
  143. if Controller.Version < "03030000" then MsgBox "This table requires vpinmame 3.3 rev 4895 or later. Yours reoprts " & Controller.Version & ". Please get the latest SAMBuild from VPUniverse"
  144.  
  145. AutoPlunger.Pullback
  146.  
  147. Set dtDrop=New cvpmDropTarget
  148. dtDrop.InitDrop Array(sw17,sw18,sw19,sw20),Array(17,18,19,20)
  149.  
  150. Set bsTrough=New cvpmBallStack
  151. with bsTrough
  152. .InitSw 0,14,13,12,11,0,0,0
  153. .InitKick BallRelease,90,7
  154. bsTrough.InitExitSnd Soundfx("fx_ballrel",DOFContactors), Soundfx("fx_solenoid",DOFContactors)
  155. .Balls=4
  156. end with
  157.  
  158. Set bsVLock=New cvpmVLock
  159. bsVLock.InitVLock Array(LockTr1,LockTr2,LockTr3),Array(LockKick1,LockKick2,LockKick3),Array(25,26,27)
  160. bsVLock.CreateEvents "bsVLock"
  161.  
  162.  
  163. ' Nudging
  164. vpmNudge.TiltSwitch = 1
  165. vpmNudge.Sensitivity = 1
  166. ' vpmNudge.TiltObj = Array(sw25, sw26, sw27, sw39, sw40)
  167.  
  168.  
  169. Set mMagnet=New cvpmMagnet
  170. mMagnet.InitMagnet OrbitMagnet,100
  171. mMagnet.Solenoid=13
  172. mMagnet.GrabCenter=1
  173. ' mMagnet.CreateEvents "mMagnet"
  174.  
  175.  
  176. vpmTimer.InitTimer RF1, True
  177. RouletteFloor.TimerInterval = 7
  178. '
  179. Set mSlotRamp=New cvpmMyMech
  180. ' In VPX 10.7+ should use "vpmMechFourStepSol" which happens to be the same as setting both StepSol and TwoDirSol
  181. ' mSlotRamp.MType=vpmMechFourStepSol+vpmMechStopEnd+vpmMechLinear+vpmMechFast
  182. mSlotRamp.MType=vpmMechStepSol+vpmMechTwoDirSol+vpmMechStopEnd+vpmMechLinear+vpmMechFast
  183. mSlotRamp.Sol1=26
  184. mSlotRamp.Length=300'150
  185. mSlotRamp.Steps=160
  186. mSlotRamp.AddSw 52,159,160
  187. mSlotRamp.AddSw 38,159,160
  188. mSlotRamp.Callback=GetRef("UpdateSlot")
  189. mSlotRamp.Start
  190.  
  191. InitLamps
  192. ' vpmtimer.addtimer 500, "PulseTimer.Interval=20 '"
  193. LUTBox.Visible = 0
  194. SetLUT
  195.  
  196. End Sub
  197.  
  198. Sub SetLUT
  199. Select Case LUTmeUP
  200. Case 0:table1.ColorGradeImage = 0
  201. Case Else: table1.ColorGradeImage = "LUT-" & CStr(LUTmeUP)
  202. end Select
  203. end sub
  204.  
  205. Sub LUTBox_Timer
  206. LUTBox.TimerEnabled = 0
  207. LUTBox.Visible = 0
  208. End Sub
  209.  
  210. Sub ShowLUT
  211. LUTBox.visible = 1
  212. LUTBox.text = "LUTmeUP: " & CStr(LUTmeUP)
  213. LUTBox.TimerEnabled = 1
  214. End Sub
  215.  
  216. Sub Table1_KeyDown(ByVal keycode)
  217. If keycode = RightMagnaSave Then
  218. if DisableLUTSelector = 0 then
  219. LUTmeUP = LUTMeUp + 1
  220. if LutMeUp > MaxLut then LUTmeUP = 0
  221. SetLUT
  222. ShowLUT
  223. end if
  224. end if
  225. If keycode = LeftMagnaSave Then
  226. if DisableLUTSelector = 0 then
  227. LUTmeUP = LUTMeUp - 1
  228. if LutMeUp < 0 then LUTmeUP = MaxLut
  229. SetLUT
  230. ShowLUT
  231. end if
  232. end if
  233. If keycode = LeftTiltKey Then Nudge 90, 2
  234. If keycode = RightTiltKey Then Nudge 270, 2
  235. If keycode = CenterTiltKey Then Nudge 0, 2
  236.  
  237. If vpmKeyDown(keycode) Then Exit Sub
  238. If keycode = PlungerKey Then Plunger.PullBack: PlaySound "fx_plungerpull",0,1,0.25,0.25: End If
  239. End Sub
  240.  
  241. Sub Table1_KeyUp(ByVal keycode)
  242. If keycode = PlungerKey Then Plunger.Fire: PlaySound "fx_plunger",0,1,0.25,0.25
  243. If vpmKeyUp(keycode) Then Exit Sub
  244.  
  245. End Sub
  246.  
  247. Sub Table1_Paused:Controller.Pause = 1:End Sub
  248. Sub Table1_UnPaused:Controller.Pause = 0:End Sub
  249. Sub Table1_Exit:Controller.Stop:End Sub
  250.  
  251.  
  252. Sub ShooterLane_Hit
  253. End Sub
  254.  
  255. Sub BallRelease_UnHit
  256. End Sub
  257.  
  258.  
  259. Sub Drain_Hit()
  260. PlaySound "fx_drain",0,1,0,0.25
  261. bsTrough.AddBall Me
  262. End Sub
  263.  
  264.  
  265. Set GICallback = GetRef("GIUpdate")
  266.  
  267. Sub GIUpdate(no, Enabled)
  268. If Enabled = 0 Then
  269. DOF 201, DOFOff
  270. Else
  271. DOF 201, DOFOn
  272. End if
  273. SetLamp 99, Enabled
  274. ' Dim light
  275. ' For each light in GI:light.State = Enabled: Next
  276. End Sub
  277.  
  278.  
  279. Sub HandleFlip(obj, angle)
  280. angle = (angle mod 360)
  281. dim ea:ea = obj.EndAngle
  282. if CInt(ea) <> CInt(angle) then
  283. obj.StartAngle = ea
  284. obj.EndAngle = angle
  285. obj.RotateToEnd
  286. end if
  287. end sub
  288.  
  289. sub RF1_Collide(parm):RouletteFlippersCollide():End Sub
  290. sub RF2_Collide(parm):RouletteFlippersCollide():End Sub
  291. sub RF3_Collide(parm):RouletteFlippersCollide():End Sub
  292. sub RF4_Collide(parm):RouletteFlippersCollide():End Sub
  293. sub RF6_Collide(parm):RouletteFlippersCollide():End Sub
  294. sub RF7_Collide(parm):RouletteFlippersCollide():End Sub
  295. sub RF8_Collide(parm):RouletteFlippersCollide():End Sub
  296.  
  297.  
  298. Sub RouletteFlippersCollide()
  299. debug.print "FlipColl"
  300. RandomSoundFlipper()
  301. Dim BV:BV = BallVel(ActiveBall)
  302.  
  303. ' VPX doesn't seem to do elasticity for the flipper tops. Simulate some random bounce by diverting some velocity to Z up if the ball is moving fast.
  304. if (Rnd < .8 and BV > 3) then
  305. debug.print "Spring"
  306. Dim amt: amt = Rnd
  307. ActiveBall.VelZ = (amt * BV) + 10
  308. if ActiveBall.VelZ > 20 then ActiveBall.VelZ = 20
  309.  
  310. ActiveBall.VelX = ActiveBall.VelX * (1 - amt)
  311. ActiveBall.VelY = ActiveBall.VelY * (1 - amt)
  312.  
  313. end if
  314. End Sub
  315.  
  316.  
  317. Sub RouletteFloor_Hit
  318. StopBallSpin
  319. 'PlaySoundAtBall "fx_metalhit"
  320. End Sub
  321.  
  322.  
  323. Sub RouletteHole_Hit
  324. ' ** Silly hack - i'm not sure if this is a ROM bug but the table may hold the ball in multiball up in the entry lock
  325. ' while another one is going round in the roulette wheen, without
  326. ' releasing the ball, which doesn't leave room for another ball to fall. So if there is a ball waiting in the raised post and another
  327. ' is coming down, force release to make room for this ball on the next loop.
  328. if Controller.Switch(32)<>0 and FadeLights.state(122)=0 then
  329. SolPopEntry(True)
  330. vpmtimer.addtimer 500, "SolPopEntry(False) '"
  331. end if
  332.  
  333. ' Debug.Print "RouletteHole: " & CStr(Round(BallVel(ActiveBall) , 2)) & " X " & ActiveBall.x & " Y " & ActiveBall.y & " Z " & ActiveBall.z
  334. StopBallSpin
  335. if BallVel(ActiveBall) > 1 then
  336. ' We get crazy ball spin action if the ball hits this the wrong way, calm it down. This doesn't
  337. ' fully fix the problem, either, so I added a sketchy-AF one way gate
  338. ActiveBall.VelX = 0
  339. ActiveBall.VelY = 2
  340. ActiveBall.VelZ = .1
  341. 'Debug.Print "RouletteHole STOP: " & CStr(Round(BallVel(ActiveBall) , 2)) & " X " & ActiveBall.x & " Y " & ActiveBall.y & " Z " & ActiveBall.z
  342. PlaySound "fx_balldrop", 0, 1, AudioPan(ActiveBall), 0, 1, 1, 0, AudioFade(ActiveBall)
  343. end if
  344.  
  345.  
  346. ' ActiveBall.Z = 40
  347. ' vpmTimer.PulseSw 32
  348.  
  349. End Sub
  350.  
  351. dim wp: wp = 0
  352.  
  353. Sub RouletteFloor_Timer
  354. wp = (wp + .6)
  355. if wp > 360 then wp = wp - 360
  356. dim aNewPos:aNewPos = 360-wp
  357. Roulette.RotY = aNewPos -14
  358. rsflasher.RotZ = aNewPos
  359. Primitive3.RotY = aNewPos
  360. HandleFlip RF1, aNewPos + 106
  361. HandleFlip RF2, aNewPos + 106 + 45
  362. HandleFlip RF3, aNewPos + 106 + 90
  363. HandleFlip RF4, aNewPos + 106 + 90 + 45
  364. HandleFlip RF5, aNewPos + 286
  365. HandleFlip RF6, aNewPos + 286 + 45
  366. HandleFlip RF7, aNewPos + 286 + 90
  367. HandleFlip RF8, aNewPos + 286 + 90 + 45
  368. Select Case ( ((aNewPos + 333) MOD 360) \ 45 )
  369. Case 0:Controller.Switch(41)=1:Controller.Switch(42)=0:Controller.Switch(43)=0:Controller.Switch(44)=0'13
  370. Case 1:Controller.Switch(41)=1:Controller.Switch(42)=0:Controller.Switch(43)=0:Controller.Switch(44)=1'0
  371. Case 2:Controller.Switch(41)=0:Controller.Switch(42)=0:Controller.Switch(43)=0:Controller.Switch(44)=1'18
  372. Case 3:Controller.Switch(41)=0:Controller.Switch(42)=0:Controller.Switch(43)=1:Controller.Switch(44)=1'26
  373. Case 4:Controller.Switch(41)=0:Controller.Switch(42)=0:Controller.Switch(43)=1:Controller.Switch(44)=0'7
  374. Case 5:Controller.Switch(41)=0:Controller.Switch(42)=1:Controller.Switch(43)=1:Controller.Switch(44)=0'00
  375. Case 6:Controller.Switch(41)=0:Controller.Switch(42)=1:Controller.Switch(43)=0:Controller.Switch(44)=0'11
  376. Case 7:Controller.Switch(41)=1:Controller.Switch(42)=1:Controller.Switch(43)=0:Controller.Switch(44)=0'21
  377. End Select
  378. End Sub
  379.  
  380. Dim MechPos:MechPos = 0
  381.  
  382. Sub UpdateSlot(NewPos, aSpeed, LastPos)
  383. SlotRampPrim.RotX = (NewPos * 20 / 160) - 21
  384. MechPos = NewPos
  385. End Sub
  386.  
  387. sub SyncSlotRamp
  388. if not BallInRampArea then
  389. if MechPos < 10 then
  390. SlotRampUp.Collidable = True
  391. SlotBlock.Collidable = True
  392. elseif MechPos < 150 then
  393. SlotRampUp.Collidable = false
  394. SlotRampMid.Collidable = True
  395. SlotBlock.Collidable = True
  396. Else
  397. SlotRampUp.Collidable = False
  398. SlotRampMid.Collidable = False
  399. SlotBlock.Collidable = False
  400. end if
  401. end if
  402. End Sub
  403.  
  404. sub StopBallSpin
  405. ActiveBall.AngMomZ = 0
  406. ActiveBall.AngMomX = 0
  407. ActiveBall.AngMomY = 0
  408. end sub
  409.  
  410. sub OrbitMagnet_Hit
  411. debug.print "magnethit"
  412. StopBallSpin
  413. mMagnet.AddBall ActiveBall
  414.  
  415. end sub
  416.  
  417. sub OrbitMagnet_UnHit
  418. debug.print "magnetunhit"
  419. mMagnet.RemoveBall ActiveBall
  420. end sub
  421.  
  422.  
  423.  
  424. '**********Sling Shot Animations
  425. ' Rstep and Lstep are the variables that increment the animation
  426. '****************
  427. Dim RStep, Lstep, RStepB, LStepB
  428.  
  429. Sub sw59_Slingshot
  430. vpmTimer.PulseSw 59
  431. PlaySoundAt SoundFX("fx_slingshot", DOFContactors), sw58 : LSling.Visible = 0
  432. LSling3.Visible = 1
  433. Lslingm1.TransZ = -20
  434. LStep = 0
  435. sw59.TimerEnabled = 1
  436. End Sub '
  437.  
  438. Sub sw59_Timer
  439. Select Case LStep
  440. Case 3:LSLing3.Visible = 0:LSLing2.Visible = 1:lslingm1.TransZ = -10
  441. Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:LSlingm1.TransZ = 0:me.TimerEnabled = 0
  442. End Select
  443. LStep = LStep + 1
  444. End Sub
  445.  
  446. Sub sw62_Slingshot
  447. vpmTimer.PulseSw 62:PlaySoundAt SoundFX("fx_slingshot", DOFContactors), sw61
  448. RSling.Visible = 0
  449. RSling3.Visible = 1
  450. Rslingm1.TransZ = -20
  451. RStep = 0
  452. sw62.TimerEnabled = 1
  453. End Sub
  454.  
  455. Sub sw62_Timer
  456. Select Case RStep
  457. Case 3:RSling3.Visible = 0:RSLing2.Visible = 1:rslingm1.TransZ = -10
  458. Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:rslingm1.TransZ = 0:me.TimerEnabled = 0
  459. End Select
  460. RStep = RStep + 1
  461. End Sub
  462.  
  463.  
  464. Sub sw47_Slingshot
  465. vpmTimer.PulseSw 47:PlaySoundAt SoundFX("fx_slingshot", DOFContactors), L130a
  466. LSlingB.Visible = 0
  467. LSlingB3.Visible = 1
  468. LslingBM.TransZ = -20
  469. LStepB = 0
  470. sw47.TimerEnabled = 1
  471. End Sub
  472.  
  473. Sub sw47_Timer
  474. Select Case LStepB
  475. Case 3:LSLingB3.Visible = 0:LSLingB2.Visible = 1:lslingbm.TransZ = -10
  476. Case 4:LSLingB2.Visible = 0:LSLingB.Visible = 1:lslingbm.TransZ = 0:me.TimerEnabled = 0
  477. End Select
  478. LStepB = LStepB + 1
  479. End Sub
  480.  
  481.  
  482.  
  483. Sub sw48_Slingshot
  484. vpmTimer.PulseSw 48:PlaySoundAt SoundFX("fx_slingshot", DOFContactors), LockKick3
  485. RSlingB.Visible = 0
  486. RSlingB3.Visible = 1
  487. RslingBM.TransZ = -20
  488. RStepB = 0
  489. sw48.TimerEnabled = 1
  490. End Sub
  491.  
  492. Sub sw48_Timer
  493. Select Case RStepB
  494. Case 3:RSLingB3.Visible = 0:RSLingB2.Visible = 1:rslingbm.TransZ = -10
  495. Case 4:RSLingB2.Visible = 0:RSLingB.Visible = 1:rslingbm.TransZ = 0:me.TimerEnabled = 0
  496. End Select
  497. RStepB = RStepB + 1
  498. End Sub
  499.  
  500. Sub LockOut_Hit
  501. StopBallSpin
  502. End Sub
  503.  
  504.  
  505. '************************************************
  506. ' Solenoids
  507. '************************************************
  508.  
  509. SolCallback(1) = "vpmTimer.PulseSw 15:bsTrough.SolOut"
  510. SolCallback(2) = "SolRequestAutoPlunger"
  511. SolCallback(3) = "SolDropReset"
  512. SolCallback(5) = "SetLamp 105," ' Slot Arm
  513. SolCallback(7) = "SolRouletteMotor"
  514. SolCallback(8) = "SetLamp 108,"
  515. SolCallback(14) = "PlaySoundAt SoundFX(""fx_plastichit"",DOFContactors), sw39:SetLamp 114,"
  516. SolCallback(13) = "debug.print ""magnet"" '"
  517. 'SolCallBack(17) = "vpmSolSound ""sling"","
  518. 'SolCallBack(18) = "vpmSolSound ""sling"","
  519. 'SolCallBack(19) = "vpmSolSound ""sling"","
  520. 'SolCallBack(20) = "vpmSolSound ""sling"","
  521. SolCallBack(21) = "SetLamp 121,"
  522. SolCallBack(22) = "SolPopEntry"
  523. SolCallBack(23) = "SolLockRelease"
  524. SolCallback(24) = "SolKnocker"
  525. SolCallBack(25) = "SolLockDiverter"
  526. SolCallback(26) = "SetLamp 126,"
  527. SolCallBack(30) = "SetLamp 130,"
  528. SolCallBack(31) = "SetLamp 131,"
  529. SolCallBack(32) = "SetLamp 132,"
  530.  
  531. SolCallback(sLRFlipper) = "SolRFlipper"
  532. SolCallback(sLLFlipper) = "SolLFlipper"
  533.  
  534. Dim AutoPlungeRequest:AutoPlungeRequest = 0
  535.  
  536. sub SolRequestAutoPlunger(Enabled)
  537. if Enabled then AutoPlungeRequest = 1
  538. end sub
  539.  
  540. sub DoAutoPlunge
  541. vpmSolAutoPlungeS AutoPlunger, SoundFX(SSolenoidOn, DOFContactors), 8, True
  542. vpmtimer.addtimer 500,"vpmSolAutoPlungeS AutoPlunger, """", 8, False '"
  543. AutoPlungeRequest = 0
  544. end sub
  545.  
  546. Sub SolRampMotor(Lvl)
  547. ' NOTE: This ramp is primarily driven by a mech, we are also using the fading lamp routine to drive the motor sounds (wind up, wind down).
  548. if Lvl > 0 then
  549. PlaySound SoundFX("highpitchmotor", DOFGear), -1, lvl * .02, AudioPan(sw35), 0, (1-lvl) * -10000, 1, 0, AudioFade(sw35)
  550. Else
  551. StopSound "highpitchmotor"
  552. end if
  553. End Sub
  554.  
  555. Sub SolRouletteMotor(Enabled)
  556. SetLamp 107,Enabled
  557. RouletteFloor.TimerEnabled = Enabled
  558. End Sub
  559.  
  560. Sub SolRouletteMotorSound(Lvl)
  561. if Lvl > 0 then
  562. PlaySound SoundFX("machinemotor", DOFGear), -1, lvl * .0005, AudioPan(sw53), 0, (1-lvl) * -10000, 1, 0, AudioFade(sw53)
  563. Else
  564. StopSound "machinemotor"
  565. end if
  566. End Sub
  567.  
  568.  
  569. Sub SolSlotArm(Lvl)
  570. SlotArm.RotZ = 90- ( 90 * Lvl)
  571. End Sub
  572.  
  573. Sub SolRampDiverter(Lvl)
  574. CenterDiverter.RotZ = 26 * Lvl
  575. if Lvl > .5 then
  576. RampCenterLeft.Collidable = False
  577. RampCenterRight.Collidable = True
  578. Else
  579. RampCenterLeft.Collidable = True
  580. RampCenterRight.Collidable = False
  581. End if
  582. End Sub
  583.  
  584. Sub SolPopEntry(Enabled)
  585. SetLamp 122, Enabled
  586. PopEntryPost.IsDropped=Enabled
  587. if Enabled then
  588. PlaySoundAt "fx_solenoid", sw32
  589. Else
  590. PlaySoundAt "fx_solenoidoff", sw32
  591. End if
  592. End Sub
  593.  
  594. Sub SolPopEntryPin(lvl)
  595. popentrypostp.Z = -50 - lvl * 50
  596. End Sub
  597.  
  598. Sub SolLockDiverter(Enabled)
  599. if Enabled then
  600. PlaySoundAt SoundFX("fx_solenoid",DOFContactors), l33
  601. Else
  602. PlaySoundAt SoundFX("fx_solenoidoff",DOFContactors), l33
  603. End if
  604. DiverterWall.IsDropped = not Enabled
  605. End Sub
  606.  
  607. Sub SolLFlipper(Enabled)
  608. If Enabled Then
  609. PlaySound SoundFX("fx_flipperup",DOFContactors), 0, 1, -0.1, 0.25
  610. LeftFlipper.RotateToEnd
  611. Else
  612. PlaySound SoundFX("fx_flipperdown",DOFContactors), 0, 1, -0.1, 0.25
  613. LeftFlipper.RotateToStart
  614. End If
  615. End Sub
  616.  
  617. Sub SolRFlipper(Enabled)
  618. If Enabled Then
  619. PlaySound SoundFX("fx_flipperup",DOFContactors), 0, 1, 0.1, 0.25
  620. RightFlipper.RotateToEnd
  621. Else
  622. PlaySound SoundFX("fx_flipperdown",DOFContactors), 0, 1, 0.1, 0.25
  623. RightFlipper.RotateToStart
  624. End If
  625. End Sub
  626.  
  627. Sub SolKnocker(Enabled)
  628. If Enabled Then PlaySound SoundFX("Knocker",DOFKnocker)
  629. End Sub
  630.  
  631. Sub SolDropReset(Enabled)
  632. If Enabled Then
  633. dtDrop.DropSol_On
  634. PlaySoundAt SoundFX("fx_resetdrop",DOFContactors), L15
  635. Controller.Switch(21)=0
  636. Controller.Switch(22)=0
  637. Controller.Switch(23)=0
  638. End If
  639. End Sub
  640.  
  641. Sub SolLockRelease(Enabled)
  642. SetLamp 123, Enabled
  643. if Enabled Then
  644. PlaySoundAt SoundFX("fx_solenoid",DOFContactors), LockKick1
  645. bsVLock.SolExit Enabled
  646. Else
  647. bsVLock.SolExit False
  648. End if
  649. End sub
  650.  
  651. Sub SolLockReleasePin(lvl)
  652. balllock.Z = 0 - lvl * 50
  653. End Sub
  654.  
  655.  
  656.  
  657. '************************************************
  658. ' Switches
  659. '************************************************
  660.  
  661.  
  662. Sub sw9_Hit:PlaySoundAtBall SoundFX("fx_target",DOFTargets):vpmTimer.PulseSw 9:End Sub
  663.  
  664. Sub sw10_Hit:PlaySoundAtBall SoundFX("fx_target",DOFTargets):vpmTimer.PulseSw 10:End Sub
  665.  
  666. Sub sw16_Hit
  667. Controller.Switch(16)=1:
  668. if AutoQA=false Then Exit Sub
  669. vpmtimer.addtimer 100,"Table1_KeyDown(PlungerKey) '"
  670. vpmtimer.addtimer 1000+RND(400),"Table1_KeyUp(PlungerKey) '"
  671. End Sub
  672.  
  673. Sub sw16_unHit:Controller.Switch(16)=0:End Sub
  674.  
  675. Sub sw17_Hit:dtDrop.Hit 1:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub
  676. Sub sw18_Hit:dtDrop.Hit 2:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub
  677. Sub sw19_Hit:dtDrop.Hit 3:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub
  678. Sub sw20_Hit:dtDrop.Hit 4:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub
  679.  
  680. Sub sw21_Hit:vpmTimer.PulseSw 21:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub
  681. Sub sw22_Hit:vpmTimer.PulseSw 22:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub
  682. Sub sw23_Hit:vpmTimer.PulseSw 23:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub
  683.  
  684. Sub Spinner_Spin:vpmTimer.PulseSw 24:PlaySoundAt "fx_spinner", Spinner:End Sub
  685.  
  686. Sub sw28_Hit:vpmTimer.PulseSw 28:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub
  687.  
  688. Sub sw29_Hit:vpmTimer.PulseSw 29:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub
  689.  
  690. Sub sw30_Hit:vpmTimer.PulseSw 30:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub
  691.  
  692. Sub sw31_Hit:vpmTimer.PulseSw 31:PlaySoundAtBall SoundFX("fx_target",DOFTargets):End Sub
  693.  
  694. Sub sw32_Hit:Controller.Switch(32)=1:End Sub
  695. Sub sw32_unHit:Controller.Switch(32)=0:End Sub
  696.  
  697. Sub SlotBack_Hit:vpmTimer.PulseSw 33: End Sub '
  698. Sub SlotBlock_Hit:vpmTimer.PulseSw 34:PlaySoundAtBall "fx_metalhit2": End Sub
  699. Sub SlotLegsP_Hit:PlaySoundAtBall "fx_metalhit2": End Sub
  700.  
  701. Sub sw35_Hit
  702. Controller.Switch(35)=1
  703. if ActiveBall.VelZ < -1 then PlaySoundAtBall "fx_balldrop"
  704. End Sub
  705.  
  706. Sub sw35_unHit:Controller.Switch(35)=0:End Sub
  707.  
  708. Sub sw36_Hit:vpmTimer.PulseSw 36:End Sub '36
  709. Sub sw37_Hit:Controller.Switch(37)=1:End Sub '37 Center Left RampEnter
  710. Sub sw37_unHit:Controller.Switch(37)=0:End Sub
  711. Sub sw39_Hit:Controller.Switch(39)=1:End Sub '39 Left Orbit Gate
  712. Sub sw39_unHit:Controller.Switch(39)=0:End Sub
  713. Sub sw40_Hit:vpmTimer.pulseSw 40:End Sub '40 Left Ramp Exit
  714. Sub Bumper1_Hit:vpmTimer.PulseSw 49:PlaySoundAtBumper SoundFX("fx_bumper1", DOFContactors), Bumper1:End Sub
  715. Sub Bumper2_Hit:vpmTimer.PulseSw 50:PlaySoundAtBumper SoundFX("fx_bumper2", DOFContactors), Bumper2:End Sub
  716. Sub Bumper3_Hit:vpmTimer.PulseSw 51:PlaySoundAtBumper SoundFX("fx_bumper3", DOFContactors), Bumper3:End Sub
  717. Sub sw53_Hit:vpmTimer.PulseSw 53:End Sub '53 Roulette Spin
  718.  
  719. 'Outlane_Inlane
  720. Sub sw60_Hit: PlaySoundAtBall "fx_sensor": Controller.Switch(60)=1:End Sub
  721. Sub sw60_UnHit: Controller.Switch(60)=0:End Sub
  722. Sub sw61_Hit: Controller.Switch(61) = 1: PlaySoundAtBall "fx_sensor":End Sub
  723. Sub sw61_UnHit: Controller.Switch(61) = 0: End Sub
  724. Sub sw57_Hit: Controller.Switch(57) = 1: PlaySoundAtBall "fx_sensor": End Sub
  725. Sub sw57_UnHit: Controller.Switch(57) = 0: End Sub
  726. Sub sw58_Hit: Controller.Switch(58) = 1: PlaySoundAtBall "fx_sensor": End Sub
  727. Sub sw58_UnHit: Controller.Switch(58) = 0: End Sub
  728.  
  729. Sub sw45_Hit: Controller.Switch(45) = 1: PlaySoundAtBall "fx_sensor": End Sub
  730. Sub sw45_UnHit: Controller.Switch(45) = 0: End Sub
  731.  
  732. Sub sw46_Hit(): debug.print "sw46": vpmTimer.PulseSw 46: PlaySoundAtBall "fx_sensor":End Sub
  733.  
  734.  
  735. Sub LeftRampStep_UnHit(): PlaySoundAtBall "fx_balldrop": End Sub
  736.  
  737.  
  738. ' Cheesy but effective hacks. Move ball behind slot if it ends up trapped near it.
  739.  
  740. Sub BallEscape1_Hit
  741. ActiveBall.x = L132a.x
  742. ActiveBall.y = L132a.y
  743. ActiveBall.z = 50
  744. End Sub
  745.  
  746. Sub BallEscape2_Hit: BallEscape1_Hit: End Sub
  747. Sub BallEscape3_Hit: BallEscape1_Hit: End Sub
  748.  
  749.  
  750. ' *********************************************************************
  751. ' Supporting Ball & Sound Functions
  752. ' *********************************************************************
  753.  
  754. ' Similar subroutines that are less complicated to use (e.g. simply use standard parameters for the PlaySound call)
  755. Sub PlaySoundAt(soundname, tableobj)
  756. PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj)
  757. End Sub
  758.  
  759. Sub PlaySoundAtBallVol(soundname, voladd)
  760. PlaySound soundname, 1, Vol(ActiveBall) + voladd, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  761. End Sub
  762.  
  763. Sub PlaySoundAtBumper(sound, tableobj)
  764. PlaySound sound, 1, 1, AudioPan(tableobj), 0,0,1, 1, AudioFade(tableobj)
  765. End Sub
  766.  
  767. Sub PlaySoundAtBall(soundname)
  768. PlaySoundAt soundname, ActiveBall
  769. End Sub
  770.  
  771. Function AudioFade(tableobj) ' Fades between front and back of the table (for surround systems or 2x2 speakers, etc), depending on the Y position on the table. "table1" is the name of the table
  772. Dim tmp
  773. tmp = tableobj.y * 2 / table1.height-1
  774. If tmp > 0 Then
  775. AudioFade = Csng(tmp ^10)
  776. Else
  777. AudioFade = Csng(-((- tmp) ^10) )
  778. End If
  779. End Function
  780.  
  781. Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "table1" is the name of the table
  782. Dim tmp
  783. tmp = tableobj.x * 2 / table1.width-1
  784. If tmp > 0 Then
  785. AudioPan = Csng(tmp ^10)
  786. Else
  787. AudioPan = Csng(-((- tmp) ^10) )
  788. End If
  789. End Function
  790.  
  791.  
  792. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  793. Vol = Csng(BallVel(ball) ^2 / 2000)
  794. End Function
  795.  
  796. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  797. Pitch = BallVel(ball) * 20
  798. End Function
  799.  
  800. Function BallVel(ball) 'Calculates the ball speed
  801. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  802. End Function
  803.  
  804. Sub RandomSoundMetal()
  805. PlaySoundAtBallVol "fx_metal_hit_" & Int(Rnd*3)+1, .2
  806. End Sub
  807.  
  808. Dim NextOrbitHit:NextOrbitHit = 0
  809.  
  810. Sub RandomSoundFlipper()
  811. if Timer > NextOrbitHit then
  812. NextOrbitHit = Timer + .1 + (Rnd * .2)
  813. PlaySoundAtBallVol "fx_flip_hit_" & Int(Rnd*3)+1, .2
  814. end if
  815. End Sub
  816.  
  817. Sub LeftFlipper_Collide(parm)
  818. RandomSoundFlipper()
  819. End Sub
  820.  
  821. Sub RightFlipper_Collide(parm)
  822. RandomSoundFlipper()
  823. End Sub
  824.  
  825. Sub Rubbers_Hit(idx)
  826. PlaySoundAtBallVol "fx_rubber_hit_" & Int(Rnd*3)+1, .2
  827. End Sub
  828.  
  829. Sub Posts_Hit(idx)
  830. PlaySoundAtBallVol "fx_rubber_hit_" & Int(Rnd*3)+1, .2
  831. End Sub
  832.  
  833.  
  834. Sub PlasticRamps_Hit(idx)
  835. if BallVel(ActiveBall) > .3 and Timer > NextOrbitHit then
  836. RandomBump 2, Pitch(ActiveBall)
  837. ' Schedule the next possible sound time. This prevents it from rapid-firing noises too much.
  838. ' Lowering these numbers allow more closely-spaced clunks.
  839. NextOrbitHit = Timer + .1 + (Rnd * .2)
  840. end if
  841. End Sub
  842.  
  843. Sub MetalRamps_Hit(idx)
  844. if BallVel(ActiveBall) > .3 and Timer > NextOrbitHit then
  845. RandomBump 2, 20000 'Increased pitch to simulate metal wall
  846. ' Schedule the next possible sound time. This prevents it from rapid-firing noises too much.
  847. ' Lowering these numbers allow more closely-spaced clunks.
  848. NextOrbitHit = Timer + .2 + (Rnd * .2)
  849. end if
  850. End Sub
  851.  
  852.  
  853. '' Requires rampbump1 to 7 in Sound Manager
  854. Sub RandomBump(voladj, freq)
  855. dim BumpSnd:BumpSnd= "rampbump" & CStr(Int(Rnd*7)+1)
  856. PlaySound BumpSnd, 0, Vol(ActiveBall)+voladj, AudioPan(ActiveBall), 0, freq, 0, 1, AudioFade(ActiveBall)
  857. End Sub
  858.  
  859.  
  860.  
  861. '*****************************************
  862. ' JP's VP10 Rolling Sounds
  863. '*****************************************
  864.  
  865. Const tnob = 5 ' total number of balls
  866. ReDim rolling(tnob)
  867. InitRolling
  868.  
  869. Sub InitRolling
  870. Dim i
  871. For i = 0 to tnob
  872. rolling(i) = False
  873. Next
  874. End Sub
  875.  
  876. Sub RollingTimer_Timer()
  877. Dim BOT, b, ballpitch, BallInRoulette
  878. BOT = GetBalls
  879.  
  880. ' stop the sound of deleted balls
  881. For b = UBound(BOT) + 1 to tnob
  882. rolling(b) = False
  883. StopSound("fx_ballrolling" & b)
  884. Next
  885.  
  886. ' exit the sub if no balls on the table
  887. If UBound(BOT) = -1 Then Exit Sub
  888.  
  889. ' Track whether any ball is in the slot ramp area. Delay physics movements until balls are away from there,
  890. ' to prevent balls from getting stuck inside.
  891. BallInRampArea = False
  892. BallInRoulette = 0
  893.  
  894. ' play the rolling sound for each ball
  895. For b = 0 to UBound(BOT)
  896. if BOT(b).x > 153 and BOT(B).y > 421 and BOT(b).x < 350 and BOT(b).y < 765 Then
  897. BallInRampArea = True
  898. end if
  899. if BOT(b).z> 70 and BOT(B).x > 569 and BOT(B).y < 374 then
  900. BallInRoulette = BallInRoulette + 1
  901. end if
  902. if BOT(B).z < 0 then BallEscape1_Hit ' Ball falling into space..
  903.  
  904. If BallVel(BOT(b) ) > 1 Then
  905. If BOT(b).z < 30 Then
  906. ballpitch = Pitch(BOT(b) )
  907. Else
  908. ballpitch = Pitch(BOT(b) ) * 100
  909. ' SLEAZE!
  910. if BOT(b).z > 150 and BOT(b).VelZ > 0 then BOT(b).VelZ = 0
  911. End If
  912. rolling(b) = True
  913. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), AudioPan(BOT(b) ), 0, ballpitch, 1, 0, AudioFade(BOT(b))
  914. ' play ball drop sounds
  915. If BOT(b).VelZ < -1 and BOT(b).z < 55 and BOT(b).z > 27 Then 'height adjust for ball drop sounds
  916. PlaySound "fx_balldrop", 0, ABS(BOT(b).velz)/17, AudioPan(BOT(b)), 0, Pitch(BOT(b)), 1, 0, AudioFade(BOT(b))
  917. End If
  918.  
  919. Else
  920. If rolling(b) = True Then
  921. StopSound("fx_ballrolling" & b)
  922. rolling(b) = False
  923. End If
  924. End If
  925. Next
  926. if AutoPlungeRequest and BallInRoulette < MaxBallsRoulette then DoAutoPlunge
  927. SyncSlotRamp
  928. End Sub
  929.  
  930. '**********************
  931. ' Ball Collision Sound
  932. '**********************
  933.  
  934. Sub OnBallBallCollision(ball1, ball2, velocity)
  935. PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, AudioPan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1)
  936. End Sub
  937.  
  938. '******************************
  939. ' Diverse Collection Hit Sounds
  940. '******************************
  941.  
  942. Sub aBumpers_Hit (idx): PlaySound SoundFX("fx_bumper", DOFContactors), 0, 1, Audiopan(ActiveBall), 0, 0, 0, 0, AudioFade(ActiveBall): End Sub
  943. Sub aRollovers_Hit(idx):PlaySound "fx_sensor", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub
  944. Sub aRollovers_Hit(idx):PlaySound "fx_sensor", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub
  945. Sub aGates_Hit(idx):PlaySound "fx_Gate", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub
  946. Sub aMetals_Hit(idx):PlaySound "fx_MetalHit", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub
  947. Sub aRubber_Bands_Hit(idx):PlaySound "fx_rubber", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub
  948. Sub aRubbers_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub
  949. Sub aRubber_Posts_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub
  950. Sub aRubber_Pins_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub
  951. Sub aYellowPins_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub
  952. Sub aPlastics_Hit(idx):PlaySound "fx_PlasticHit", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub
  953. Sub aWoods_Hit(idx):PlaySound "fx_Woodhit", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall):End Sub
  954.  
  955. ' Ramp Sounds
  956. Sub RHelp1_Hit()
  957. StopSound "fx_metalrolling"
  958. PlaySound "fx_ballrampdrop", 0, 1, pan(ActiveBall)
  959. End Sub
  960.  
  961. Sub RHelp2_Hit()
  962. StopSound "fx_metalrolling"
  963. PlaySound "fx_ballrampdrop", 0, 1, pan(ActiveBall)
  964. End Sub
  965.  
  966. '*************************************************************
  967. ' Lamp routines
  968. ' SetLamp xx, 0 is Off. SetLamp xx,1 is On
  969. '*************************************************************
  970. Dim LampState(200), FadingLevel(200), FadingState(200)
  971. Dim FlashState(200), FlashLevel(200)
  972. Dim FlashSpeedUp, FlashSpeedDown
  973.  
  974. LampTimer.Interval = -1
  975. LampTimer.Enabled = 1
  976.  
  977. Dim MiniDMDMap(15,7)
  978.  
  979. Sub GIAdjust(lvl)
  980. if (lvl > .5) then
  981. plastics.image="plastics1"
  982. plastics.blenddisablelighting = (lvl - .5) * 2
  983. Else
  984. plastics.image="plastics1off"
  985. plastics.blenddisablelighting = lvl * 2 + .5
  986. end if
  987.  
  988. if (lvl > .2) then
  989. sidewalls.image="Side_Walls_GI_On"
  990. sidewalls.blenddisablelighting = lvl
  991. Else
  992. sidewalls.image="Side_Walls_GI_Off"
  993. sidewalls.blenddisablelighting = lvl * 2
  994. end if
  995.  
  996. if (lvl > 0) then
  997. smallsidewalls.image="metal_walls_GI_OnTex"
  998. smallsidewalls.blenddisablelighting = lvl
  999. Else
  1000. smallsidewalls.image="metal_walls_GI_OffTex"
  1001. smallsidewalls.blenddisablelighting = lvl * 6
  1002. end if
  1003. end sub
  1004.  
  1005. Sub FlasherP(obj, lvl)
  1006. dim lvlstep:lvlstep = CInt(lvl * 5)
  1007. obj.image="Flasher_Dome_Stage_" & lvlstep
  1008. obj.blenddisablelighting = lvl
  1009. end sub
  1010.  
  1011.  
  1012. Sub InitLamps
  1013.  
  1014. 'Adjust fading speeds (1 / full MS fading time)
  1015. dim x
  1016. for x = 0 to 140 : FadeLights.FadeSpeedUp(x) = 1/10 : FadeLights.FadeSpeedDown(x) = 1/25 : next
  1017. for x = 117 to 120 : FadeLights.FadeSpeedUp(x) = 1/5 : FadeLights.FadeSpeedDown(x) = 1/5 : next
  1018.  
  1019. 'Lamp Assignments
  1020. dim lightobj
  1021. For each lightobj in TableLights
  1022. ' Asumptions: Light is named "Lxxy" where x is the lamp number, and y is optionally a,b,c for multiple on the same id
  1023. dim arr, id, lname
  1024. lname = mid(lightobj.Name,2)
  1025. if not IsNumeric(Right(lname, 1)) then lname = Left(lname, len(lname)-1)
  1026. id = cInt(lname)
  1027. if TypeName(FadeLights.Obj(id)) = "NullFadingObject" then
  1028. arr = array(lightobj)
  1029. Else
  1030. arr = FadeLights.Obj(id)
  1031. ReDim Preserve arr(UBound(arr) + 1)
  1032. set arr(UBound(arr)) = lightobj
  1033. end if
  1034. FadeLights.Obj(id) = arr
  1035. next
  1036.  
  1037. ' Flasher extras
  1038. FadeLights.Callback(132) = "FlasherP L132p,"
  1039. FadeLights.Callback(130) = "FlasherP L130p,"
  1040. FadeLights.Callback(121) = "FlasherP L121p,"
  1041. FadeLights.Callback(108) = "FlasherP L108p,"
  1042.  
  1043.  
  1044. dim giarr
  1045. For each lightobj in GI
  1046. if IsEmpty(giarr) then
  1047. giarr = array(lightobj)
  1048. Else
  1049. ReDim Preserve giarr(UBound(giarr) + 1)
  1050. set giarr(UBound(giarr)) = lightobj
  1051. end if
  1052. next
  1053.  
  1054. FadeLights.Callback(99) = "GIAdjust"
  1055. FadeLights.Obj(99) = GiArr
  1056.  
  1057. if DesktopMode Then
  1058. For each lightobj in BGLights
  1059. lightobj.state = 1
  1060. Set FadeLights.Obj(lightobj.TimerInterval) = lightobj
  1061. next
  1062. end if
  1063.  
  1064. dim led
  1065.  
  1066. 'Solenoid assignments
  1067.  
  1068. FadeLights.Callback(105) = "SolSlotArm"
  1069.  
  1070. FadeLights.Callback(107) = "SolRouletteMotorSound"
  1071. FadeLights.FadeSpeedUp(107) = 1/5 : FadeLights.FadeSpeedDown(107) = 1/5
  1072.  
  1073. FadeLights.Callback(126) = "SolRampMotor"
  1074. FadeLights.FadeSpeedUp(126) = 1/5 : FadeLights.FadeSpeedDown(126) = 1/5
  1075.  
  1076. FadeLights.Callback(114) = "SolRampDiverter"
  1077.  
  1078. FadeLights.Callback(122) = "SolPopEntryPin"
  1079. FadeLights.FadeSpeedUp(122) = 1/5 : FadeLights.FadeSpeedDown(122) = 1/5
  1080.  
  1081. FadeLights.Callback(123) = "SolLockReleasePin"
  1082. FadeLights.FadeSpeedUp(123) = 1/5 : FadeLights.FadeSpeedDown(123) = 1/5
  1083.  
  1084.  
  1085. ' Drop target shadows
  1086.  
  1087. for x = 91 to 94 : FadeLights.FadeSpeedUp(x) = 1/20 : FadeLights.FadeSpeedDown(x) = 1/20 : next
  1088.  
  1089. Set FadeLights.Obj(91) = drop1
  1090. Set FadeLights.Obj(92) = drop2
  1091. Set FadeLights.Obj(93) = drop3
  1092. Set FadeLights.Obj(94) = drop4
  1093.  
  1094. 'MiniDMD setup
  1095. For Each led in MiniDMD
  1096. Set MiniDMDMap(CInt(Mid(led.name, 2))-1, (asc("g") - asc(led.name)))= led
  1097. next
  1098.  
  1099. End Sub
  1100.  
  1101. Sub OneMsTimer_Timer()
  1102. FadeLights.Update1
  1103. End Sub
  1104.  
  1105. Sub LampTimer_Timer()
  1106. Dim chgLamp, num, chg, ii
  1107. chgLamp = Controller.ChangedLamps
  1108. If Not IsEmpty(chgLamp) Then
  1109. For ii = 0 To UBound(chgLamp)
  1110. SetLamp ChgLamp(ii,0), ChgLamp(ii,1)
  1111. Next
  1112. End If
  1113.  
  1114. Dim ChgLED,jj,stat,obj
  1115. ChgLED=Controller.ChangedLEDs(&H00000000, &Hffffffff)
  1116. If Not IsEmpty(ChgLED) Then
  1117. For ii = 0 To UBound(chgLED)
  1118. num = chgLED(ii, 0) : chg = chgLED(ii, 1) : stat = chgLED(ii, 2)
  1119. for jj = 0 to 7
  1120. If chg And 1 Then
  1121. if Stat and 1 then
  1122. MiniDMDMap(num, jj).Material = "DMDOn"
  1123. MiniDMDMap(num, jj).BlendDisableLighting = 1
  1124. Else
  1125. MiniDMDMap(num, jj).Material = "DMDOff"
  1126. MiniDMDMap(num, jj).BlendDisableLighting = 0
  1127. end if
  1128. end if
  1129. chg = chg\4:stat = stat\4
  1130. Next
  1131. Next
  1132. End If
  1133. LeftFlipperP.ObjRotZ = LeftFlipper.CurrentAngle
  1134. RightFlipperP.ObjRotZ = RightFlipper.CurrentAngle
  1135. Flipperlsh.RotZ = LeftFlipper.CurrentAngle
  1136. Flipperrsh.RotZ = RightFlipper.CurrentAngle
  1137. BallShadowUpdate
  1138. UpdateTargetShadows
  1139. FadeLights.Update
  1140. End Sub
  1141.  
  1142. Sub UpdateTargetShadows
  1143. ' If the upper GI is off, shadows should be off.
  1144. if FadeLights.state(99) = 0 then
  1145. SetLamp 91, 0
  1146. SetLamp 92, 0
  1147. SetLamp 93, 0
  1148. SetLamp 94, 0
  1149. Else
  1150. SetLamp 91, 1+Controller.Switch(17)
  1151. SetLamp 92, 1+Controller.Switch(18)
  1152. SetLamp 93, 1+Controller.Switch(19)
  1153. SetLamp 94, 1+Controller.Switch(19)
  1154. end if
  1155. end sub
  1156.  
  1157. ' *********************************************************************
  1158. ' BALL SHADOW
  1159. ' *********************************************************************
  1160. ReDim BallShadow(tnob-1)
  1161. InitBallShadow
  1162.  
  1163. Sub InitBallShadow
  1164. Dim i: For i=0 to tnob-1
  1165. ExecuteGlobal "Set BallShadow(" & i & ")=BallShadow" & (i+1) & ":"
  1166. Next
  1167. End Sub
  1168.  
  1169. Sub BallShadowUpdate()
  1170. Dim BOT, b
  1171. BOT = GetBalls
  1172. ' hide shadow of deleted balls
  1173. If UBound(BOT)<(tnob-1) Then
  1174. For b = (UBound(BOT) + 1) to (tnob-1)
  1175. BallShadow(b).visible = 0
  1176. Next
  1177. End If
  1178. ' exit the Sub if no balls on the table
  1179. If UBound(BOT) = -1 Then Exit Sub
  1180. ' render the shadow for each ball
  1181. For b = 0 to UBound(BOT)
  1182. ' stuck ball hack! ' 889.1185 168.7713 24.99723
  1183. if BOT(b).x > 888 and BOT(b).y < 169 and BOT(b).z < 26 then BOT(b).x = 500
  1184. If BOT(b).X < Table1.Width/2 Then
  1185. BallShadow(b).X = ((BOT(b).X) - (Ballsize/6) + ((BOT(b).X - (Table1.Width/2))/10)) + 10
  1186. Else
  1187. BallShadow(b).X = ((BOT(b).X) + (Ballsize/6) + ((BOT(b).X - (Table1.Width/2))/10)) - 10
  1188. End If
  1189. ballShadow(b).Y = BOT(b).Y + 20
  1190. If BOT(b).Z > 20 Then
  1191. BallShadow(b).visible = 1
  1192. Else
  1193. BallShadow(b).visible = 0
  1194. End If
  1195. Next
  1196. End Sub
  1197.  
  1198.  
  1199. Sub SetLamp(nr, value)
  1200. ' If the lamp state is not changing, just exit.
  1201. if FadeLights.state(nr) = value then exit sub
  1202.  
  1203. FadeLights.state(nr) = value
  1204. End Sub
  1205.  
  1206.  
  1207. Class NullFadingObject : Public Property Let IntensityScale(input) : : End Property : End Class 'todo do better
  1208.  
  1209. Class LampFader
  1210. Public FadeSpeedDown(140), FadeSpeedUp(140)
  1211. Private Lock(140), Loaded(140), OnOff(140)
  1212. Public UseFunction
  1213. Private cFilter
  1214. Private UseCallback(140), cCallback(140)
  1215. Public Lvl(140), Obj(140)
  1216.  
  1217. Sub Class_Initialize()
  1218. dim x : for x = 0 to uBound(OnOff) 'Set up fade speeds
  1219. if FadeSpeedDown(x) <= 0 then FadeSpeedDown(x) = 1/100 'fade speed down
  1220. if FadeSpeedUp(x) <= 0 then FadeSpeedUp(x) = 1/80'Fade speed up
  1221. UseFunction = False
  1222. lvl(x) = 0
  1223. OnOff(x) = False
  1224. Lock(x) = True : Loaded(x) = False
  1225. Next
  1226.  
  1227. for x = 0 to uBound(OnOff) 'clear out empty obj
  1228. if IsEmpty(obj(x) ) then Set Obj(x) = NullFader' : Loaded(x) = True
  1229. Next
  1230. End Sub
  1231.  
  1232. Public Property Get Locked(idx) : Locked = Lock(idx) : End Property 'debug.print Lampz.Locked(100) 'debug
  1233. Public Property Get state(idx) : state = OnOff(idx) : end Property
  1234. Public Property Let Filter(String) : Set cFilter = GetRef(String) : UseFunction = True : End Property
  1235. Public Property Let Callback(idx, String) : cCallback(idx) = String : UseCallBack(idx) = True : End Property
  1236.  
  1237. Public Property Let state(ByVal idx, input) 'Major update path
  1238. input = cBool(input)
  1239. if OnOff(idx) = Input then : Exit Property : End If 'discard redundant updates
  1240. OnOff(idx) = input
  1241. Lock(idx) = False
  1242. Loaded(idx) = False
  1243. End Property
  1244.  
  1245. Public Sub TurnOnStates() 'If obj contains any light objects, set their states to 1 (Fading is our job!)
  1246. dim debugstr
  1247. dim idx : for idx = 0 to uBound(obj)
  1248. if IsArray(obj(idx)) then
  1249. dim x, tmp : tmp = obj(idx) 'set tmp to array in order to access it
  1250. for x = 0 to uBound(tmp)
  1251. if typename(tmp(x)) = "Light" then DisableState tmp(x) : debugstr = debugstr & tmp(x).name & " state'd" & vbnewline
  1252.  
  1253. Next
  1254. Else
  1255. if typename(obj(idx)) = "Light" then DisableState obj(idx) : debugstr = debugstr & obj(idx).name & " state'd (not array)" & vbnewline
  1256.  
  1257. end if
  1258. Next
  1259. End Sub
  1260. Private Sub DisableState(ByRef aObj) : aObj.FadeSpeedUp = 1000 : aObj.State = 1 : End Sub 'turn state to 1
  1261.  
  1262. Public Sub Update1() 'Handle all boolean numeric fading. If done fading, Lock(True). Update on a '1' interval Timer!
  1263. dim x : for x = 0 to uBound(OnOff)
  1264. if not Lock(x) then 'and not Loaded(x) then
  1265. if OnOff(x) then 'Fade Up
  1266. Lvl(x) = Lvl(x) + FadeSpeedUp(x)
  1267. if Lvl(x) > 1 then Lvl(x) = 1 : Lock(x) = True
  1268. elseif Not OnOff(x) then 'fade down
  1269. Lvl(x) = Lvl(x) - FadeSpeedDown(x)
  1270. if Lvl(x) < 0 then Lvl(x) = 0 : Lock(x) = True
  1271. end if
  1272. end if
  1273. Next
  1274. End Sub
  1275.  
  1276.  
  1277. Public Sub Update() 'Handle object updates. Update on a -1 Timer! If done fading, loaded(x) = True
  1278. dim x,xx : for x = 0 to uBound(OnOff)
  1279. if not Loaded(x) then
  1280. if IsArray(obj(x) ) Then 'if array
  1281. If UseFunction then
  1282. for each xx in obj(x) : xx.IntensityScale = cFilter(Lvl(x)) : Next
  1283. Else
  1284. for each xx in obj(x) : xx.IntensityScale = Lvl(x) : Next
  1285. End If
  1286. else 'if single lamp or flasher
  1287. If UseFunction then
  1288. obj(x).Intensityscale = cFilter(Lvl(x))
  1289. Else
  1290. obj(x).Intensityscale = Lvl(x)
  1291. End If
  1292. end if
  1293. ' Sleazy hack for regional decimal point problem
  1294. If UseCallBack(x) then execute cCallback(x) & " CSng(" & CInt(10000 * Lvl(x)) & " / 10000)" 'Callback
  1295. If Lock(x) Then
  1296. if Lvl(x) = 1 or Lvl(x) = 0 then Loaded(x) = True 'finished fading
  1297. end if
  1298. end if
  1299. Next
  1300. End Sub
  1301. End Class
  1302.  
  1303.  
  1304.  
  1305.  
  1306. Class cvpmMyMech
  1307. Public Sol1, Sol2, MType, Length, Steps, Acc, Ret
  1308. Private mMechNo, mNextSw, mSw(), mLastPos, mLastSpeed, mCallback
  1309.  
  1310. Private Sub Class_Initialize
  1311. ReDim mSw(10)
  1312. gNextMechNo = gNextMechNo + 1 : mMechNo = gNextMechNo : mNextSw = 0 : mLastPos = 0 : mLastSpeed = 0
  1313. MType = 0 : Length = 0 : Steps = 0 : Acc = 0 : Ret = 0 : vpmTimer.addResetObj Me
  1314. End Sub
  1315.  
  1316. Public Sub AddSw(aSwNo, aStart, aEnd)
  1317. mSw(mNextSw) = Array(aSwNo, aStart, aEnd, 0)
  1318. mNextSw = mNextSw + 1
  1319. End Sub
  1320.  
  1321. Public Sub AddPulseSwNew(aSwNo, aInterval, aStart, aEnd)
  1322. If Controller.Version >= "01200000" Then
  1323. mSw(mNextSw) = Array(aSwNo, aStart, aEnd, aInterval)
  1324. Else
  1325. mSw(mNextSw) = Array(aSwNo, -aInterval, aEnd - aStart + 1, 0)
  1326. End If
  1327. mNextSw = mNextSw + 1
  1328. End Sub
  1329.  
  1330. Public Sub Start
  1331. Dim sw, ii
  1332. With Controller
  1333. .Mech(1) = Sol1 : .Mech(2) = Sol2 : .Mech(3) = Length
  1334. .Mech(4) = Steps : .Mech(5) = MType : .Mech(6) = Acc : .Mech(7) = Ret
  1335. ii = 10
  1336. For Each sw In mSw
  1337. If IsArray(sw) Then
  1338. .Mech(ii) = sw(0) : .Mech(ii+1) = sw(1)
  1339. .Mech(ii+2) = sw(2) : .Mech(ii+3) = sw(3)
  1340. ii = ii + 10
  1341. End If
  1342. Next
  1343. .Mech(0) = mMechNo
  1344. End With
  1345. If IsObject(mCallback) Then mCallBack 0, 0, 0 : mLastPos = 0 : vpmTimer.EnableUpdate Me, True, True ' <------- All for this.
  1346. End Sub
  1347.  
  1348. Public Property Get Position : Position = Controller.GetMech(mMechNo) : End Property
  1349. Public Property Get Speed : Speed = Controller.GetMech(-mMechNo) : End Property
  1350. Public Property Let Callback(aCallBack) : Set mCallback = aCallBack : End Property
  1351.  
  1352. Public Sub Update
  1353. Dim currPos, speed
  1354. currPos = Controller.GetMech(mMechNo)
  1355. speed = Controller.GetMech(-mMechNo)
  1356. If currPos < 0 Or (mLastPos = currPos And mLastSpeed = speed) Then Exit Sub
  1357. mCallBack currPos, speed, mLastPos : mLastPos = currPos : mLastSpeed = speed
  1358. End Sub
  1359.  
  1360. Public Sub Reset : Start : End Sub
  1361.  
  1362. End Class
  1363.  
  1364. '*****************************
  1365. ' AUTO TESTING
  1366. ' by:NailBuster
  1367. ' Global variable "AutoQA" below will switch all this on/off during testing.
  1368. '
  1369. '*****************************
  1370. ' NailBusters AutoQA Code and triggers..
  1371. ' this to do for ROM based: timeout on keydown. if 30 seconds, then assume game is over and you add coins/start game key.
  1372. ' add a timer called AutoQAStartGame. you can run every 10000 interval.
  1373.  
  1374. Dim QACoinStartSec:QACoinStartSec=60 'timeout seconds for AutoCoinStartSec
  1375. Dim QANumberOfCoins:QANumberOfCoins=4 'number of coins to add for each start
  1376. Dim QASecondsDiff
  1377.  
  1378. Dim QALastFlipperTime:QALastFlipperTime=Now()
  1379. Dim AutoFlipperLeft:AutoFlipperLeft=false
  1380. Dim AutoFlipperRight:AutoFlipperRight=false
  1381.  
  1382.  
  1383.  
  1384. Sub AutoQAStartGame_Timer() 'this is a timeout when sitting in attract with no flipper presses for 60 seconds, then add coins and start game.
  1385. if AutoQA=false Then Exit Sub
  1386.  
  1387. QASecondsDiff = DateDiff("s",QALastFlipperTime,NOW())
  1388.  
  1389. if QASecondsDiff>QACoinStartSec Then
  1390.  
  1391. 'simulate quarters and start game keys
  1392. Dim fx : fx=0
  1393. Dim keydelay : keydelay=100
  1394. Do While fx<QANumberOfCoins
  1395. vpmtimer.addtimer keydelay,"Table1_KeyDown(keyInsertCoin1) '"
  1396. vpmtimer.addtimer keydelay+200,"Table1_KeyUp(keyInsertCoin1) '"
  1397. keydelay=keydelay+500
  1398. fx=fx+1
  1399. Loop
  1400. vpmtimer.addtimer keydelay,"Table1_KeyDown(StartGameKey) '"
  1401. vpmtimer.addtimer keydelay+200,"Table1_KeyUp(StartGameKey) '"
  1402. QALastFlipperTime=Now()
  1403. AutoFlipperLeft=false
  1404. AutoFlipperRight=false
  1405. End if
  1406.  
  1407. if QASecondsDiff>30 Then 'safety of stuck up flipers.
  1408. AutoFlipperLeft=false
  1409. AutoFlipperRight=false
  1410. End if
  1411. End Sub
  1412.  
  1413.  
  1414.  
  1415. Sub FlipperUP(which) 'which=1 left 2 right
  1416. QALastFlipperTime=Now()
  1417. if which=1 Then
  1418. Table1_KeyDown(LeftFlipperKey)
  1419. vpmtimer.addtimer 200+Rnd(200),"Table1_KeyUP(LeftFlipperKey):AutoFlipperLeft=false '"
  1420. Else
  1421. Table1_KeyDown(RightFlipperKey)
  1422. vpmtimer.addtimer 200+Rnd(200),"Table1_KeyUP(RightFlipperKey):AutoFlipperRight=false '"
  1423. end If
  1424.  
  1425. End Sub
  1426.  
  1427.  
  1428. Sub AutoQATriggerLeft_Hit()
  1429. if AutoQA And AutoFlipperLeft=false then vpmtimer.addtimer 20+Rnd(50),"FlipperUP(1) '"
  1430. AutoFlipperLeft=true
  1431. End Sub
  1432.  
  1433. Sub AutoQATriggerRight_Hit()
  1434. if AutoQA and AutoFlipperRight=false then vpmtimer.addtimer 20+Rnd(20),"FlipperUP(2) '"
  1435. AutoFlipperRight=true
  1436. End Sub
Add Comment
Please, Sign In to add comment