Arngrim

Untitled

Dec 23rd, 2017
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.76 KB | None | 0 0
  1. '
  2. ' _, __, __, _, _, _, __, _, __, __, _,
  3. ' /_\ |_) |_) /_\ / ` /_\ | \ /_\ |_) |_) /_\
  4. ' | | |_) | \ | | \ , | | |_/ | | |_) | \ | |
  5. '
  6. ' Abra_Ca_Dabra by Gottlieb (1975)
  7. '
  8. ' -------------------------------------------------
  9. ' Gottlieb EM 4 player VPX table blank with options menu
  10. ' -------------------------------------------------
  11. '
  12. ' BorgDog, 2017
  13. '
  14. ' High Score sticky routines from mfuegemann's Fast Draw VPX table
  15. ' - flippers to change letter, Start to Select
  16. ' Ball control script from rothbauerw
  17. ' - press C during play to control ball, use arrows to move the ball
  18. ' Option menu and player up light rotation borrowed from loserman76 and gnance
  19. ' - hold down left shift during Game Over to bring up menu
  20. ' Ball shadows from ninuzzu
  21. ' - set option below to enable or disable
  22. ' primitives from Dark, zany, sliderpoint, hauntfreaks and I'm sure others
  23. '
  24. ' Layer usage generally
  25. ' 1 - most stuff
  26. ' 2 - triggers
  27. ' 3 - under apron walls and ramps
  28. ' 4 - options menu
  29. ' 5 - hi score sticky
  30. ' 6 - GI lighting
  31. ' 7 - plastics
  32. ' 8 - insert and bumper lighting
  33. '
  34.  
  35. '
  36. ' -------------------------------------------------
  37.  
  38. Option Explicit
  39. Randomize
  40.  
  41. Const cGameName = "Abracadabra"
  42. Const Ballsize = 50
  43. Const BallMass = 1.3
  44.  
  45. On Error Resume Next
  46. ExecuteGlobal GetTextFile("controller.vbs")
  47. If Err Then MsgBox "You need the Controller.vbs file in order to run this table (installed with the VPX package in the scripts folder)"
  48. On Error Goto 0
  49.  
  50. Dim operatormenu, options
  51. Dim bumperlitscore
  52. Dim bumperoffscore
  53. Dim balls, TempPlayerUp, rotatortemp
  54. Dim replays, freeplay
  55. Dim Replay1Table(3), Replay2Table(3), Replay3Table(3)
  56. dim replay1, replay2, replay3
  57. Dim Add10, Add100, Add1000
  58. Dim hisc
  59. Dim maxplayers, players, player
  60. Dim credit, DTcount, creditnum, credithole
  61. Dim score(4), bonus
  62. Dim state
  63. Dim tilt, tiltsens
  64. Dim ballinplay, PlungeBall
  65. Dim matchnumb
  66. dim ballrenabled
  67. dim rstep, lstep
  68. Dim rep(4)
  69. Dim rst
  70. Dim eg
  71. Dim bell
  72. Dim i,j, ii, objekt, light
  73.  
  74.  
  75. Dim DesktopMode: DesktopMode = Abra_Ca_Dabra.ShowDT
  76.  
  77. If DesktopMode = True Then 'Show Desktop components (in FS Mode, DesktopMode = False)
  78. for each objekt in backdropstuff : objekt.visible = 1 : next
  79. Else
  80. for each objekt in backdropstuff : objekt.visible = 0 : next
  81. End if
  82.  
  83.  
  84.  
  85. '**********************************************************
  86. '******** OPTIONS *******************************
  87. '**********************************************************
  88.  
  89. Dim BallShadows: Ballshadows=1 '******************set to 1 to turn on Ball shadows
  90. Dim FlipperShadows: FlipperShadows=1 '***********set to 1 to turn on Flipper shadows
  91.  
  92. sub Abra_Ca_Dabra_init
  93. LoadEM
  94. maxplayers=1
  95. Replay1Table(1)=55000
  96. Replay2Table(1)=69000
  97. Replay3Table(1)=77000
  98. Replay1Table(2)=65000
  99. Replay2Table(2)=79000
  100. Replay3Table(2)=87000
  101. Replay1Table(3)=75000
  102. Replay2Table(3)=89000
  103. Replay3Table(3)=97000
  104.  
  105. hideoptions
  106. player=1
  107. RotatorTemp=1
  108. balls=5 'SET DEFAULT VALUES PRIOR TO LOADING FROM SAVED FILE
  109. replays=1
  110. freeplay=0
  111. credit=0
  112. credithole=0
  113. creditnum=0
  114. hisc=10000
  115. HSA1=4
  116. HSA2=15
  117. HSA3=7
  118. matchnumb=1
  119. DTcount=5
  120. loadhs 'LOADS SAVED OPTIONS AND HIGH SCORE IF EXISTING
  121. UpdatePostIt 'UPDATE HIGH SCORE STICKY
  122. for i = 1 to maxplayers
  123. EVAL("ScoreReel"&i).setvalue score(i)
  124. EVAL("Reel100K"&i).setvalue(int(score(i)/100000))
  125. next
  126. bipreel.setvalue 0
  127. Creditreel.setvalue(credit)
  128. CreditHoleReel.setvalue(credithole)
  129. CreditNumReel.setvalue(creditnum)
  130. Replay1=Replay1Table(Replays)
  131. Replay2=Replay2Table(Replays)
  132. Replay3=Replay3Table(Replays)
  133. RepCard.image = "ReplayCard"&replays
  134. OptionBalls.image="OptionsBalls"&Balls
  135. OptionReplays.image="OptionsReplays"&replays
  136. OptionFreeplay.image="OptionsFreeplay"&freeplay
  137. bumperlitscore=1000
  138. bumperoffscore=100
  139. if balls=3 then
  140. InstCard.image="InstCard3balls"
  141. else
  142. InstCard.image="InstCard5balls"
  143. end if
  144. If B2SOn then
  145. showb2scredit
  146. for each objekt in backdropstuff : objekt.visible = 0 : next
  147. End If
  148. startGame.enabled=true
  149. tilt=false
  150. turnoff
  151. If credit>0 then DOF 125, DOFOn
  152.  
  153. if ballshadows=1 then
  154. BallShadowUpdate.enabled=1
  155. else
  156. BallShadowUpdate.enabled=0
  157. end if
  158.  
  159. if flippershadows=1 then
  160. FlipperLSh.visible=1
  161. FlipperRSh.visible=1
  162. else
  163. FlipperLSh.visible=0
  164. FlipperRSh.visible=0
  165. end if
  166.  
  167. Drain.CreateSizedballWithMass Ballsize/2,Ballmass
  168. End sub
  169.  
  170. sub startGame_timer
  171. PlaySoundAt "poweron", Plunger
  172. lightdelay.enabled=true
  173. me.enabled=false
  174. end sub
  175.  
  176. sub lightdelay_timer
  177. gamov.text="Game Over"
  178. if matchnumb=10 then
  179. matchtxt.text="00"
  180. else
  181. matchtxt.text=matchnumb*10
  182. end if
  183. For each light in GIlights:light.state=1:Next
  184.  
  185. If (DTcount Mod 2) = 1 then
  186. for each light in BumperLights: light.state=0:Next
  187. else
  188. for each light in BumperLights: light.state=1:Next
  189. end if
  190.  
  191. if B2SOn then
  192. for i = 1 to maxplayers
  193. Controller.B2SSetScorePlayer i, Score(i) MOD 100000
  194. next
  195. showb2scredit
  196. Controller.B2ssetMatch 34, matchnumb
  197. Controller.B2SSetGameOver 35,1
  198. Controller.B2SSetScorePlayer 5, hisc
  199. end if
  200. me.enabled=0
  201. end Sub
  202.  
  203.  
  204.  
  205. Sub Abra_Ca_Dabra_KeyDown(ByVal keycode)
  206.  
  207. if keycode = 46 then' C Key
  208. If contball = 1 Then
  209. contball = 0
  210. Else
  211. contball = 1
  212. End If
  213. End If
  214.  
  215. if keycode = 48 then 'B Key
  216. If bcboost = 1 Then
  217. bcboost = bcboostmulti
  218. Else
  219. bcboost = 1
  220. End If
  221. End If
  222.  
  223. if keycode = 203 then Cleft = 1' Left Arrow
  224.  
  225. if keycode = 200 then Cup = 1' Up Arrow
  226.  
  227. if keycode = 208 then Cdown = 1' Down Arrow
  228.  
  229. if keycode = 205 then Cright = 1' Right Arrow
  230.  
  231. if keycode=AddCreditKey then
  232. if freeplay = 1 or credit=9 then
  233. PlaySoundAt "coinreturn", Drain
  234. else
  235. PlaySoundAt "coinin" , Drain
  236. coindelay.enabled=true
  237. end if
  238. end if
  239.  
  240. if keycode=StartGameKey and (Credit>0 or freeplay=1) And Not HSEnterMode=true then
  241. if state=false then
  242. if freeplay=0 then
  243. credit=credit-1
  244. creditreel.setvalue(credit)
  245. creditnum=creditnum+1
  246. if creditnum>9 then creditnum=0
  247. creditnumreel.setvalue(creditnum)
  248. end if
  249. If credit < 1 Then DOF 125, DOFOff
  250. playsoundat "click", Drain
  251.  
  252. ballinplay=1
  253. If B2SOn Then
  254. showb2scredit
  255. Controller.B2ssetballinplay 32, Ballinplay
  256. Controller.B2ssetplayerup 30, 1
  257. Controller.B2ssetcanplay 31, 1
  258. Controller.B2SSetGameOver 0
  259. Controller.B2SSetScorePlayer 5, hisc
  260. End If
  261. for i = 1 to maxplayers
  262. score(i)=0
  263. rep(i)=0
  264. EVAL("Pup"&i).state=0
  265. EVAL("PupN"&i).state=0
  266. EVAL("ScoreReel"&i).resettozero
  267. EVAL("Reel100K"&i).setvalue 0
  268. If B2SOn then Controller.B2SSetScorePlayer i, score(i)
  269. next
  270. Pup1.state=1
  271. PupN1.state=1
  272. PlaySound("RotateThruPlayers"),0,.05,0,0.25
  273. TempPlayerUp=Player
  274. PlayerUpRotator.enabled=true
  275. tilt=false
  276. state=true
  277. PlaySoundAt "initialize", soundtrigger
  278. players=1
  279. canplayreel.setvalue(players)
  280. rst=0
  281. newgame.enabled=true
  282. else if state=true and players < maxplayers and Ballinplay=1 then
  283. if freeplay=0 then
  284. credit=credit-1
  285. if credit < 1 then DOF 125, DOFOff
  286. players=players+1
  287. Creditreel.setvalue(credit)
  288. creditnum=creditnum+1
  289. if creditnum>9 then creditnum=0
  290. creditnumreel.setvalue(creditnum)
  291. End if
  292. players=players+1
  293. canplayreel.setvalue(players)
  294. Creditreel.setvalue(credit)
  295. If B2SOn then
  296. showb2scredit
  297. Controller.B2ssetcanplay 31, players
  298. End If
  299. playsoundat "cluper", soundtrigger
  300. end if
  301. end if
  302. end if
  303.  
  304. If keycode = PlungerKey Then
  305. Plunger.PullBack
  306. PlaySoundat "plungerpull", Plunger
  307. End If
  308.  
  309. If keycode=LeftFlipperKey and State = false and OperatorMenu=0 then
  310. OperatorMenuTimer.Enabled = true
  311. end if
  312.  
  313. If keycode=LeftFlipperKey and State = false and OperatorMenu=1 then
  314. Options=Options+1
  315. If Options=5 then Options=1
  316. playsound "target"
  317. Select Case (Options)
  318. Case 1:
  319. Option1.visible=true
  320. Option4.visible=False
  321. Case 2:
  322. Option2.visible=true
  323. Option1.visible=False
  324. Case 3:
  325. Option3.visible=true
  326. Option2.visible=False
  327. Case 4:
  328. Option4.visible=true
  329. Option3.visible=False
  330. End Select
  331. end if
  332.  
  333. If keycode=RightFlipperKey and State = false and OperatorMenu=1 then
  334. PlaySound "metalhit2"
  335. Select Case (Options)
  336. Case 1:
  337. if Balls=3 then
  338. Balls=5
  339. InstCard.image="InstCard5balls"
  340. else
  341. Balls=3
  342. InstCard.image="InstCard3balls"
  343. end if
  344. OptionBalls.image = "OptionsBalls"&Balls
  345. Case 2:
  346. if freeplay=0 Then
  347. freeplay=1
  348. Else
  349. freeplay=0
  350. end if
  351. OptionFreeplay.image="OptionsFreeplay"&freeplay
  352. Case 3:
  353. Replays=Replays+1
  354. if Replays>3 then
  355. Replays=1
  356. end if
  357. Replay1=Replay1Table(Replays)
  358. Replay2=Replay2Table(Replays)
  359. OptionReplays.image = "OptionsReplays"&replays
  360. repcard.image = "ReplayCard"&replays
  361. Case 4:
  362. OperatorMenu=0
  363. savehs
  364. HideOptions
  365. End Select
  366. End If
  367.  
  368. If HSEnterMode Then HighScoreProcessKey(keycode)
  369.  
  370. if tilt=false and state=true then
  371. If keycode = LeftFlipperKey Then
  372. LeftFlipper.RotateToEnd
  373. PlaySoundAt SoundFXDOF("fx_flipperup",101,DOFOn,DOFContactors), LeftFlipper
  374. PlaySound "Buzz", -1, .01, AudioPan(LeftFlipper), .05,0, 0, 1, AudioFade(LeftFlipper)
  375. End If
  376.  
  377. If keycode = RightFlipperKey Then
  378. RightFlipper.RotateToEnd
  379. PlaySoundAt SoundFXDOF("fx_flipperup",102,DOFOn,DOFContactors), RightFlipper
  380. PlaySound "Buzz1", -1, .01, AudioPan(RightFlipper), .05,0, 0, 1, AudioFade(RightFlipper)
  381. End If
  382.  
  383. If keycode = LeftTiltKey Then
  384. Nudge 90, 2
  385. checktilt
  386. End If
  387.  
  388. If keycode = RightTiltKey Then
  389. Nudge 270, 2
  390. checktilt
  391. End If
  392.  
  393. If keycode = CenterTiltKey Then
  394. Nudge 0, 2
  395. checktilt
  396. End If
  397.  
  398. If keycode = MechanicalTilt Then
  399. gametilted
  400. End If
  401.  
  402. end if
  403. End Sub
  404.  
  405. Sub OperatorMenuTimer_Timer
  406. OperatorMenu=1
  407. Displayoptions
  408. Options=1
  409. End Sub
  410.  
  411. Sub DisplayOptions
  412. OptionsBack.visible = true
  413. Option1.visible = True
  414. OptionBalls.visible = True
  415. OptionReplays.visible = True
  416. OptionFreeplay.visible = True
  417. End Sub
  418.  
  419. Sub HideOptions
  420. for each objekt In OptionMenu
  421. objekt.visible = false
  422. next
  423. End Sub
  424.  
  425.  
  426. Sub Abra_Ca_Dabra_KeyUp(ByVal keycode)
  427.  
  428. if keycode = 203 then Cleft = 0' Left Arrow
  429.  
  430. if keycode = 200 then Cup = 0' Up Arrow
  431.  
  432. if keycode = 208 then Cdown = 0' Down Arrow
  433.  
  434. if keycode = 205 then Cright = 0' Right Arrow
  435.  
  436. If keycode = PlungerKey Then
  437. Plunger.Fire
  438. if PlungeBall=1 then
  439. PlaySoundAt "plunger", Plunger 'PLAY WHEN BALL IS HIT
  440. else
  441. PlaySoundAt "plungerreleasefree", Plunger 'PLAY WHEN NO BALL TO PLUNGE
  442. end if
  443. End If
  444.  
  445. if keycode = LeftFlipperKey then
  446. OperatorMenuTimer.Enabled = false
  447. end if
  448.  
  449. If tilt=false and state=true then
  450. If keycode = LeftFlipperKey Then
  451. LeftFlipper.RotateToStart
  452. PlaySoundAt SoundFXDOF("fx_flipperdown",101,DOFOff,DOFContactors), LeftFlipper
  453. StopSound "Buzz"
  454. End If
  455.  
  456. If keycode = RightFlipperKey Then
  457. RightFlipper.RotateToStart
  458. PlaySoundAt SoundFXDOF("fx_flipperdown",102,DOFOff,DOFContactors), RightFlipper
  459. StopSound "Buzz1"
  460. End If
  461. End if
  462. End Sub
  463.  
  464. Sub StartControl_Hit()
  465. Set ControlBall = ActiveBall
  466. contballinplay = true
  467. End Sub
  468.  
  469. Sub EndControl_Hit()
  470. contballinplay = false
  471. End Sub
  472.  
  473. Dim Cup, Cdown, Cleft, Cright, contball, contballinplay, ControlBall, bcboost
  474. Dim bcvel, bcyveloffset, bcboostmulti
  475.  
  476. bcboost = 1 'Do Not Change - default setting
  477. bcvel = 4 'Controls the speed of the ball movement
  478. bcyveloffset = -0.01 'Offsets the force of gravity to keep the ball from drifting vertically on the table, should be negative
  479. bcboostmulti = 3 'Boost multiplier to ball veloctiy (toggled with the B key)
  480.  
  481. Sub BallControl_Timer()
  482. If Contball and ContBallInPlay then
  483. If Cright = 1 Then
  484. ControlBall.velx = bcvel*bcboost
  485. ElseIf Cleft = 1 Then
  486. ControlBall.velx = - bcvel*bcboost
  487. Else
  488. ControlBall.velx=0
  489. End If
  490. If Cup = 1 Then
  491. ControlBall.vely = -bcvel*bcboost
  492. ElseIf Cdown = 1 Then
  493. ControlBall.vely = bcvel*bcboost
  494. Else
  495. ControlBall.vely= bcyveloffset
  496. End If
  497. End If
  498. End Sub
  499.  
  500. sub flippertimer_timer()
  501. LFlip.RotY = LeftFlipper.CurrentAngle+90
  502. RFlip.RotY = RightFlipper.CurrentAngle+90
  503. Pgate.rotz = (Gate.currentangle*.75)+25
  504.  
  505. if FlipperShadows=1 then
  506. FlipperLSh.RotZ = LeftFlipper.currentangle
  507. FlipperRSh.RotZ = RightFlipper.currentangle
  508. end if
  509.  
  510. end sub
  511.  
  512.  
  513. Sub PairedlampTimer_timer
  514. bumperlighta1.state = bumperlight1.state
  515. bumperlighta2.state = bumperlight2.state
  516. l10.state=l1.state
  517. l9.state=l2.state
  518. l8.state=l3.state
  519. l7.state=l4.state
  520. l6.state=l5.state
  521. LoutL.state=LTop1.state
  522. LinL.state=LTop2.state
  523. LinR.state=LTop3.state
  524. LoutR.state=LTop4.state
  525. l25a.state=l25.state
  526. end sub
  527.  
  528. sub coindelay_timer
  529. addcredit
  530. coindelay.enabled=false
  531. end sub
  532.  
  533. Sub addcredit
  534. if freeplay=0 then
  535. credit=credit+1
  536. if credit>9 then
  537. credit=9
  538. Else
  539. credithole=credithole+1
  540. if credithole>9 then credithole=0
  541. creditholereel.setvalue(credithole)
  542. end if
  543. DOF 125, DOFOn
  544.  
  545. Creditreel.setvalue(credit)
  546.  
  547. If B2SOn Then showb2scredit
  548. end if
  549. End sub
  550.  
  551. sub showb2scredit
  552. for i = 1 to 10
  553. Controller.B2ssetData i, 0
  554. next
  555. if Credit=0 then
  556. Controller.B2ssetData 10, 1
  557. else
  558. Controller.B2ssetData Credit, 1
  559. end if
  560. end sub
  561.  
  562. Sub Drain_Hit()
  563. ' DOF 134, DOFPulse
  564. PlaySoundAt "drain", Drain
  565. me.timerenabled=1
  566. End Sub
  567.  
  568. Sub Drain_timer
  569. ' scorebonus.enabled=true
  570. nextball
  571. me.timerenabled=0
  572. End Sub
  573.  
  574. sub ballhome_hit
  575. ballrenabled=1
  576. plungeball=1
  577. end sub
  578.  
  579. sub ballhome_unhit
  580. ' DOF 136, DOFPulse
  581. plungeball=0
  582. end sub
  583.  
  584. sub ballrel_hit
  585. if ballrenabled=1 then
  586. ballrenabled=0
  587. end if
  588. end sub
  589.  
  590. sub scorebonus '************add bonus scoring if applicable
  591.  
  592. addscore (bonus*1000)
  593.  
  594. End sub
  595.  
  596.  
  597. sub newgame_timer
  598. eg=0
  599. For each light in GIlights:light.state=1:next
  600. for each light in Lanes_lights:light.state=1: next
  601. for each light in Bonus_lights:light.state=0: next
  602. l25.state=0
  603. dt1.timerenabled=1
  604. l1000.state=1
  605. bonus=1
  606. DTlights(DTcount-1).state=1
  607. tilttxt.text=" "
  608. gamov.text=" "
  609. for i=1 to 2
  610. EVAL("Bumper"&i).hashitevent = 1
  611. Next
  612. LeftSlingShot.isdropped=False
  613. RightSlingShot.isdropped=False
  614. If B2SOn then
  615. Controller.B2SSetGameOver 35,0
  616. Controller.B2SSetTilt 33,0
  617. Controller.B2SSetMatch 34,0
  618. End If
  619. bipreel.setvalue 1
  620. matchtxt.text=" "
  621. newball
  622. ballrelTimer.enabled=true
  623. newgame.enabled=false
  624. end sub
  625.  
  626.  
  627. sub newball
  628. ' for each light in bumperlights:light.state=1:next
  629. ' for each light in Lanes_lights:light.state=1:next
  630. End Sub
  631.  
  632.  
  633. sub nextball
  634. if tilt=true then
  635. for i=1 to 2
  636. EVAL("Bumper"&i).hashitevent = 1
  637. Next
  638. LeftSlingShot.isdropped=False
  639. RightSlingShot.isdropped=False
  640. tilt=false
  641. tilttxt.text=" "
  642. If B2SOn then
  643. Controller.B2SSetTilt 33,0
  644. Controller.B2ssetdata 1, 1
  645. End If
  646. end if
  647. if player=1 then ballinplay=ballinplay+1
  648. if ballinplay>balls then
  649. playsound "GameOver"
  650. eg=1
  651. ballreltimer.enabled=true
  652. else
  653. For each objekt in PlayerHuds
  654. objekt.State = 0
  655. next
  656. For each objekt in PlayerHUDScores
  657. objekt.state=0
  658. next
  659. PlayerHuds(Player-1).State =1
  660. PlayerHUDScores(Player-1).state=1
  661. PlaySound("RotateThruPlayers"),0,.05,0,0.25
  662. TempPlayerUp=Player
  663. PlayerUpRotator.enabled=true
  664. if state=true then
  665. newball
  666. ballreltimer.enabled=true
  667. end if
  668. bipreel.setvalue ballinplay
  669. If B2SOn then Controller.B2ssetballinplay 32, Ballinplay
  670. end if
  671. End Sub
  672.  
  673. sub ballreltimer_timer
  674. dim hiscstate
  675. if eg=1 then
  676. hiscstate=0
  677. turnoff
  678. matchnum
  679. state=false
  680. bipreel.setvalue 0
  681. gamov.text="GAME OVER"
  682. gamov.timerenabled=1
  683. tilttxt.timerenabled=1
  684. canplayreel.setvalue(0)
  685. for i=1 to maxplayers
  686. if score(i)>hisc then
  687. hisc=score(i)
  688. hiscstate=1
  689. end if
  690. EVAL("Pup"&i).state=0
  691. EVAL("PupN"&i).state=0
  692. next
  693. if hiscstate=1 then
  694. HighScoreEntryInit()
  695. HStimer.uservalue = 0
  696. HStimer.enabled=1
  697. end if
  698. UpdatePostIt
  699. savehs
  700. If B2SOn then
  701. Controller.B2SSetGameOver 35,1
  702. Controller.B2ssetballinplay 32, 0
  703. Controller.B2SSetScorePlayer 5, hisc
  704. Controller.B2ssetcanplay 31, 0
  705. Controller.B2ssetcanplay 30, 0
  706. End If
  707. For each light in GIlights:light.state=0:next
  708. ballreltimer.enabled=false
  709. else
  710. Drain.kick 60,45,0
  711. ballreltimer.enabled=false
  712. playsoundat SoundFXDOF("kickerkick",141,DOFPulse,DOFContactors), Drain
  713. end if
  714. end sub
  715.  
  716. Sub HStimer_timer
  717. playsoundat SoundFXDOF("knock",140,DOFPulse,DOFKnocker), Plunger
  718.  
  719. HStimer.uservalue=HStimer.uservalue+1
  720. if HStimer.uservalue=3 then me.enabled=0
  721. end sub
  722.  
  723. Sub PlayerUpRotator_timer()
  724. If RotatorTemp<maxplayers+1 then
  725. TempPlayerUp=TempPlayerUp+1
  726. If TempPlayerUp>maxplayers then
  727. TempPlayerUp=1
  728. end if
  729. For each objekt in PlayerHuds
  730. objekt.state = 0
  731. next
  732. For each objekt in PlayerHUDScores
  733. objekt.state=0
  734. next
  735. PlayerHuds(TempPlayerUp-1).State = 1
  736. PlayerHUDScores(TempPlayerUp-1).state=1
  737. If B2SOn Then Controller.B2SSetPlayerUp TempPlayerUp
  738. else
  739. if B2SOn then Controller.B2SSetPlayerUp Player
  740. PlayerUpRotator.enabled=false
  741. RotatorTemp=1
  742. For each objekt in PlayerHuds
  743. objekt.State = 0
  744. next
  745. For each objekt in PlayerHUDScores
  746. objekt.state=0
  747. next
  748. PlayerHuds(Player-1).State = 1
  749. PlayerHUDScores(Player-1).state=1
  750. end if
  751. RotatorTemp=RotatorTemp+1
  752. end sub
  753.  
  754. sub matchnum
  755. if matchnumb=10 then
  756. matchtxt.text="00"
  757. If B2SOn then Controller.B2SSetMatch 100
  758. else
  759. matchtxt.text=matchnumb*10
  760. If B2SOn then Controller.B2SSetMatch 34,Matchnumb
  761. end if
  762. For i=1 to players
  763. if (matchnumb*10)=(score(i) mod 100) then
  764. addcredit
  765. PlaySoundAt SoundFXDOF("knock",140,DOFPulse,DOFKnocker), Plunger
  766. end if
  767. next
  768. end sub
  769.  
  770. '********** Bumpers
  771.  
  772. Sub Bumper1_Hit
  773. if tilt=false then
  774. PlaySoundAt SoundFXDOF("fx_bumper4",104,DOFPulse,DOFContactors), Bumper1
  775.  
  776. if bumperlight1.state=1 then
  777. addscore bumperlitscore
  778. else
  779. addscore bumperoffscore
  780. end if
  781. end if
  782. End Sub
  783.  
  784.  
  785. Sub Bumper2_Hit
  786. if tilt=false then
  787. PlaySoundAt SoundFXDOF("fx_bumper4",105,DOFPulse,DOFContactors), Bumper2
  788.  
  789. if BumperLight2.state=1 then
  790. addscore bumperlitscore
  791. else
  792. addscore bumperoffscore
  793. end if
  794. end if
  795. End Sub
  796.  
  797. sub ChangeBumperLights
  798. if BumperLight1.state=1 then
  799. for each light in BumperLights: light.state=0:Next
  800. else
  801. for each light in BumperLights: light.state=1:Next
  802. end if
  803. end sub
  804.  
  805. sub FlashBumpers
  806. if bumperlight1.state = 1 then
  807. for each light in BumperLights: light.duration 0, 300, 1:Next
  808. end If
  809. end sub
  810.  
  811. '************** Slings
  812.  
  813. Sub RightSlingShot_Slingshot
  814. PlaySoundAt SoundFXDOF("right_slingshot",127,DOFPulse,DOFContactors), slingR
  815.  
  816. addscore 10
  817. RSling.Visible = 0
  818. RSling1.Visible = 1
  819. slingR.objroty = -15
  820. RStep = 1
  821. RightSlingShot.TimerEnabled = 1
  822. End Sub
  823.  
  824. Sub RightSlingShot_Timer
  825. Select Case RStep
  826. Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:slingR.objroty = -7
  827. Case 4: slingR.objroty = 0:RSLing2.Visible = 0:RSLing.Visible = 1:RightSlingShot.TimerEnabled = 0
  828. End Select
  829. RStep = RStep + 1
  830. End Sub
  831.  
  832. Sub LeftSlingShot_Slingshot
  833. PlaySoundAt SoundFXDOF("left_slingshot",126,DOFPulse,DOFContactors), slingL
  834.  
  835. addscore 10
  836. LSling.Visible = 0
  837. LSling1.Visible = 1
  838. slingL.objroty = 15
  839. LStep = 1
  840. LeftSlingShot.TimerEnabled = 1
  841. End Sub
  842.  
  843. Sub LeftSlingShot_Timer
  844. Select Case LStep
  845. Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:slingL.objroty = 7
  846. Case 4:slingL.objroty = 0:LSLing2.Visible = 0:LSLing.Visible = 1:LeftSlingShot.TimerEnabled = 0
  847. End Select
  848. LStep = LStep + 1
  849. End Sub
  850.  
  851. '********** Dingwalls - animated - timer 50
  852.  
  853. sub dingwalla_hit
  854. if state=true and tilt=false then addscore 10
  855. SlingA.visible=0
  856. SlingA1.visible=1
  857. me.uservalue=1
  858. Me.timerenabled=1
  859. end sub
  860.  
  861. sub dingwalla_timer 'default 50 timer
  862. select case me.uservalue
  863. Case 1: SlingA1.visible=0: SlingA.visible=1
  864. case 2: SlingA.visible=0: SlingA2.visible=1
  865. Case 3: SlingA2.visible=0: SlingA.visible=1: Me.timerenabled=0
  866. end Select
  867. me.uservalue=me.uservalue+1
  868. end sub
  869.  
  870.  
  871. sub dingwallb_hit
  872. if state=true and tilt=false then addscore 10
  873. SlingB.visible=0
  874. SlingB1.visible=1
  875. me.uservalue=1
  876. Me.timerenabled=1
  877. end sub
  878.  
  879. sub dingwallb_timer 'default 50 timer
  880. select case me.uservalue
  881. Case 1: Slingb1.visible=0: SlingB.visible=1
  882. case 2: SlingB.visible=0: Slingb2.visible=1
  883. Case 3: Slingb2.visible=0: SlingB.visible=1: Me.timerenabled=0
  884. end Select
  885. me.uservalue=me.uservalue+1
  886. end sub
  887.  
  888. sub dingwallc_hit
  889. if state=true and tilt=false then addscore 10
  890. lSling.visible=0
  891. SlingC1.visible=1
  892. me.uservalue=1
  893. Me.timerenabled=1
  894. end sub
  895.  
  896. sub dingwallc_timer 'default 50 timer
  897. select case me.uservalue
  898. Case 1: Slingc1.visible=0: lSling.visible=1
  899. case 2: lsling.visible=0: Slingc2.visible=1
  900. Case 3: Slingc2.visible=0: lsling.visible=1: Me.timerenabled=0
  901. end Select
  902. me.uservalue=me.uservalue+1
  903. end sub
  904.  
  905. sub dingwalld_hit
  906. if state=true and tilt=false then addscore 10
  907. rSling.visible=0
  908. SlingD1.visible=1
  909. me.uservalue=1
  910. Me.timerenabled=1
  911. end sub
  912.  
  913. sub dingwalld_timer 'default 50 timer
  914. select case me.uservalue
  915. Case 1: Slingd1.visible=0: rSling.visible=1
  916. case 2: rsling.visible=0: Slingd2.visible=1
  917. Case 3: Slingd2.visible=0: rsling.visible=1: Me.timerenabled=0
  918. end Select
  919. me.uservalue=me.uservalue+1
  920. end sub
  921.  
  922. '********** Triggers
  923.  
  924. sub TGBonusL_hit
  925. DOF 145, DOFPulse
  926. scorebonus
  927. ' addscore 500
  928. end sub
  929.  
  930. sub TGoutL_hit '****** bot 1 rollover
  931. DOF 146, DOFPulse
  932. addscore 500
  933. LTop1.state=0
  934. awardcheck
  935. end sub
  936.  
  937. sub TGinL_hit '****** bot 2 rollover
  938. DOF 146, DOFPulse
  939. addscore 500
  940. Ltop2.state=0
  941. If balls=3 then LTop3.state =0
  942. awardcheck
  943. end sub
  944.  
  945. sub TGinR_hit '****** bot 3 rollover
  946. DOF 147, DOFPulse
  947. addscore 500
  948. Ltop3.state=0
  949. If balls=3 then Ltop2.state =0
  950. awardcheck
  951. end sub
  952.  
  953. sub TGoutR_hit '****** bot 4 rollover
  954. DOF 147, DOFPulse
  955. addscore 500
  956. Ltop4.state=0
  957. awardcheck
  958. end sub
  959.  
  960. sub TGBonusR_hit
  961. DOF 148, DOFPulse
  962. scorebonus
  963. ' addscore 500
  964. end sub
  965.  
  966. sub TGtop1_hit '***** top 1 rollover
  967. DOF 135, DOFPulse
  968. addscore 500
  969. LTop1.state=0
  970. awardcheck
  971. end sub
  972.  
  973. sub TGtop2_hit '***** top 2 rollover
  974. DOF 136, DOFPulse
  975. addscore 500
  976. LTop2.state=0
  977. If balls=3 then LTop3.state =0
  978. awardcheck
  979. end sub
  980.  
  981. sub TGtop3_hit '***** top 3 rollover
  982. DOF 137, DOFPulse
  983. addscore 500
  984. LTop3.state=0
  985. If balls=3 then Ltop2.state =0
  986. awardcheck
  987. end sub
  988.  
  989. sub TGtop4_hit '***** top 4 rollover
  990. DOF 138, DOFPulse
  991. addscore 500
  992. LTop4.state=0
  993. awardcheck
  994. end sub
  995.  
  996. sub awardcheck
  997. if Ltop1.state+ltop2.state+ltop3.state+ltop4.state=0 then
  998. if l5000.state=1 then addspecial
  999. ScoreBonus
  1000. addbonus
  1001. for each light in lanes_lights: light.state=1: next
  1002. end if
  1003. end sub
  1004.  
  1005. '********** Targets
  1006.  
  1007. Sub Target_hit
  1008. PlaySoundAt SoundFXDOF("target",103,DOFPulse,DOFTargets), Target
  1009. if l25.state=1 then
  1010. addbonus
  1011. if balls=5 then
  1012. dt1.timerenabled=1
  1013. else
  1014. if DT1.isdropped and DT2.isdropped and DT3.isdropped and DT4.isdropped and DT5.isdropped then dt2.timerenabled=1
  1015. if DT6.isdropped and DT7.isdropped and DT8.isdropped and DT9.isdropped and DT10.isdropped then dt6.timerenabled=1
  1016. end if
  1017. else
  1018. addscore 500
  1019. end if
  1020. if lspecial.state=1 Then
  1021. addspecial
  1022. Lspecial.state=0
  1023. end If
  1024. end sub
  1025.  
  1026. Sub DT1_timer
  1027. PlaySoundAt SoundFXDOF("DTreset",142,DOFPulse,DOFContactors), DT1
  1028. for i = 1 to 5
  1029. EVAL("DT"&i).isdropped=False
  1030. next
  1031. DT6.timerenabled=1
  1032. DT1.timerenabled=0
  1033. End Sub
  1034.  
  1035. Sub DT2_timer
  1036. PlaySoundAt SoundFXDOF("DTreset",142,DOFPulse,DOFContactors), DT1
  1037. for i = 1 to 5
  1038. EVAL("DT"&i).isdropped=False
  1039. next
  1040. DT2.timerenabled=0
  1041. L25.state=0
  1042. End Sub
  1043.  
  1044. Sub DT6_timer
  1045. PlaySoundAt SoundFXDOF("DTreset",143,DOFPulse,DOFContactors), DT6
  1046. for i = 6 to 10
  1047. EVAL("DT"&i).isdropped=False
  1048. next
  1049. DT6.timerenabled=0
  1050. L25.state=0
  1051. End sub
  1052.  
  1053. Sub addspecial
  1054. if freeplay=0 then addcredit
  1055. PlaySoundAt SoundFXDOF("knock",140,DOFPulse,DOFKnocker), Plunger
  1056. end sub
  1057.  
  1058. '********** Drop Targets
  1059.  
  1060. Sub DToff
  1061. for each objekt in DTlights: objekt.state=0: next
  1062. end sub
  1063.  
  1064. Sub MoveDTlights
  1065. DToff
  1066. DTcount=DTcount-1
  1067. if DTcount<1 then DTcount=5
  1068. DTlights(DTcount-1).state=1
  1069. end sub
  1070.  
  1071. Sub DT1_dropped
  1072. PlaySoundAt SoundFXDOF("drop1",111,DOFPulse,DOFDropTargets), DT1
  1073. ' PlaySoundAt "drop1", DT1
  1074. if l1.state=1 then
  1075. scorebonus
  1076. else
  1077. addscore 500
  1078. end if
  1079. DTcheck
  1080. end sub
  1081.  
  1082. Sub DT2_dropped
  1083. PlaySoundAt SoundFXDOF("drop1",111,DOFPulse,DOFDropTargets), DT2
  1084. ' PlaySoundAt "drop1", DT2
  1085. if l2.state=1 then
  1086. scorebonus
  1087. else
  1088. addscore 500
  1089. end if
  1090. DTcheck
  1091. end sub
  1092.  
  1093. Sub DT3_dropped
  1094. PlaySoundAt SoundFXDOF("drop1",111,DOFPulse,DOFDropTargets), DT3
  1095. ' PlaySoundAt "drop1", DT3
  1096. if l3.state=1 then
  1097. scorebonus
  1098. else
  1099. addscore 500
  1100. end if
  1101. DTcheck
  1102. end sub
  1103.  
  1104. Sub DT4_dropped
  1105. PlaySoundAt SoundFXDOF("drop1",111,DOFPulse,DOFDropTargets), DT4
  1106. ' PlaySoundAt "drop1", DT4
  1107. if l4.state=1 then
  1108. scorebonus
  1109. else
  1110. addscore 500
  1111. end if
  1112. DTcheck
  1113. end sub
  1114.  
  1115. Sub DT5_dropped
  1116. PlaySoundAt SoundFXDOF("drop1",111,DOFPulse,DOFDropTargets), DT5
  1117. ' PlaySoundAt "drop1", DT5
  1118. if l5.state=1 then
  1119. scorebonus
  1120. else
  1121. addscore 500
  1122. end if
  1123. DTcheck
  1124. end sub
  1125.  
  1126. Sub DT6_dropped
  1127. PlaySoundAt SoundFXDOF("drop1",116,DOFPulse,DOFDropTargets), DT6
  1128. ' PlaySoundAt "drop1", DT6
  1129. if l6.state=1 then
  1130. scorebonus
  1131. else
  1132. addscore 500
  1133. end if
  1134. DTcheck
  1135. end sub
  1136.  
  1137. Sub DT7_dropped
  1138. PlaySoundAt SoundFXDOF("drop1",116,DOFPulse,DOFDropTargets), DT7
  1139. ' PlaySoundAt "drop1", DT7
  1140. if l7.state=1 then
  1141. scorebonus
  1142. else
  1143. addscore 500
  1144. end if
  1145. DTcheck
  1146. end sub
  1147.  
  1148. Sub DT8_dropped
  1149. PlaySoundAt SoundFXDOF("drop1",116,DOFPulse,DOFDropTargets), DT8
  1150. ' PlaySoundAt "drop1", DT8
  1151. if l8.state=1 then
  1152. scorebonus
  1153. else
  1154. addscore 500
  1155. end if
  1156. DTcheck
  1157. end sub
  1158.  
  1159. Sub DT9_dropped
  1160. PlaySoundAt SoundFXDOF("drop1",116,DOFPulse,DOFDropTargets), DT9
  1161. ' PlaySoundAt "drop1", DT9
  1162. if l9.state=1 then
  1163. scorebonus
  1164. else
  1165. addscore 500
  1166. end if
  1167. DTcheck
  1168. end sub
  1169.  
  1170. Sub DT10_dropped
  1171. PlaySoundAt SoundFXDOF("drop1",116,DOFPulse,DOFDropTargets), DT10
  1172. ' PlaySoundAt "drop1", DT10
  1173. if l10.state=1 then
  1174. scorebonus
  1175. else
  1176. addscore 500
  1177. end if
  1178. DTcheck
  1179. end sub
  1180.  
  1181. Sub DTcheck
  1182. if balls=5 then
  1183. if DT1.isdropped and DT2.isdropped and DT3.isdropped and DT4.isdropped and DT5.isdropped and DT6.isdropped and DT7.isdropped and DT8.isdropped and DT9.isdropped and DT10.isdropped then
  1184. L25.state=1
  1185. if l5000.state=1 then lspecial.state=1
  1186. end if
  1187. else
  1188. if (DT1.isdropped and DT2.isdropped and DT3.isdropped and DT4.isdropped and DT5.isdropped) or (DT6.isdropped and DT7.isdropped and DT8.isdropped and DT9.isdropped and DT10.isdropped) then
  1189. L25.state=1
  1190. if l5000.state=1 then lspecial.state=1
  1191. end if
  1192. end if
  1193. end sub
  1194.  
  1195.  
  1196.  
  1197. '********** Scoring
  1198.  
  1199. sub addbonus
  1200. bonus=bonus+1
  1201. if bonus>5 then bonus=5
  1202. Bonus_lights(bonus-1).state=1
  1203. if bonus>1 then
  1204. Bonus_lights(bonus-2).state=0
  1205. else
  1206. l1000.state=0
  1207. end if
  1208. end sub
  1209.  
  1210. sub addscore(points)
  1211. if tilt=false and state=true then
  1212.  
  1213. If points = 10 then
  1214. matchnumb=matchnumb+1
  1215. if matchnumb>10 then matchnumb=1
  1216. if balls=5 then
  1217. MoveDTlights
  1218. ChangeBumperLights
  1219. end if
  1220. end if
  1221. If points = 100 then
  1222. if balls=3 then
  1223. MoveDTlights
  1224. ChangeBumperLights
  1225. end if
  1226. end if
  1227.  
  1228. If points = 500 then flashbumpers
  1229.  
  1230. If points = 1000 then
  1231. MoveDTlights
  1232. ChangeBumperLights
  1233. end if
  1234.  
  1235. if points=10 or points=100 or points=1000 then
  1236. addpoints Points
  1237. else
  1238. If Points < 100 and AddScore10Timer.enabled = false Then
  1239. Add10 = Points \ 10
  1240. AddScore10Timer.Enabled = TRUE
  1241. ElseIf Points < 1000 and AddScore100Timer.enabled = false Then
  1242. Add100 = Points \ 100
  1243. AddScore100Timer.Enabled = TRUE
  1244. ElseIf AddScore1000Timer.enabled = false Then
  1245. Add1000 = Points \ 1000
  1246. AddScore1000Timer.Enabled = TRUE
  1247. End If
  1248. End If
  1249. end if
  1250. End Sub
  1251.  
  1252. Sub AddScore10Timer_Timer()
  1253. if Add10 > 0 then
  1254. AddPoints 10
  1255. Add10 = Add10 - 1
  1256. Else
  1257. Me.Enabled = FALSE
  1258. End If
  1259. End Sub
  1260.  
  1261. Sub AddScore100Timer_Timer()
  1262. if Add100 > 0 then
  1263. AddPoints 100
  1264. Add100 = Add100 - 1
  1265. Else
  1266. Me.Enabled = FALSE
  1267. End If
  1268. End Sub
  1269.  
  1270. Sub AddScore1000Timer_Timer()
  1271. if Add1000 > 0 then
  1272. AddPoints 1000
  1273. Add1000 = Add1000 - 1
  1274. Else
  1275. Me.Enabled = FALSE
  1276. End If
  1277. End Sub
  1278.  
  1279. Sub AddPoints(Points)
  1280. score(player)=score(player)+points
  1281. EVAL("ScoreReel1").addvalue(points)
  1282. If B2SOn Then Controller.B2SSetScorePlayer player, score(player) MOD 100000
  1283.  
  1284. ' Sounds: there are 3 sounds: tens, hundreds and thousands
  1285. If Points = 100 AND(Score(player) MOD 1000) \ 100 = 0 Then 'New 1000 reel
  1286. PlaySoundAt SoundFXDOF("bell1000",153,DOFPulse,DOFChimes), chimesound
  1287. ElseIf Points = 10 AND(Score(player) MOD 100) \ 10 = 0 Then 'New 100 reel
  1288. PlaySoundAt SoundFXDOF("bell100",152,DOFPulse,DOFChimes), chimesound
  1289. ElseIf points = 1000 Then
  1290. PlaySoundAt SoundFXDOF("bell1000",153,DOFPulse,DOFChimes), chimesound
  1291. elseif Points = 100 Then
  1292. PlaySoundAt SoundFXDOF("bell100",152,DOFPulse,DOFChimes), chimesound
  1293. Else
  1294. PlaySoundAt SoundFXDOF("bell10",151,DOFPulse,DOFChimes), chimesound
  1295. End If
  1296. ' check replays and rollover
  1297. if score(player)=>99999 then
  1298. If B2SOn then Controller.B2SSetScoreRollover 24 + player, 1
  1299. EVAL("Reel100K").setvalue(int(score(player)/100000))
  1300. End if
  1301. if score(player)=>replay1 and rep(player)=0 then
  1302. addcredit
  1303. rep(player)=1
  1304. PlaySoundAt SoundFXDOF("knock",140,DOFPulse,DOFKnocker), Plunger
  1305.  
  1306. end if
  1307. if score(player)=>replay2 and rep(player)=1 then
  1308. addcredit
  1309. rep(player)=2
  1310. PlaySoundAt SoundFXDOF("knock",140,DOFPulse,DOFKnocker), Plunger
  1311.  
  1312. end if
  1313. if score(player)=>replay3 and rep(player)=2 then
  1314. addcredit
  1315. rep(player)=3
  1316. PlaySoundAt SoundFXDOF("knock",140,DOFPulse,DOFKnocker), Plunger
  1317.  
  1318. end if
  1319. end sub
  1320.  
  1321.  
  1322. Sub CheckTilt
  1323. If Tilttimer.Enabled = True Then
  1324. TiltSens = TiltSens + 1
  1325. if TiltSens = 3 Then GameTilted
  1326. Else
  1327. TiltSens = 0
  1328. Tilttimer.Enabled = True
  1329. End If
  1330. End Sub
  1331.  
  1332. Sub Tilttimer_Timer()
  1333. Tilttimer.Enabled = False
  1334. End Sub
  1335.  
  1336. Sub GameTilted
  1337. Tilt = True
  1338. tilttxt.text="TILT"
  1339. If B2SOn Then Controller.B2SSetTilt 33,1
  1340. If B2SOn Then Controller.B2ssetdata 1, 0
  1341. playsoundat "tilt", soundtrigger
  1342. turnoff
  1343. End Sub
  1344.  
  1345. sub turnoff
  1346. for i=1 to 2
  1347. EVAL("Bumper"&i).hashitevent = 0
  1348. Next
  1349. LeftSlingShot.isdropped=true
  1350. RightSlingShot.isdropped=true
  1351. LeftFlipper.RotateToStart
  1352. StopSound "Buzz"
  1353. DOF 101, DOFOff
  1354. RightFlipper.RotateToStart
  1355. StopSound "Buzz1"
  1356. DOF 102, DOFOff
  1357. end sub
  1358.  
  1359. '*********************************************************************
  1360. ' Positional Sound Playback Functions
  1361. '*********************************************************************
  1362.  
  1363. ' Play a sound, depending on the X,Y position of the table element (especially cool for surround speaker setups, otherwise stereo panning only)
  1364. ' parameters (defaults): loopcount (1), volume (1), randompitch (0), pitch (0), useexisting (0), restart (1))
  1365. ' Note that this will not work (currently) for walls/slingshots as these do not feature a simple, single X,Y position
  1366. Sub PlayXYSound(soundname, tableobj, loopcount, volume, randompitch, pitch, useexisting, restart)
  1367. PlaySound soundname, loopcount, volume, AudioPan(tableobj), randompitch, pitch, useexisting, restart, AudioFade(tableobj)
  1368. End Sub
  1369.  
  1370. ' Similar subroutines that are less complicated to use (e.g. simply use standard parameters for the PlaySound call)
  1371. Sub PlaySoundAt(soundname, tableobj)
  1372. PlaySound soundname, 1, 1, AudioPan(tableobj), 0,0,0, 1, AudioFade(tableobj)
  1373. End Sub
  1374.  
  1375. Sub PlaySoundAtBall(soundname)
  1376. PlaySoundAt soundname, ActiveBall
  1377. End Sub
  1378.  
  1379.  
  1380. '*********************************************************************
  1381. ' Supporting Ball & Sound Functions
  1382. '*********************************************************************
  1383.  
  1384. 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. "Abra_Ca_Dabra" is the name of the table
  1385. Dim tmp
  1386. tmp = tableobj.y * 2 / Abra_Ca_Dabra.height-1
  1387. If tmp > 0 Then
  1388. AudioFade = Csng(tmp ^10)
  1389. Else
  1390. AudioFade = Csng(-((- tmp) ^10) )
  1391. End If
  1392. End Function
  1393.  
  1394. Function AudioPan(tableobj) ' Calculates the pan for a tableobj based on the X position on the table. "Abra_Ca_Dabra" is the name of the table
  1395. Dim tmp
  1396. tmp = tableobj.x * 2 / Abra_Ca_Dabra.width-1
  1397. If tmp > 0 Then
  1398. AudioPan = Csng(tmp ^10)
  1399. Else
  1400. AudioPan = Csng(-((- tmp) ^10) )
  1401. End If
  1402. End Function
  1403.  
  1404. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  1405. Vol = Csng(BallVel(ball) ^2 / 2000)
  1406. End Function
  1407.  
  1408. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  1409. Pitch = BallVel(ball) * 20
  1410. End Function
  1411.  
  1412. Function BallVel(ball) 'Calculates the ball speed
  1413. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  1414. End Function
  1415.  
  1416. '*****************************************
  1417. ' JP's VP10 Rolling Sounds
  1418. '*****************************************
  1419.  
  1420. Const tnob = 5 ' total number of balls
  1421. ReDim rolling(tnob)
  1422. InitRolling
  1423.  
  1424. Sub InitRolling
  1425. Dim i
  1426. For i = 0 to tnob
  1427. rolling(i) = False
  1428. Next
  1429. End Sub
  1430.  
  1431. Sub RollingTimer_Timer()
  1432. Dim BOT, b
  1433. BOT = GetBalls
  1434.  
  1435. ' stop the sound of deleted balls
  1436. For b = UBound(BOT) + 1 to tnob
  1437. rolling(b) = False
  1438. StopSound("fx_ballrolling" & b)
  1439. Next
  1440.  
  1441. ' exit the sub if no balls on the table
  1442. If UBound(BOT) = -1 Then Exit Sub
  1443.  
  1444. ' play the rolling sound for each ball
  1445. For b = 0 to UBound(BOT)
  1446. If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
  1447. rolling(b) = True
  1448. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b)), AudioPan(BOT(b)), 0, Pitch(BOT(b)), 1, 0, AudioFade(BOT(b))
  1449. Else
  1450. If rolling(b) = True Then
  1451. StopSound("fx_ballrolling" & b)
  1452. rolling(b) = False
  1453. End If
  1454. End If
  1455. Next
  1456. End Sub
  1457.  
  1458. '**********************
  1459. ' Ball Collision Sound
  1460. '**********************
  1461.  
  1462. Sub OnBallBallCollision(ball1, ball2, velocity)
  1463. PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, AudioPan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1)
  1464. End Sub
  1465.  
  1466.  
  1467. '*****************************************
  1468. ' BALL SHADOW
  1469. '*****************************************
  1470. Dim BallShadow
  1471. BallShadow = Array (BallShadow1,BallShadow2,BallShadow3,BallShadow4,BallShadow5)
  1472.  
  1473. Sub BallShadowUpdate_timer()
  1474. Dim BOT, b
  1475. BOT = GetBalls
  1476. ' hide shadow of deleted balls
  1477. If UBound(BOT)<(tnob-1) Then
  1478. For b = (UBound(BOT) + 1) to (tnob-1)
  1479. BallShadow(b).visible = 0
  1480. Next
  1481. End If
  1482. ' exit the Sub if no balls on the table
  1483. If UBound(BOT) = -1 Then Exit Sub
  1484. ' render the shadow for each ball
  1485. For b = 0 to UBound(BOT)
  1486. If BOT(b).X < Abra_Ca_Dabra.Width/2 Then
  1487. BallShadow(b).X = ((BOT(b).X) - (Ballsize/16) + ((BOT(b).X - (Abra_Ca_Dabra.Width/2))/17))' + 13
  1488. Else
  1489. BallShadow(b).X = ((BOT(b).X) + (Ballsize/16) + ((BOT(b).X - (Abra_Ca_Dabra.Width/2))/17))' - 13
  1490. End If
  1491. ballShadow(b).Y = BOT(b).Y + 10
  1492. If BOT(b).Z > 20 Then
  1493. BallShadow(b).visible = 1
  1494. Else
  1495. BallShadow(b).visible = 0
  1496. End If
  1497. Next
  1498. End Sub
  1499.  
  1500. '************************************
  1501. ' What you need to add to your table
  1502. '************************************
  1503.  
  1504. ' a timer called RollingTimer. With a fast interval, like 10
  1505. ' one collision sound, in this script is called fx_collide
  1506. ' as many sound files as max number of balls, with names ending with 0, 1, 2, 3, etc
  1507. ' for ex. as used in this script: fx_ballrolling0, fx_ballrolling1, fx_ballrolling2, fx_ballrolling3, etc
  1508.  
  1509.  
  1510. '******************************************
  1511. ' Explanation of the rolling sound routine
  1512. '******************************************
  1513.  
  1514. ' sounds are played based on the ball speed and position
  1515.  
  1516. ' the routine checks first for deleted balls and stops the rolling sound.
  1517.  
  1518. ' The For loop goes through all the balls on the table and checks for the ball speed and
  1519. ' if the ball is on the table (height lower than 30) then then it plays the sound
  1520. ' otherwise the sound is stopped, like when the ball has stopped or is on a ramp or flying.
  1521.  
  1522. ' The sound is played using the VOL, PAN and PITCH functions, so the volume and pitch of the sound
  1523. ' will change according to the ball speed, and the PAN function will change the stereo position according
  1524. ' to the position of the ball on the table.
  1525.  
  1526.  
  1527. '**************************************
  1528. ' Explanation of the collision routine
  1529. '**************************************
  1530.  
  1531. ' The collision is built in VP.
  1532. ' You only need to add a Sub OnBallBallCollision(ball1, ball2, velocity) and when two balls collide they
  1533. ' will call this routine. What you add in the sub is up to you. As an example is a simple Playsound with volume and paning
  1534. ' depending of the speed of the collision.
  1535.  
  1536.  
  1537. Sub a_Triggers_Hit (idx)
  1538. playsound "sensor", 0,1,AudioPan(ActiveBall),0,0,0,1,AudioFade(ActiveBall)
  1539. End sub
  1540.  
  1541. 'Sub a_Pins_Hit (idx)
  1542. ' PlaySound "pinhit_low", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  1543. 'End Sub
  1544.  
  1545. Sub a_Targets_Hit (idx)
  1546. PlaySound "target", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  1547. End Sub
  1548.  
  1549. Sub a_DropTargets_Hit (idx)
  1550. PlaySound "DTDrop", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  1551. End Sub
  1552.  
  1553. Sub a_Metals_Thin_Hit (idx)
  1554. PlaySound "metalhit_thin", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1555. End Sub
  1556.  
  1557. Sub a_Metals_Medium_Hit (idx)
  1558. PlaySound "metalhit_medium", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1559. End Sub
  1560.  
  1561. 'Sub a_Metals2_Hit (idx)
  1562. ' PlaySound "metalhit2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1563. 'End Sub
  1564.  
  1565. Sub a_Gates_Hit (idx)
  1566. PlaySound "gate4", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1567. End Sub
  1568.  
  1569. 'Sub Spinner_Spin
  1570. ' PlaySound "fx_spinner", 0, .25, AudioPan(Spinner), 0.25, 0, 0, 1, AudioFade(Spinner)
  1571. 'End Sub
  1572.  
  1573.  
  1574. Sub a_Rubbers_Hit(idx)
  1575. dim finalspeed
  1576. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1577. If finalspeed > 20 then
  1578. PlaySound "fx_rubber2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1579. End if
  1580. If finalspeed >= 6 AND finalspeed <= 20 then
  1581. RandomSoundRubber()
  1582. End If
  1583. End Sub
  1584.  
  1585. Sub a_Posts_Hit(idx)
  1586. dim finalspeed
  1587. finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
  1588. If finalspeed > 16 then
  1589. PlaySound "fx_rubber2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1590. End if
  1591. If finalspeed >= 6 AND finalspeed <= 16 then
  1592. RandomSoundRubber()
  1593. End If
  1594. End Sub
  1595.  
  1596. Sub RandomSoundRubber()
  1597. Select Case Int(Rnd*3)+1
  1598. Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1599. Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1600. Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1601. End Select
  1602. End Sub
  1603.  
  1604. Sub LeftFlipper_Collide(parm)
  1605. RandomSoundFlipper()
  1606. End Sub
  1607.  
  1608.  
  1609. Sub RightFlipper_Collide(parm)
  1610. RandomSoundFlipper()
  1611. End Sub
  1612.  
  1613. Sub RandomSoundFlipper()
  1614. Select Case Int(Rnd*3)+1
  1615. Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1616. Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1617. Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), AudioPan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  1618. End Select
  1619. End Sub
  1620.  
  1621.  
  1622. sub savehs
  1623. savevalue "Abra_Ca_Dabra", "credit", credit
  1624. savevalue "Abra_Ca_Dabra", "credithole", credithole
  1625. savevalue "Abra_Ca_Dabra", "creditnum", creditnum
  1626. savevalue "Abra_Ca_Dabra", "hiscore", hisc
  1627. savevalue "Abra_Ca_Dabra", "match", matchnumb
  1628. savevalue "Abra_Ca_Dabra", "score1", score(1)
  1629. savevalue "Abra_Ca_Dabra", "score2", score(2)
  1630. savevalue "Abra_Ca_Dabra", "score3", score(3)
  1631. savevalue "Abra_Ca_Dabra", "score4", score(4)
  1632. savevalue "Abra_Ca_Dabra", "balls", balls
  1633. savevalue "Abra_Ca_Dabra", "DTcount", DTcount
  1634. savevalue "Abra_Ca_Dabra", "hsa1", HSA1
  1635. savevalue "Abra_Ca_Dabra", "hsa2", HSA2
  1636. savevalue "Abra_Ca_Dabra", "hsa3", HSA3
  1637. savevalue "Abra_Ca_Dabra", "freeplay", freeplay
  1638.  
  1639. end sub
  1640.  
  1641. sub loadhs
  1642. dim temp
  1643. temp = LoadValue("Abra_Ca_Dabra", "credit")
  1644. If (temp <> "") then credit = CDbl(temp)
  1645.  
  1646. temp = LoadValue("Abra_Ca_Dabra", "credithole")
  1647. If (temp <> "") then credithole = CDbl(temp)
  1648.  
  1649. temp = LoadValue("Abra_Ca_Dabra", "creditnum")
  1650. If (temp <> "") then creditnum = CDbl(temp)
  1651.  
  1652. temp = LoadValue("Abra_Ca_Dabra", "hiscore")
  1653. If (temp <> "") then hisc = CDbl(temp)
  1654. temp = LoadValue("Abra_Ca_Dabra", "match")
  1655. If (temp <> "") then matchnumb = CDbl(temp)
  1656. temp = LoadValue("Abra_Ca_Dabra", "score1")
  1657. If (temp <> "") then score(1) = CDbl(temp)
  1658. temp = LoadValue("Abra_Ca_Dabra", "score2")
  1659. If (temp <> "") then score(2) = CDbl(temp)
  1660. temp = LoadValue("Abra_Ca_Dabra", "score3")
  1661. If (temp <> "") then score(3) = CDbl(temp)
  1662. temp = LoadValue("Abra_Ca_Dabra", "score4")
  1663. If (temp <> "") then score(4) = CDbl(temp)
  1664. temp = LoadValue("Abra_Ca_Dabra", "balls")
  1665. If (temp <> "") then balls = CDbl(temp)
  1666.  
  1667. temp = LoadValue("Abra_Ca_Dabra", "DTcount")
  1668. If (temp <> "") then DTcount = CDbl(temp)
  1669.  
  1670. temp = LoadValue("Abra_Ca_Dabra", "hsa1")
  1671. If (temp <> "") then HSA1 = CDbl(temp)
  1672. temp = LoadValue("Abra_Ca_Dabra", "hsa2")
  1673. If (temp <> "") then HSA2 = CDbl(temp)
  1674. temp = LoadValue("Abra_Ca_Dabra", "hsa3")
  1675. If (temp <> "") then HSA3 = CDbl(temp)
  1676. temp = LoadValue("Abra_Ca_Dabra", "freeplay")
  1677. If (temp <> "") then freeplay = CDbl(temp)
  1678. end sub
  1679.  
  1680. Sub Abra_Ca_Dabra_Exit()
  1681. Savehs
  1682. turnoff
  1683. If B2SOn Then Controller.stop
  1684. End Sub
  1685.  
  1686. '==========================================================================================================================================
  1687. '============================================================= START OF HIGH SCORES ROUTINES =============================================================
  1688. '==========================================================================================================================================
  1689. '
  1690. 'ADD LINE TO TABLE_KEYDOWN SUB WITH THE FOLLOWING: If HSEnterMode Then HighScoreProcessKey(keycode) AFTER THE STARTGAME ENTRY
  1691. 'ADD: And Not HSEnterMode=true TO IF KEYCODE=STARTGAMEKEY
  1692. 'TO SHOW THE SCORE ON POST-IT ADD LINE AT RELEVENT LOCATION THAT HAS: UpdatePostIt
  1693. 'TO INITIATE ADDING INITIALS ADD LINE AT RELEVENT LOCATION THAT HAS: HighScoreEntryInit()
  1694. 'ADD THE FOLLOWING LINES TO TABLE_INIT TO SETUP POSTIT
  1695. ' if HSA1="" then HSA1=25
  1696. ' if HSA2="" then HSA2=25
  1697. ' if HSA3="" then HSA3=25
  1698. ' UpdatePostIt
  1699. 'ADD HSA1, HSA2 AND HSA3 TO SAVE AND LOAD VALUES FOR TABLE
  1700. 'ADD A TIMER NAMED HighScoreFlashTimer WITH INTERVAL 100 TO TABLE
  1701. 'SET HSSSCOREX BELOW TO WHATEVER VARIABLE YOU USE FOR HIGH SCORE.
  1702. 'ADD OBJECTS TO PLAYFIELD (EASIEST TO JUST COPY FROM THIS TABLE)
  1703. 'IMPORT POST-IT IMAGES
  1704.  
  1705.  
  1706. Dim HSA1, HSA2, HSA3
  1707. Dim HSEnterMode, hsLetterFlash, hsEnteredDigits(3), hsCurrentDigit, hsCurrentLetter
  1708. Dim HSArray
  1709. Dim HSScoreM,HSScore100k, HSScore10k, HSScoreK, HSScore100, HSScore10, HSScore1, HSScorex 'Define 6 different score values for each reel to use
  1710. HSArray = Array("Postit0","postit1","postit2","postit3","postit4","postit5","postit6","postit7","postit8","postit9","postitBL","postitCM","Tape")
  1711. Const hsFlashDelay = 4
  1712.  
  1713. ' ***********************************************************
  1714. ' HiScore DISPLAY
  1715. ' ***********************************************************
  1716.  
  1717. Sub UpdatePostIt
  1718. dim tempscore
  1719. HSScorex = hisc
  1720. TempScore = HSScorex
  1721. HSScore1 = 0
  1722. HSScore10 = 0
  1723. HSScore100 = 0
  1724. HSScoreK = 0
  1725. HSScore10k = 0
  1726. HSScore100k = 0
  1727. HSScoreM = 0
  1728. if len(TempScore) > 0 Then
  1729. HSScore1 = cint(right(Tempscore,1))
  1730. end If
  1731. if len(TempScore) > 1 Then
  1732. TempScore = Left(TempScore,len(TempScore)-1)
  1733. HSScore10 = cint(right(Tempscore,1))
  1734. end If
  1735. if len(TempScore) > 1 Then
  1736. TempScore = Left(TempScore,len(TempScore)-1)
  1737. HSScore100 = cint(right(Tempscore,1))
  1738. end If
  1739. if len(TempScore) > 1 Then
  1740. TempScore = Left(TempScore,len(TempScore)-1)
  1741. HSScoreK = cint(right(Tempscore,1))
  1742. end If
  1743. if len(TempScore) > 1 Then
  1744. TempScore = Left(TempScore,len(TempScore)-1)
  1745. HSScore10k = cint(right(Tempscore,1))
  1746. end If
  1747. if len(TempScore) > 1 Then
  1748. TempScore = Left(TempScore,len(TempScore)-1)
  1749. HSScore100k = cint(right(Tempscore,1))
  1750. end If
  1751. if len(TempScore) > 1 Then
  1752. TempScore = Left(TempScore,len(TempScore)-1)
  1753. HSScoreM = cint(right(Tempscore,1))
  1754. end If
  1755. Pscore6.image = HSArray(HSScoreM):If HSScorex<1000000 Then PScore6.image = HSArray(10)
  1756. Pscore5.image = HSArray(HSScore100K):If HSScorex<100000 Then PScore5.image = HSArray(10)
  1757. PScore4.image = HSArray(HSScore10K):If HSScorex<10000 Then PScore4.image = HSArray(10)
  1758. PScore3.image = HSArray(HSScoreK):If HSScorex<1000 Then PScore3.image = HSArray(10)
  1759. PScore2.image = HSArray(HSScore100):If HSScorex<100 Then PScore2.image = HSArray(10)
  1760. PScore1.image = HSArray(HSScore10):If HSScorex<10 Then PScore1.image = HSArray(10)
  1761. PScore0.image = HSArray(HSScore1):If HSScorex<1 Then PScore0.image = HSArray(10)
  1762. if HSScorex<1000 then
  1763. PComma.image = HSArray(10)
  1764. else
  1765. PComma.image = HSArray(11)
  1766. end if
  1767. if HSScorex<1000000 then
  1768. PComma2.image = HSArray(10)
  1769. else
  1770. PComma2.image = HSArray(11)
  1771. end if
  1772. ' if showhisc=1 and showhiscnames=1 then
  1773. ' for each objekt in hiscname:objekt.visible=1:next
  1774. HSName1.image = ImgFromCode(HSA1, 1)
  1775. HSName2.image = ImgFromCode(HSA2, 2)
  1776. HSName3.image = ImgFromCode(HSA3, 3)
  1777. ' else
  1778. ' for each objekt in hiscname:objekt.visible=0:next
  1779. ' end if
  1780. End Sub
  1781.  
  1782. Function ImgFromCode(code, digit)
  1783. Dim Image
  1784. if (HighScoreFlashTimer.Enabled = True and hsLetterFlash = 1 and digit = hsCurrentLetter) then
  1785. Image = "postitBL"
  1786. elseif (code + ASC("A") - 1) >= ASC("A") and (code + ASC("A") - 1) <= ASC("Z") then
  1787. Image = "postit" & chr(code + ASC("A") - 1)
  1788. elseif code = 27 Then
  1789. Image = "PostitLT"
  1790. elseif code = 0 Then
  1791. image = "PostitSP"
  1792. Else
  1793. msgbox("Unknown display code: " & code)
  1794. end if
  1795. ImgFromCode = Image
  1796. End Function
  1797.  
  1798. Sub HighScoreEntryInit()
  1799. HSA1=0:HSA2=0:HSA3=0
  1800. HSEnterMode = True
  1801. hsCurrentDigit = 0
  1802. hsCurrentLetter = 1:HSA1=1
  1803. HighScoreFlashTimer.Interval = 250
  1804. HighScoreFlashTimer.Enabled = True
  1805. hsLetterFlash = hsFlashDelay
  1806. End Sub
  1807.  
  1808. Sub HighScoreFlashTimer_Timer()
  1809. hsLetterFlash = hsLetterFlash-1
  1810. UpdatePostIt
  1811. If hsLetterFlash=0 then 'switch back
  1812. hsLetterFlash = hsFlashDelay
  1813. end if
  1814. End Sub
  1815.  
  1816.  
  1817. ' ***********************************************************
  1818. ' HiScore ENTER INITIALS
  1819. ' ***********************************************************
  1820.  
  1821. Sub HighScoreProcessKey(keycode)
  1822. If keycode = LeftFlipperKey Then
  1823. hsLetterFlash = hsFlashDelay
  1824. Select Case hsCurrentLetter
  1825. Case 1:
  1826. HSA1=HSA1-1:If HSA1=-1 Then HSA1=26 'no backspace on 1st digit
  1827. UpdatePostIt
  1828. Case 2:
  1829. HSA2=HSA2-1:If HSA2=-1 Then HSA2=27
  1830. UpdatePostIt
  1831. Case 3:
  1832. HSA3=HSA3-1:If HSA3=-1 Then HSA3=27
  1833. UpdatePostIt
  1834. End Select
  1835. End If
  1836.  
  1837. If keycode = RightFlipperKey Then
  1838. hsLetterFlash = hsFlashDelay
  1839. Select Case hsCurrentLetter
  1840. Case 1:
  1841. HSA1=HSA1+1:If HSA1>26 Then HSA1=0
  1842. UpdatePostIt
  1843. Case 2:
  1844. HSA2=HSA2+1:If HSA2>27 Then HSA2=0
  1845. UpdatePostIt
  1846. Case 3:
  1847. HSA3=HSA3+1:If HSA3>27 Then HSA3=0
  1848. UpdatePostIt
  1849. End Select
  1850. End If
  1851.  
  1852. If keycode = StartGameKey Then
  1853. Select Case hsCurrentLetter
  1854. Case 1:
  1855. hsCurrentLetter=2 'ok to advance
  1856. HSA2=HSA1 'start at same alphabet spot
  1857. ' EMReelHSName1.SetValue HSA1:EMReelHSName2.SetValue HSA2
  1858. Case 2:
  1859. If HSA2=27 Then 'bksp
  1860. HSA2=0
  1861. hsCurrentLetter=1
  1862. Else
  1863. hsCurrentLetter=3 'enter it
  1864. HSA3=HSA2 'start at same alphabet spot
  1865. End If
  1866. Case 3:
  1867. If HSA3=27 Then 'bksp
  1868. HSA3=0
  1869. hsCurrentLetter=2
  1870. Else
  1871. savehs 'enter it
  1872. HighScoreFlashTimer.Enabled = False
  1873. HSEnterMode = False
  1874. End If
  1875. End Select
  1876. UpdatePostIt
  1877. End If
  1878. End Sub
Advertisement
Add Comment
Please, Sign In to add comment