Guest User

Untitled

a guest
Sep 8th, 2018
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 106.33 KB | None | 0 0
  1. Option Explicit
  2. Randomize
  3.  
  4. '*****************************************************************************************************
  5. ' Teenage Mutant Ninja Turtles
  6. ' IPDB No. 2509 / Data East May, 1991 / 4 Players
  7. ' VPX version 1.0 - cyberpez
  8. '*****************************************************************************************************
  9.  
  10. On Error Resume Next
  11. ExecuteGlobal GetTextFile("controller.vbs")
  12. 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)"
  13. On Error Goto 0
  14.  
  15.  
  16. Dim EnableBallControl, ballmod, FlipperMod, BlacklightOoze, BlacklightLaneGuides, PostsColor, BlacklightPegs, PlasticProtectors, LBCOnorOff, SideFlasherColor, GIColorMod, RubberMod, TurtleWeapons, CustomICs, GameType, TurtlesColorMod
  17. EnableBallControl = false 'Change to true to enable manual ball control (or press C in-game) via the arrow keys and B (boost movement) keys
  18.  
  19. '***************************************************************************'
  20. '***************************************************************************'
  21. ' OPTIONS
  22. '***************************************************************************'
  23. '***************************************************************************'
  24.  
  25. 'Ball Mod
  26. '0=Normal pinball
  27. '1=Turtle Balls
  28.  
  29. BallMod = 0
  30.  
  31.  
  32. 'GI ColorMod
  33. '0=Random
  34. '1=Normal
  35. '2=CoolWhite
  36. '3=MultiColor
  37. '4=AllGreen
  38.  
  39. GIColorMod = 1
  40.  
  41.  
  42. 'T U R T L E S color mod
  43. '0=Normal
  44. '1=Green
  45.  
  46. TurtlesColorMod = 1
  47.  
  48.  
  49. 'Flipper Colors
  50.  
  51. '0=Random
  52. '1=White/Red
  53. '2=White/Black
  54. '3=White/Yellow
  55. '4=White/Green
  56. '5=White/BlackLightGreen
  57. '6=Yellow/Red
  58. '7=Yellow/Black
  59. '8=Yellow/Green
  60. '9=Yellow/BlackLightGreen
  61.  
  62. FlipperMod = 8
  63.  
  64.  
  65. 'Colored Rubbers
  66. '0=Random
  67. '1=White
  68. '2=Black
  69. '3=Colored
  70.  
  71. RubberMod = 2
  72.  
  73. 'Instructions Card
  74. '0=Random
  75. '1=Normal
  76. '2=Custom1
  77. '3=Custom2
  78. '4=Normal Green
  79.  
  80. CustomICs = 1
  81.  
  82. '0=FreePlay
  83. '1=Coin
  84.  
  85. GameType = 1
  86.  
  87. 'Plastic Protectors
  88. '0=Random
  89. '1=Clear
  90. '2=OozeGreen
  91.  
  92. PlasticProtectors = 1
  93.  
  94.  
  95. 'LightBoxCover
  96. '0=off
  97. '1=On
  98.  
  99. LBCOnorOff = 0
  100.  
  101.  
  102. 'SideFlasherColor
  103. '0=Random
  104. '1=Yellow
  105. '2=Green
  106.  
  107. SideFlasherColor = 1
  108.  
  109.  
  110. 'Turtle Weapons
  111. '0=hidden
  112. '1-=visible
  113.  
  114. TurtleWeapons = 0
  115.  
  116.  
  117. 'Post Colors
  118. '0=Random
  119. '1=Black
  120. '2=Yellow
  121. '3=Green
  122. '4=Ooze Green
  123.  
  124. PostsColor = 3
  125.  
  126. '''''''''''''''''''''
  127. ' Blacklight things '
  128. '''''''''''''''''''''
  129.  
  130. 'Blacklight Ooooze
  131. '0=Off
  132. '1=On
  133.  
  134. BlacklightOoze = 1
  135.  
  136.  
  137. 'Blacklight LaneGuides
  138. '0=Off
  139. '1=On
  140.  
  141. BlacklightLaneGuides = 0
  142.  
  143.  
  144. 'Blacklight Pegs
  145. '0=Off
  146. '1=On
  147.  
  148. BlacklightPegs = 0
  149.  
  150.  
  151.  
  152. '***************************************************************************'
  153. '***************************************************************************'
  154. ' End of OPTIONS
  155. '***************************************************************************'
  156. '***************************************************************************'
  157.  
  158.  
  159.  
  160.  
  161. ' ball size
  162. Const BallRadius = 25
  163. Const BallMass = 1
  164.  
  165.  
  166.  
  167. ' VPinMAME ROM name
  168.  
  169. Const cGameName = "tmnt_104"
  170.  
  171.  
  172.  
  173. ' ===============================================================================================
  174. ' some general constants and variables
  175. ' ===============================================================================================
  176.  
  177. Const UseSolenoids = 2
  178. Const UseLamps = False
  179. Const UseGI = True
  180. Const UseSync = False
  181. Const HandleMech = False
  182.  
  183. Const SSolenoidOn = "SOL_on"
  184. Const SSolenoidOff = "SOL_off"
  185. Const SCoin = "Coin"
  186. Const SKnocker = "Knocker"
  187.  
  188.  
  189. LoadVPM "01560000", "DE.VBS", 3.26
  190.  
  191.  
  192. ' ===============================================================================================
  193. ' solenoids
  194. ' ===============================================================================================
  195.  
  196.  
  197. SolCallback(sLLFlipper) = "solLFlipper"
  198. SolCallback(sLRFlipper) = "solRFlipper"
  199.  
  200. Solcallback(1) ="kisort"
  201. SolCallback(2) = "KickBallToLane"
  202.  
  203. SolCallback(4) = "SolAutofire"
  204. SolCallBack(5) = "SetLamp 105,"
  205. SolCallBack(6) = "SetLamp 106,"
  206. SolCallback(7) = "SewerUpKick"
  207. SolCallback(8) = "vpmSolSound SoundFX(""knocker"",DOFKnocker),"
  208. SolCallBack(9) = "SetLamp 109,"
  209.  
  210. SolCallback(11) = "SolGi" 'gi
  211. SolCallBack(12) = "SetLamp 112,"
  212. SolCallBack(13) = "SetLamp 113,"
  213. SolCallBack(14) = "SetLamp 114,"
  214. SolCallBack(16) = "SewerOpen"
  215. 'SolCallBack(17) = "vpmSolSound ""bumper2"","
  216. 'SolCallBack(18) = "vpmSolSound ""bumper2"","
  217. 'SolCallBack(19) = "TurtleB"
  218. 'SolCallback(20) = "vpmSolSound ""left_slingshot_new"","
  219. 'SolCallback(21) = "vpmSolSound ""right_slingshot_new"","
  220.  
  221. SolCallBack(22) ="SolPizzaSpin"
  222.  
  223.  
  224. SolCallBack(25) = "SetLamp 125,"
  225. SolCallBack(26) = "SetLamp 126,"
  226. SolCallBack(27) = "SetLamp 127,"
  227. SolCallBack(28) = "SetLamp 128,"
  228. SolCallBack(29) = "SetLamp 129,"
  229. SolCallBack(30) = "SetLamp 130,"
  230. SolCallBack(31) = "SetLamp 131,"
  231. SolCallBack(32) = "SetLamp 132,"
  232.  
  233.  
  234. Dim Ball(6)
  235. Dim InitTime
  236. Dim TroughTime
  237. Dim EjectTime
  238. Dim MaxBalls
  239. Dim TroughCount
  240. Dim TroughBall(7)
  241. Dim TroughEject
  242. Dim Momentum
  243. Dim UpperGIon
  244. Dim Multiball
  245. Dim BallsInPlay
  246. Dim iBall
  247. Dim fgBall
  248.  
  249. Dim bsLEjet, bsUpperEject, Lnell, mNell, plungerIM, dtDrop, ttPizza, AutoPlunger
  250.  
  251.  
  252. Sub InitVPM()
  253. With Controller
  254. .GameName = cGameName
  255. ' If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
  256. .SplashInfoLine = "TMNT" & vbNewLine & "VPX - cyberpez"
  257. ' .Games(cGameName).Settings.Value("rol") = 0 'rotate DMD to the left
  258. ' .HandleKeyboard = 0
  259. ' .ShowTitle = 0
  260. ' .ShowDMDOnly = 1
  261. ' .ShowFrame = 0
  262. ' .HandleMechanics = 0
  263. ' If DesktopMode = true then .hidden = 0 Else .hidden = 1 End If
  264. ' .Run GetPlayerHWnd
  265. ' If Err Then MsgBox Err.Description
  266. ' On Error Goto 0
  267. End With
  268. Controller.SolMask(0) = 0
  269. vpmTimer.AddTimer 4000, "Controller.SolMask(0)=&Hffffffff'"
  270. Controller.Run
  271. End Sub
  272.  
  273.  
  274.  
  275. Sub tmnt_Init
  276. ' table initialization
  277. InitVPM
  278.  
  279.  
  280.  
  281. ' basic pinmame timer
  282. PinMAMETimer.Interval = PinMAMEInterval
  283. PinMAMETimer.Enabled = True
  284.  
  285. ' nudging
  286. vpmNudge.TiltSwitch = 1
  287. vpmNudge.Sensitivity = 3
  288. ' vpmNudge.TiltObj = Array(Bumper1,Bumper2,Bumper3,LeftSlingshot,RightSlingshot)
  289.  
  290.  
  291. ' Impulse Plunger
  292. Const IMPowerSetting = 75 'Plunger Power
  293. Const IMTime = 0.6 ' Time in seconds for Full Plunge
  294. Set AutoPlunger = New cvpmImpulseP
  295. With AutoPlunger
  296. .InitImpulseP AutoPlung, IMPowerSetting, IMTime
  297. .Random 0
  298. '.switch 18
  299. .InitExitSnd "solon", ""
  300. .CreateEvents "AutoPlunger"
  301. End With
  302.  
  303. ''''''''''''''''''''''''''''''''''''''
  304. ' spinning Pizza
  305. ''''''''''''''''''''''''''''''''''''''
  306. Set ttPizza = New cvpmTurnTable
  307. With ttPizza
  308. .InitTurnTable PizzaTrigger, 150
  309. .SpinCW = True
  310. .SpinUp = 200 : .SpinDown = 200
  311. .CreateEvents "ttPizza"
  312. End With
  313.  
  314. TurtleBall = 1
  315. CreatBalls
  316.  
  317. If showDT = False Then
  318. l43.visible = False
  319. l44.visible = False
  320. l45.visible = False
  321. l46.visible = False
  322. l47.visible = False
  323. l48.visible = False
  324. Else
  325. l43.visible = True
  326. l44.visible = True
  327. l45.visible = True
  328. l46.visible = True
  329. l47.visible = True
  330. l48.visible = True
  331. End If
  332.  
  333. SetOptions
  334.  
  335. vpmInit me
  336.  
  337.  
  338. End Sub
  339.  
  340.  
  341.  
  342.  
  343.  
  344. Sub tmnt_KeyDown(ByVal keycode)
  345. If keycode = PlungerKey Then
  346. Plunger.PullBack
  347. PlaySoundAt"plungerpull",Plunger
  348. End If
  349.  
  350. If keycode = LeftTiltKey Then
  351. Nudge 90, 2
  352. End If
  353.  
  354. If keycode = RightTiltKey Then
  355. Nudge 270, 2
  356. End If
  357.  
  358. If keycode = CenterTiltKey Then
  359. Nudge 0, 2
  360. End If
  361.  
  362. ' Manual Ball Control
  363. If keycode = 46 Then ' C Key
  364. If EnableBallControl = 1 Then
  365. EnableBallControl = 0
  366. Else
  367. EnableBallControl = 1
  368. End If
  369. End If
  370. If EnableBallControl = 1 Then
  371. If keycode = 48 Then ' B Key
  372. If BCboost = 1 Then
  373. BCboost = BCboostmulti
  374. Else
  375. BCboost = 1
  376. End If
  377. End If
  378. If keycode = 203 Then BCleft = 1 ' Left Arrow
  379. If keycode = 200 Then BCup = 1 ' Up Arrow
  380. If keycode = 208 Then BCdown = 1 ' Down Arrow
  381. If keycode = 205 Then BCright = 1 ' Right Arrow
  382. End If
  383. If vpmKeyDown(keycode) Then Exit Sub
  384.  
  385. If keycode = 21 then ''''''''''''''''''''y Key used for testing
  386. Kicker5.enabled = true
  387. ' Kicker5.Kick 180,20
  388. ' Kicker5.enabled = false
  389. End If
  390.  
  391. If keycode = 22 then ''''''''''''''''''''u Key used for testing
  392. Kicker5.Kick 165,400
  393. Kicker5.enabled = false
  394. End If
  395.  
  396. End Sub
  397.  
  398. Sub tmnt_KeyUp(ByVal keycode)
  399. If KeyUpHandler(KeyCode) Then Exit Sub
  400. If keycode = PlungerKey Then
  401. Plunger.Fire
  402. PlaySoundAt"plunger",Plunger
  403. End If
  404.  
  405. 'Manual Ball Control
  406. If EnableBallControl = 1 Then
  407. If keycode = 203 Then BCleft = 0 ' Left Arrow
  408. If keycode = 200 Then BCup = 0 ' Up Arrow
  409. If keycode = 208 Then BCdown = 0 ' Down Arrow
  410. If keycode = 205 Then BCright = 0 ' Right Arrow
  411. End If
  412. End Sub
  413.  
  414.  
  415.  
  416.  
  417. '**************
  418. ' Flipper Subs
  419. '**************
  420.  
  421. SolCallback(sLRFlipper) = "SolRFlipper"
  422. SolCallback(sLLFlipper) = "SolLFlipper"
  423.  
  424. Sub SolLFlipper(Enabled)
  425. If Enabled Then
  426. PlaySoundAt SoundFX("FlipperUpLeft",DOFFlippers),LeftFlipper:LeftFlipper.RotateToEnd
  427. Else
  428.  
  429. PlaySoundAt SoundFX("Flipper_Down",DOFFlippers),LeftFlipper:LeftFlipper.RotateToStart
  430. End If
  431. End Sub
  432.  
  433. Sub SolRFlipper(Enabled)
  434. If Enabled Then
  435. PlaySoundAt SoundFX("FlipperUpRight",DOFFlippers),RightFlipper:RightFlipper.RotateToEnd
  436. Else
  437. PlaySoundAt SoundFX("Flipper_Down",DOFFlippers),RightFlipper:RightFlipper.RotateToStart
  438. End If
  439. End Sub
  440.  
  441. '''''''''''''''''''''''''''''''''''''
  442. ''''' Rotate Primitives
  443. '''''''''''''''''''''''''''''''''''''
  444.  
  445. Const PI = 3.14
  446.  
  447. Sub RotateThings_Timer()
  448.  
  449. pLeftFlipperLogo.Roty = LeftFlipper.Currentangle' + 180
  450. flipperlRubber.RotY = LeftFlipper.CurrentAngle
  451. flipperlBat.RotY = LeftFlipper.CurrentAngle
  452. FlipperLSh.RotZ = LeftFlipper.currentangle
  453.  
  454. pRightFlipperLogo.Roty = RightFlipper.Currentangle' + 180
  455. flipperrRubber.RotY = RightFlipper.CurrentAngle
  456. flipperrBat.RotY = RightFlipper.CurrentAngle
  457. FlipperRSh.RotZ = RightFlipper.currentangle
  458.  
  459. pSpinner.RotX = sw56.Currentangle * -1
  460.  
  461. pSpinnerRod.TransX = sin( (sw56.CurrentAngle+180) * (2*PI/360)) * 5
  462. pSpinnerRod.TransY = sin( (SW56.CurrentAngle- 90) * (2*PI/360)) * 5
  463.  
  464. End Sub
  465.  
  466.  
  467. Dim BIP,xxBLPeg, xxPostsColor, FlipperColorType, PlasticProtectorsType, SideFlasherColorType, PostsColorType, CustomICsType
  468. BIP = 0
  469.  
  470.  
  471. Sub SetOptions()
  472.  
  473. 'Flipper Colors
  474.  
  475. '0=Random
  476. '1=White/Red
  477. '2=White/Black
  478. '3=White/Yellow
  479. '4=White/Green
  480. '5=White/BlackLightGreen
  481. '6=Yellow/Red
  482. '7=Yellow/Black
  483. '8=Yellow/Green
  484. '9=Yellow/BlackLightGreen
  485.  
  486. If FlipperMod = 0 Then
  487. FlipperColorType = Int(Rnd*9)+1
  488. Else
  489. FlipperColorType = FlipperMod
  490. End If
  491.  
  492. If FlipperColorType = 1 Then
  493. flipperrBat.Material = "Plastic White"
  494. flipperrRubber.Material = "Red Rubber"
  495. pRightFlipperLogo.Material = "Plastic White"
  496. flipperlBat.Material = "Plastic White"
  497. flipperlRubber.Material = "Red Rubber"
  498. pLeftFlipperLogo.Material = "Plastic White"
  499. End If
  500.  
  501. If FlipperColorType = 2 Then
  502. flipperrBat.Material = "Plastic White"
  503. flipperrRubber.Material = "Black Rubber"
  504. pRightFlipperLogo.Material = "Plastic White"
  505. flipperlBat.Material = "Plastic White"
  506. flipperlRubber.Material = "Black Rubber"
  507. pLeftFlipperLogo.Material = "Plastic White"
  508. End If
  509.  
  510. If FlipperColorType = 3 Then
  511. flipperrBat.Material = "Plastic White"
  512. flipperrRubber.Material = "Yellow Rubber"
  513. pRightFlipperLogo.Material = "Plastic White"
  514. flipperlBat.Material = "Plastic White"
  515. flipperlRubber.Material = "Yellow Rubber"
  516. pLeftFlipperLogo.Material = "Plastic White"
  517. End If
  518.  
  519. If FlipperColorType = 4 Then
  520. flipperrBat.Material = "Plastic White"
  521. flipperrRubber.Material = "Green Rubber"
  522. pRightFlipperLogo.Material = "Plastic White"
  523. flipperlBat.Material = "Plastic White"
  524. flipperlRubber.Material = "Green Rubber"
  525. pLeftFlipperLogo.Material = "Plastic White"
  526. End If
  527.  
  528. If FlipperColorType = 5 Then
  529. flipperrBat.Material = "Plastic White"
  530. flipperrRubber.Material = "Green Rubber"
  531. flipperrRubber.DisableLighting = 1
  532. pRightFlipperLogo.Material = "Plastic White"
  533. flipperlBat.Material = "Plastic White"
  534. flipperlRubber.Material = "Green Rubber"
  535. flipperlRubber.DisableLighting = 1
  536. pLeftFlipperLogo.Material = "Plastic White"
  537. End If
  538.  
  539. If FlipperColorType = 6 Then
  540. flipperrBat.Material = "Plastic Yellow"
  541. flipperrRubber.Material = "Red Rubber"
  542. pRightFlipperLogo.Material = "Plastic Yellow"
  543. flipperlBat.Material = "Plastic Yellow"
  544. flipperlRubber.Material = "Red Rubber"
  545. pLeftFlipperLogo.Material = "Plastic Yellow"
  546. End If
  547.  
  548. If FlipperColorType = 7 Then
  549. flipperrBat.Material = "Plastic Yellow"
  550. flipperrRubber.Material = "Black Rubber"
  551. pRightFlipperLogo.Material = "Plastic Yellow"
  552. flipperlBat.Material = "Plastic Yellow"
  553. flipperlRubber.Material = "Black Rubber"
  554. pLeftFlipperLogo.Material = "Plastic Yellow"
  555. End If
  556.  
  557. If FlipperColorType = 8 Then
  558. flipperrBat.Material = "Plastic Yellow"
  559. flipperrRubber.Material = "Green Rubber"
  560. pRightFlipperLogo.Material = "Plastic Yellow"
  561. flipperlBat.Material = "Plastic Yellow"
  562. flipperlRubber.Material = "Green Rubber"
  563. pLeftFlipperLogo.Material = "Plastic Yellow"
  564. End If
  565.  
  566. If FlipperColorType = 9 Then
  567. flipperrBat.Material = "Plastic Yellow"
  568. flipperrRubber.Material = "Green Rubber"
  569. flipperrRubber.DisableLighting = 1
  570. pRightFlipperLogo.Material = "Plastic Yellow"
  571. flipperlBat.Material = "Plastic Yellow"
  572. flipperlRubber.Material = "Green Rubber"
  573. flipperlRubber.DisableLighting = 1
  574. pLeftFlipperLogo.Material = "Plastic Yellow"
  575. End If
  576.  
  577.  
  578.  
  579.  
  580.  
  581. '''''''''''''''''''''''''''
  582. ''''''GI
  583. '''''''''''''''''''''''''''
  584. Dim Red, RedFull, RedI, Pink, PinkFull, PinkI, White, WhiteFull, WhiteI, Blue, BlueFull, BlueI, Yellow, YellowFull, YellowI, Green, GreenFull, GreenI, GreenI2, Orange, OrangeFull, OrangeI, Purple, PurpleFull, PurpleI, AmberFull, Amber, AmberI
  585. Dim GIColorModType
  586.  
  587. RedFull = rgb(255,0,0)
  588. Red = rgb(255,0,0)
  589. RedI = 20
  590. PinkFull = rgb(255,0,128)
  591. Pink = rgb(255,0,255)
  592. PinkI = 20
  593. WhiteFull = rgb(255,255,128)
  594. White = rgb(255,255,255)
  595. WhiteI = 10
  596. BlueFull = rgb(0,128,255)
  597. Blue = rgb(0,255,255)
  598. BlueI = 20
  599. YellowFull = rgb(255,255,128)
  600. Yellow = rgb(255,255,0)
  601. YellowI = 10
  602. GreenFull = rgb(128,255,128)
  603. Green = rgb(0,255,0)
  604. GreenI = 20
  605. GreenI2 = 2
  606. PurpleFull = rgb(128,0,255)
  607. Purple = rgb(64,0,128)
  608. PurpleI = 20
  609. OrangeFull = rgb(255,128,64)
  610. Orange = rgb(128,128,0)
  611. OrangeI = 20
  612. AmberFull = rgb(255,197,143)
  613. Amber = rgb(255,197,143)
  614. AmberI = 20
  615.  
  616.  
  617.  
  618. If GIColorMod = 0 Then
  619. GIColorModType = Int(Rnd*4)+1
  620. Else
  621. GIColorModType = GIColorMod
  622. End If
  623.  
  624.  
  625. If GIColorModType = 1 Then
  626. gi1a.Color=Amber
  627. gi1a.ColorFull=AmberFull
  628. gi1b.Color=Amber
  629. gi1b.ColorFull=AmberFull
  630. gi1c.Color=White
  631. gi1c.ColorFull=WhiteFull
  632. gi1a.Intensity = AmberI
  633.  
  634. gi2a.Color=Amber
  635. gi2a.ColorFull=AmberFull
  636. gi2b.Color=Amber
  637. gi2b.ColorFull=AmberFull
  638. gi2c.Color=White
  639. gi2c.ColorFull=WhiteFull
  640. gi2a.Intensity = AmberI
  641.  
  642. gi3a.Color=Amber
  643. gi3a.ColorFull=AmberFull
  644. gi3b.Color=Amber
  645. gi3b.ColorFull=AmberFull
  646. gi3c.Color=White
  647. gi3c.ColorFull=WhiteFull
  648. gi3a.Intensity = AmberI
  649.  
  650. gi4a.Color=Amber
  651. gi4a.ColorFull=AmberFull
  652. gi4b.Color=Amber
  653. gi4b.ColorFull=AmberFull
  654. gi4c.Color=White
  655. gi4c.ColorFull=WhiteFull
  656. gi4a.Intensity = AmberI
  657.  
  658. gi5a.Color=Amber
  659. gi5a.ColorFull=AmberFull
  660. gi5b.Color=Amber
  661. gi5b.ColorFull=AmberFull
  662. gi5c.Color=White
  663. gi5c.ColorFull=WhiteFull
  664. gi5a.Intensity = AmberI
  665.  
  666. gi6a.Color=Amber
  667. gi6a.ColorFull=AmberFull
  668. gi6b.Color=Amber
  669. gi6b.ColorFull=AmberFull
  670. gi6c.Color=White
  671. gi6c.ColorFull=WhiteFull
  672. gi6a.Intensity = AmberI
  673.  
  674. gi7a.Color=Amber
  675. gi7a.ColorFull=AmberFull
  676. gi7b.Color=Amber
  677. gi7b.ColorFull=AmberFull
  678. gi7c.Color=White
  679. gi7c.ColorFull=WhiteFull
  680. gi7a.Intensity = AmberI
  681.  
  682. gi8a.Color=Amber
  683. gi8a.ColorFull=AmberFull
  684. gi8b.Color=Amber
  685. gi8b.ColorFull=AmberFull
  686. gi8c.Color=White
  687. gi8c.ColorFull=WhiteFull
  688. gi8a.Intensity = AmberI
  689.  
  690. gi9a.Color=Amber
  691. gi9a.ColorFull=AmberFull
  692. gi9b.Color=Amber
  693. gi9b.ColorFull=AmberFull
  694. gi9c.Color=White
  695. gi9c.ColorFull=WhiteFull
  696. gi9a.Intensity = AmberI
  697.  
  698. gi10a.Color=Amber
  699. gi10a.ColorFull=AmberFull
  700. gi10b.Color=Amber
  701. gi10b.ColorFull=AmberFull
  702. gi10c.Color=White
  703. gi10c.ColorFull=WhiteFull
  704. gi10a.Intensity = AmberI
  705.  
  706. gi11a.Color=Amber
  707. gi11a.ColorFull=AmberFull
  708. gi11b.Color=Amber
  709. gi11b.ColorFull=AmberFull
  710. gi11c.Color=White
  711. gi11c.ColorFull=WhiteFull
  712. gi11a.Intensity = AmberI
  713.  
  714. gi12a.Color=Amber
  715. gi12a.ColorFull=AmberFull
  716. gi12b.Color=Amber
  717. gi12b.ColorFull=AmberFull
  718. gi12c.Color=White
  719. gi12c.ColorFull=WhiteFull
  720. gi12a.Intensity = AmberI
  721.  
  722. gi13a.Color=Amber
  723. gi13a.ColorFull=AmberFull
  724. gi13b.Color=Amber
  725. gi13b.ColorFull=AmberFull
  726. gi13c.Color=White
  727. gi13c.ColorFull=WhiteFull
  728. gi13a.Intensity = AmberI
  729.  
  730. gi14a.Color=Amber
  731. gi14a.ColorFull=AmberFull
  732. gi14b.Color=Amber
  733. gi14b.ColorFull=AmberFull
  734. gi14c.Color=White
  735. gi14c.ColorFull=WhiteFull
  736. gi14a.Intensity = AmberI
  737.  
  738. gi15a.Color=Amber
  739. gi15a.ColorFull=AmberFull
  740. gi15b.Color=Amber
  741. gi15b.ColorFull=AmberFull
  742. gi15c.Color=White
  743. gi15c.ColorFull=WhiteFull
  744. gi15a.Intensity = AmberI
  745.  
  746. gi16a.Color=Amber
  747. gi16a.ColorFull=AmberFull
  748. gi16b.Color=Amber
  749. gi16b.ColorFull=AmberFull
  750. gi16c.Color=White
  751. gi16c.ColorFull=WhiteFull
  752. gi16a.Intensity = AmberI
  753.  
  754. gi17a.Color=Amber
  755. gi17a.ColorFull=AmberFull
  756. gi17b.Color=Amber
  757. gi17b.ColorFull=AmberFull
  758. gi17c.Color=White
  759. gi17c.ColorFull=WhiteFull
  760. gi17a.Intensity = AmberI
  761.  
  762. gi18a.Color=Amber
  763. gi18a.ColorFull=AmberFull
  764. gi18b.Color=Amber
  765. gi18b.ColorFull=AmberFull
  766. gi18c.Color=White
  767. gi18c.ColorFull=WhiteFull
  768. gi18a.Intensity = AmberI
  769.  
  770. gi19a.Color=Amber
  771. gi19a.ColorFull=AmberFull
  772. gi19b.Color=Amber
  773. gi19b.ColorFull=AmberFull
  774. gi19c.Color=White
  775. gi19c.ColorFull=WhiteFull
  776. gi19a.Intensity = AmberI
  777.  
  778. gi20a.Color=Amber
  779. gi20a.ColorFull=AmberFull
  780. gi20b.Color=Amber
  781. gi20b.ColorFull=AmberFull
  782. gi20c.Color=White
  783. gi20c.ColorFull=WhiteFull
  784. gi20a.Intensity = AmberI
  785.  
  786. gi21a.Color=Amber
  787. gi21a.ColorFull=AmberFull
  788. gi21b.Color=Amber
  789. gi21b.ColorFull=AmberFull
  790. gi21c.Color=White
  791. gi21c.ColorFull=WhiteFull
  792. gi21a.Intensity = AmberI
  793.  
  794. End If
  795.  
  796.  
  797. If GIColorModType = 2 Then
  798. gi1a.Color=White
  799. gi1a.ColorFull=WhiteFull
  800. gi1b.Color=Yellow
  801. gi1b.ColorFull=YellowFull
  802. gi1c.Color=White
  803. gi1c.ColorFull=WhiteFull
  804. gi1a.Intensity = WhiteI
  805.  
  806. gi2a.Color=White
  807. gi2a.ColorFull=WhiteFull
  808. gi2b.Color=Yellow
  809. gi2b.ColorFull=YellowFull
  810. gi2c.Color=White
  811. gi2c.ColorFull=WhiteFull
  812. gi2a.Intensity = WhiteI
  813.  
  814. gi3a.Color=White
  815. gi3a.ColorFull=WhiteFull
  816. gi3b.Color=Yellow
  817. gi3b.ColorFull=YellowFull
  818. gi3c.Color=White
  819. gi3c.ColorFull=WhiteFull
  820. gi3a.Intensity = WhiteI
  821.  
  822. gi4a.Color=White
  823. gi4a.ColorFull=WhiteFull
  824. gi4b.Color=Yellow
  825. gi4b.ColorFull=YellowFull
  826. gi4c.Color=White
  827. gi4c.ColorFull=WhiteFull
  828. gi4a.Intensity = WhiteI
  829.  
  830. gi5a.Color=White
  831. gi5a.ColorFull=WhiteFull
  832. gi5b.Color=Yellow
  833. gi5b.ColorFull=YellowFull
  834. gi5c.Color=White
  835. gi5c.ColorFull=WhiteFull
  836. gi5a.Intensity = WhiteI
  837.  
  838. gi6a.Color=White
  839. gi6a.ColorFull=WhiteFull
  840. gi6b.Color=Yellow
  841. gi6b.ColorFull=YellowFull
  842. gi6c.Color=White
  843. gi6c.ColorFull=WhiteFull
  844. gi6a.Intensity = WhiteI
  845.  
  846. gi7a.Color=White
  847. gi7a.ColorFull=WhiteFull
  848. gi7b.Color=Yellow
  849. gi7b.ColorFull=YellowFull
  850. gi7c.Color=White
  851. gi7c.ColorFull=WhiteFull
  852. gi7a.Intensity = WhiteI
  853.  
  854. gi8a.Color=White
  855. gi8a.ColorFull=WhiteFull
  856. gi8b.Color=Yellow
  857. gi8b.ColorFull=YellowFull
  858. gi8c.Color=White
  859. gi8c.ColorFull=WhiteFull
  860. gi8a.Intensity = WhiteI
  861.  
  862. gi9a.Color=White
  863. gi9a.ColorFull=WhiteFull
  864. gi9b.Color=Yellow
  865. gi9b.ColorFull=YellowFull
  866. gi9c.Color=White
  867. gi9c.ColorFull=WhiteFull
  868. gi9a.Intensity = WhiteI
  869.  
  870. gi10a.Color=White
  871. gi10a.ColorFull=WhiteFull
  872. gi10b.Color=Yellow
  873. gi10b.ColorFull=YellowFull
  874. gi10c.Color=White
  875. gi10c.ColorFull=WhiteFull
  876. gi10a.Intensity = WhiteI
  877.  
  878. gi11a.Color=White
  879. gi11a.ColorFull=WhiteFull
  880. gi11b.Color=Yellow
  881. gi11b.ColorFull=YellowFull
  882. gi11c.Color=White
  883. gi11c.ColorFull=WhiteFull
  884. gi11a.Intensity = WhiteI
  885.  
  886. gi12a.Color=White
  887. gi12a.ColorFull=WhiteFull
  888. gi12b.Color=Yellow
  889. gi12b.ColorFull=YellowFull
  890. gi12c.Color=White
  891. gi12c.ColorFull=WhiteFull
  892. gi12a.Intensity = WhiteI
  893.  
  894. gi13a.Color=White
  895. gi13a.ColorFull=WhiteFull
  896. gi13b.Color=Yellow
  897. gi13b.ColorFull=YellowFull
  898. gi13c.Color=White
  899. gi13c.ColorFull=WhiteFull
  900. gi13a.Intensity = WhiteI
  901.  
  902. gi14a.Color=White
  903. gi14a.ColorFull=WhiteFull
  904. gi14b.Color=Yellow
  905. gi14b.ColorFull=YellowFull
  906. gi14c.Color=White
  907. gi14c.ColorFull=WhiteFull
  908. gi14a.Intensity = WhiteI
  909.  
  910. gi15a.Color=White
  911. gi15a.ColorFull=WhiteFull
  912. gi15b.Color=Yellow
  913. gi15b.ColorFull=YellowFull
  914. gi15c.Color=White
  915. gi15c.ColorFull=WhiteFull
  916. gi15a.Intensity = WhiteI
  917.  
  918. gi16a.Color=White
  919. gi16a.ColorFull=WhiteFull
  920. gi16b.Color=Yellow
  921. gi16b.ColorFull=YellowFull
  922. gi16c.Color=White
  923. gi16c.ColorFull=WhiteFull
  924. gi16a.Intensity = WhiteI
  925.  
  926. gi17a.Color=White
  927. gi17a.ColorFull=WhiteFull
  928. gi17b.Color=Yellow
  929. gi17b.ColorFull=YellowFull
  930. gi17c.Color=White
  931. gi17c.ColorFull=WhiteFull
  932. gi17a.Intensity = WhiteI
  933.  
  934. gi18a.Color=White
  935. gi18a.ColorFull=WhiteFull
  936. gi18b.Color=Yellow
  937. gi18b.ColorFull=YellowFull
  938. gi18c.Color=White
  939. gi18c.ColorFull=WhiteFull
  940. gi18a.Intensity = WhiteI
  941.  
  942. gi19a.Color=White
  943. gi19a.ColorFull=WhiteFull
  944. gi19b.Color=Yellow
  945. gi19b.ColorFull=YellowFull
  946. gi19c.Color=White
  947. gi19c.ColorFull=WhiteFull
  948. gi19a.Intensity = WhiteI
  949.  
  950. gi20a.Color=White
  951. gi20a.ColorFull=WhiteFull
  952. gi20b.Color=Yellow
  953. gi20b.ColorFull=YellowFull
  954. gi20c.Color=White
  955. gi20c.ColorFull=WhiteFull
  956. gi20a.Intensity = WhiteI
  957.  
  958. gi21a.Color=White
  959. gi21a.ColorFull=WhiteFull
  960. gi21b.Color=Yellow
  961. gi21b.ColorFull=YellowFull
  962. gi21c.Color=White
  963. gi21c.ColorFull=WhiteFull
  964. gi21a.Intensity = WhiteI
  965.  
  966. End If
  967.  
  968. If GIColorModType = 3 Then
  969. gi1a.Color=Green
  970. gi1a.ColorFull=GreenFull
  971. gi1b.Color=Green
  972. gi1b.ColorFull=GreenFull
  973. gi1c.Color=Green
  974. gi1c.ColorFull=GreenFull
  975. gi1a.Intensity = GreenI
  976.  
  977. gi2a.Color=Purple
  978. gi2a.ColorFull=PurpleFull
  979. gi2b.Color=Purple
  980. gi2b.ColorFull=PurpleFull
  981. gi2c.Color=Purple
  982. gi2c.ColorFull=PurpleFull
  983. gi2a.Intensity = PurpleI
  984.  
  985. gi3a.Color=Purple
  986. gi3a.ColorFull=PurpleFull
  987. gi3b.Color=Purple
  988. gi3b.ColorFull=PurpleFull
  989. gi3c.Color=Purple
  990. gi3c.ColorFull=PurpleFull
  991. gi3a.Intensity = PurpleI
  992.  
  993. gi4a.Color=Green
  994. gi4a.ColorFull=GreenFull
  995. gi4b.Color=Green
  996. gi4b.ColorFull=GreenFull
  997. gi4c.Color=Green
  998. gi4c.ColorFull=GreenFull
  999. gi4a.Intensity = GreenI2
  1000.  
  1001. gi5a.Color=Purple
  1002. gi5a.ColorFull=PurpleFull
  1003. gi5b.Color=Purple
  1004. gi5b.ColorFull=PurpleFull
  1005. gi5c.Color=Purple
  1006. gi5c.ColorFull=PurpleFull
  1007. gi5a.Intensity = PurpleI
  1008.  
  1009. gi6a.Color=Purple
  1010. gi6a.ColorFull=PurpleFull
  1011. gi6b.Color=Purple
  1012. gi6b.ColorFull=PurpleFull
  1013. gi6c.Color=Purple
  1014. gi6c.ColorFull=PurpleFull
  1015. gi6a.Intensity = PurpleI
  1016.  
  1017. gi7a.Color=Red
  1018. gi7a.ColorFull=RedFull
  1019. gi7b.Color=Red
  1020. gi7b.ColorFull=RedFull
  1021. gi7c.Color=Red
  1022. gi7c.ColorFull=RedFull
  1023. gi7a.Intensity = RedI
  1024.  
  1025. gi8a.Color=Green
  1026. gi8a.ColorFull=GreenFull
  1027. gi8b.Color=Green
  1028. gi8b.ColorFull=GreenFull
  1029. gi8c.Color=Green
  1030. gi8c.ColorFull=GreenFull
  1031. gi8a.Intensity = GreenI
  1032.  
  1033. gi9a.Color=Purple
  1034. gi9a.ColorFull=PurpleFull
  1035. gi9b.Color=Purple
  1036. gi9b.ColorFull=PurpleFull
  1037. gi9c.Color=Purple
  1038. gi9c.ColorFull=PurpleFull
  1039. gi9a.Intensity = PurpleI
  1040.  
  1041. gi10a.Color=Red
  1042. gi10a.ColorFull=RedFull
  1043. gi10b.Color=Red
  1044. gi10b.ColorFull=RedFull
  1045. gi10c.Color=Red
  1046. gi10c.ColorFull=RedFull
  1047. gi10a.Intensity = RedI
  1048.  
  1049. gi11a.Color=Orange
  1050. gi11a.ColorFull=OrangeFull
  1051. gi11b.Color=Orange
  1052. gi11b.ColorFull=OrangeFull
  1053. gi11c.Color=Orange
  1054. gi11c.ColorFull=OrangeFull
  1055. gi11a.Intensity = OrangeI
  1056.  
  1057. gi12a.Color=Orange
  1058. gi12a.ColorFull=OrangeFull
  1059. gi12b.Color=Orange
  1060. gi12b.ColorFull=OrangeFull
  1061. gi12c.Color=Orange
  1062. gi12c.ColorFull=OrangeFull
  1063. gi12a.Intensity = OrangeI
  1064.  
  1065. gi13a.Color=Red
  1066. gi13a.ColorFull=RedFull
  1067. gi13b.Color=Red
  1068. gi13b.ColorFull=RedFull
  1069. gi13c.Color=Red
  1070. gi13c.ColorFull=RedFull
  1071. gi13a.Intensity = RedI
  1072.  
  1073. gi14a.Color=Blue
  1074. gi14a.ColorFull=BlueFull
  1075. gi14b.Color=Blue
  1076. gi14b.ColorFull=BlueFull
  1077. gi14c.Color=Blue
  1078. gi14c.ColorFull=BlueFull
  1079. gi14a.Intensity = BlueI
  1080.  
  1081. gi15a.Color=Blue
  1082. gi15a.ColorFull=BlueFull
  1083. gi15b.Color=Blue
  1084. gi15b.ColorFull=BlueFull
  1085. gi15c.Color=Blue
  1086. gi15c.ColorFull=BlueFull
  1087. gi15a.Intensity = BlueI
  1088.  
  1089. gi16a.Color=Purple
  1090. gi16a.ColorFull=PurpleFull
  1091. gi16b.Color=Purple
  1092. gi16b.ColorFull=PurpleFull
  1093. gi16c.Color=Purple
  1094. gi16c.ColorFull=PurpleFull
  1095. gi16a.Intensity = PurpleI
  1096.  
  1097. gi17a.Color=Purple
  1098. gi17a.ColorFull=PurpleFull
  1099. gi17b.Color=Purple
  1100. gi17b.ColorFull=PurpleFull
  1101. gi17c.Color=Purple
  1102. gi17c.ColorFull=PurpleFull
  1103. gi17a.Intensity = PurpleI
  1104.  
  1105. gi18a.Color=Purple
  1106. gi18a.ColorFull=PurpleFull
  1107. gi18b.Color=Purple
  1108. gi18b.ColorFull=PurpleFull
  1109. gi18c.Color=Purple
  1110. gi18c.ColorFull=PurpleFull
  1111. gi18a.Intensity = PurpleI
  1112.  
  1113. gi19a.Color=Green
  1114. gi19a.ColorFull=GreenFull
  1115. gi19b.Color=Green
  1116. gi19b.ColorFull=GreenFull
  1117. gi19c.Color=Green
  1118. gi19c.ColorFull=GreenFull
  1119. gi19a.Intensity = GreenI
  1120.  
  1121. gi20a.Color=Green
  1122. gi20a.ColorFull=GreenFull
  1123. gi20b.Color=Green
  1124. gi20b.ColorFull=GreenFull
  1125. gi20c.Color=Green
  1126. gi20c.ColorFull=GreenFull
  1127. gi20a.Intensity = GreenI
  1128.  
  1129. gi21a.Color=Green
  1130. gi21a.ColorFull=GreenFull
  1131. gi21b.Color=Green
  1132. gi21b.ColorFull=GreenFull
  1133. gi21c.Color=Green
  1134. gi21c.ColorFull=GreenFull
  1135. gi21a.Intensity = GreenI
  1136.  
  1137. gi22.Color=Green
  1138. gi22.ColorFull=GreenFull
  1139.  
  1140. gi23.Color=Green
  1141. gi23.ColorFull=GreenFull
  1142.  
  1143. gi24.Color=Green
  1144. gi24.ColorFull=GreenFull
  1145.  
  1146. End If
  1147.  
  1148.  
  1149. If GIColorModType = 4 Then
  1150. gi1a.Color=Green
  1151. gi1a.ColorFull=GreenFull
  1152. gi1b.Color=Green
  1153. gi1b.ColorFull=GreenFull
  1154. gi1c.Color=Green
  1155. gi1c.ColorFull=GreenFull
  1156. gi1a.Intensity = GreenI
  1157.  
  1158. gi2a.Color=Green
  1159. gi2a.ColorFull=GreenFull
  1160. gi2b.Color=Green
  1161. gi2b.ColorFull=GreenFull
  1162. gi2c.Color=Green
  1163. gi2c.ColorFull=GreenFull
  1164. gi2a.Intensity = GreenI
  1165.  
  1166. gi3a.Color=Green
  1167. gi3a.ColorFull=GreenFull
  1168. gi3b.Color=Green
  1169. gi3b.ColorFull=GreenFull
  1170. gi3c.Color=Green
  1171. gi3c.ColorFull=GreenFull
  1172. gi3a.Intensity = GreenI
  1173.  
  1174. gi4a.Color=Green
  1175. gi4a.ColorFull=GreenFull
  1176. gi4b.Color=Green
  1177. gi4b.ColorFull=GreenFull
  1178. gi4c.Color=Green
  1179. gi4c.ColorFull=GreenFull
  1180. gi4a.Intensity = GreenI
  1181.  
  1182. gi5a.Color=Green
  1183. gi5a.ColorFull=GreenFull
  1184. gi5b.Color=Green
  1185. gi5b.ColorFull=GreenFull
  1186. gi5c.Color=Green
  1187. gi5c.ColorFull=GreenFull
  1188. gi5a.Intensity = GreenI
  1189.  
  1190. gi6a.Color=Green
  1191. gi6a.ColorFull=GreenFull
  1192. gi6b.Color=Green
  1193. gi6b.ColorFull=GreenFull
  1194. gi6c.Color=Green
  1195. gi6c.ColorFull=GreenFull
  1196. gi6a.Intensity = GreenI
  1197.  
  1198. gi7a.Color=Green
  1199. gi7a.ColorFull=GreenFull
  1200. gi7b.Color=Green
  1201. gi7b.ColorFull=GreenFull
  1202. gi7c.Color=Green
  1203. gi7c.ColorFull=GreenFull
  1204. gi7a.Intensity = GreenI
  1205.  
  1206. gi8a.Color=Green
  1207. gi8a.ColorFull=GreenFull
  1208. gi8b.Color=Green
  1209. gi8b.ColorFull=GreenFull
  1210. gi8c.Color=Green
  1211. gi8c.ColorFull=GreenFull
  1212. gi8a.Intensity = GreenI
  1213.  
  1214. gi9a.Color=Green
  1215. gi9a.ColorFull=GreenFull
  1216. gi9b.Color=Green
  1217. gi9b.ColorFull=GreenFull
  1218. gi9c.Color=Green
  1219. gi9c.ColorFull=GreenFull
  1220. gi9a.Intensity = GreenI
  1221.  
  1222. gi10a.Color=Green
  1223. gi10a.ColorFull=GreenFull
  1224. gi10b.Color=Green
  1225. gi10b.ColorFull=GreenFull
  1226. gi10c.Color=Green
  1227. gi10c.ColorFull=GreenFull
  1228. gi10a.Intensity = GreenI
  1229.  
  1230. gi11a.Color=Green
  1231. gi11a.ColorFull=GreenFull
  1232. gi11b.Color=Green
  1233. gi11b.ColorFull=GreenFull
  1234. gi11c.Color=Green
  1235. gi11c.ColorFull=GreenFull
  1236. gi11a.Intensity = GreenI
  1237.  
  1238. gi12a.Color=Green
  1239. gi12a.ColorFull=GreenFull
  1240. gi12b.Color=Green
  1241. gi12b.ColorFull=GreenFull
  1242. gi12c.Color=Green
  1243. gi12c.ColorFull=GreenFull
  1244. gi12a.Intensity = GreenI
  1245.  
  1246. gi13a.Color=Green
  1247. gi13a.ColorFull=GreenFull
  1248. gi13b.Color=Green
  1249. gi13b.ColorFull=GreenFull
  1250. gi13c.Color=Green
  1251. gi13c.ColorFull=GreenFull
  1252. gi13a.Intensity = GreenI
  1253.  
  1254. gi14a.Color=Green
  1255. gi14a.ColorFull=GreenFull
  1256. gi14b.Color=Green
  1257. gi14b.ColorFull=GreenFull
  1258. gi14c.Color=Green
  1259. gi14c.ColorFull=GreenFull
  1260. gi14a.Intensity = GreenI
  1261.  
  1262. gi15a.Color=Green
  1263. gi15a.ColorFull=GreenFull
  1264. gi15b.Color=Green
  1265. gi15b.ColorFull=GreenFull
  1266. gi15c.Color=Green
  1267. gi15c.ColorFull=GreenFull
  1268. gi15a.Intensity = GreenI
  1269.  
  1270. gi16a.Color=Green
  1271. gi16a.ColorFull=GreenFull
  1272. gi16b.Color=Green
  1273. gi16b.ColorFull=GreenFull
  1274. gi16c.Color=Green
  1275. gi16c.ColorFull=GreenFull
  1276. gi16a.Intensity = GreenI
  1277.  
  1278. gi17a.Color=Green
  1279. gi17a.ColorFull=GreenFull
  1280. gi17b.Color=Green
  1281. gi17b.ColorFull=GreenFull
  1282. gi17c.Color=Green
  1283. gi17c.ColorFull=GreenFull
  1284. gi17a.Intensity = GreenI
  1285.  
  1286. gi18a.Color=Green
  1287. gi18a.ColorFull=GreenFull
  1288. gi18b.Color=Green
  1289. gi18b.ColorFull=GreenFull
  1290. gi18c.Color=Green
  1291. gi18c.ColorFull=GreenFull
  1292. gi18a.Intensity = GreenI
  1293.  
  1294. gi19a.Color=Green
  1295. gi19a.ColorFull=GreenFull
  1296. gi19b.Color=Green
  1297. gi19b.ColorFull=GreenFull
  1298. gi19c.Color=Green
  1299. gi19c.ColorFull=GreenFull
  1300. gi19a.Intensity = GreenI
  1301.  
  1302. gi20a.Color=Green
  1303. gi20a.ColorFull=GreenFull
  1304. gi20b.Color=Green
  1305. gi20b.ColorFull=GreenFull
  1306. gi20c.Color=Green
  1307. gi20c.ColorFull=GreenFull
  1308. gi20a.Intensity = GreenI
  1309.  
  1310. gi21a.Color=Green
  1311. gi21a.ColorFull=GreenFull
  1312. gi21b.Color=Green
  1313. gi21b.ColorFull=GreenFull
  1314. gi21c.Color=Green
  1315. gi21c.ColorFull=GreenFull
  1316. gi21a.Intensity = GreenI
  1317.  
  1318. End If
  1319.  
  1320. If TurtlesColorMod = 1 Then
  1321. l9.Color=Green
  1322. l9.ColorFull=GreenFull
  1323. l10.Color=Green
  1324. l10.ColorFull=GreenFull
  1325. l11.Color=Green
  1326. l11.ColorFull=GreenFull
  1327. l12.Color=Green
  1328. l12.ColorFull=GreenFull
  1329. l13.Color=Green
  1330. l13.ColorFull=GreenFull
  1331. l14.Color=Green
  1332. l14.ColorFull=GreenFull
  1333. l15.Color=Green
  1334. l15.ColorFull=GreenFull
  1335. Else
  1336. l9.Color=Amber
  1337. l9.ColorFull=AmberFull
  1338. l10.Color=Amber
  1339. l10.ColorFull=AmberFull
  1340. l11.Color=Amber
  1341. l11.ColorFull=AmberFull
  1342. l12.Color=Amber
  1343. l12.ColorFull=AmberFull
  1344. l13.Color=Amber
  1345. l13.ColorFull=AmberFull
  1346. l14.Color=Amber
  1347. l14.ColorFull=AmberFull
  1348. l15.Color=Amber
  1349. l15.ColorFull=AmberFull
  1350. End If
  1351.  
  1352. Dim RubberModType
  1353.  
  1354. '''''Rubbers
  1355.  
  1356. If RubberMod = 0 Then
  1357. RubberModType = Int(Rnd*3)+1
  1358. Else
  1359. RubberModType = RubberMod
  1360. End If
  1361.  
  1362.  
  1363. If RubberModType = 1 Then
  1364.  
  1365. LeftSlingshota.Material = "Rubber White"
  1366. LeftSlingshotb.Material = "Rubber White"
  1367. LeftSlingshotc.Material = "Rubber White"
  1368. LeftSlingshotd.Material = "Rubber White"
  1369.  
  1370. RightSlingshota.Material = "Rubber White"
  1371. RightSlingshotb.Material = "Rubber White"
  1372. RightSlingshotc.Material = "Rubber White"
  1373. RightSlingshotd.Material = "Rubber White"
  1374.  
  1375. Rubber1.Material = "Rubber White"
  1376. Rubber3.Material = "Rubber White"
  1377. Rubber4.Material = "Rubber White"
  1378. Rubber5.Material = "Rubber White"
  1379. Rubber6.Material = "Rubber White"
  1380. Rubber7.Material = "Rubber White"
  1381. Rubber8.Material = "Rubber White"
  1382. Rubber9.Material = "Rubber White"
  1383. Rubber21.Material = "Rubber White"
  1384. Rubber10.Material = "Rubber White"
  1385. Rubber22.Material = "Rubber White"
  1386. Rubber11.Material = "Rubber White"
  1387.  
  1388. Rubber32.Material = "Rubber White"
  1389.  
  1390. Pin3.Material = "Rubber White"
  1391. Pin4.Material = "Rubber White"
  1392. PegRubber3.Material = "Rubber White"
  1393. PegRubber4.Material = "Rubber White"
  1394. Pin7.Material = "Rubber White"
  1395. Pin8.Material = "Rubber White"
  1396. PegRubber1.Material = "Rubber White"
  1397. PegRubber2.Material = "Rubber White"
  1398.  
  1399. End If
  1400.  
  1401. If RubberModType = 2 Then
  1402.  
  1403. LeftSlingshota.Material = "Black Rubber"
  1404. LeftSlingshotb.Material = "Black Rubber"
  1405. LeftSlingshotc.Material = "Black Rubber"
  1406. LeftSlingshotd.Material = "Black Rubber"
  1407.  
  1408. RightSlingshota.Material = "Black Rubber"
  1409. RightSlingshotb.Material = "Black Rubber"
  1410. RightSlingshotc.Material = "Black Rubber"
  1411. RightSlingshotd.Material = "Black Rubber"
  1412.  
  1413. Rubber1.Material = "Black Rubber"
  1414. Rubber3.Material = "Black Rubber"
  1415. Rubber4.Material = "Black Rubber"
  1416. Rubber5.Material = "Black Rubber"
  1417. Rubber6.Material = "Black Rubber"
  1418. Rubber7.Material = "Black Rubber"
  1419. Rubber8.Material = "Black Rubber"
  1420. Rubber9.Material = "Black Rubber"
  1421. Rubber21.Material = "Black Rubber"
  1422. Rubber10.Material = "Black Rubber"
  1423. Rubber22.Material = "Black Rubber"
  1424. Rubber11.Material = "Black Rubber"
  1425.  
  1426. Rubber32.Material = "Black Rubber"
  1427.  
  1428. Pin3.Material = "Black Rubber"
  1429. Pin4.Material = "Black Rubber"
  1430. PegRubber3.Material = "Black Rubber"
  1431. PegRubber4.Material = "Black Rubber"
  1432. Pin7.Material = "Black Rubber"
  1433. Pin8.Material = "Black Rubber"
  1434. PegRubber1.Material = "Black Rubber"
  1435. PegRubber2.Material = "Black Rubber"
  1436.  
  1437. End If
  1438.  
  1439. If RubberModType = 3 Then
  1440.  
  1441. LeftSlingshota.Material = "Rubber Dark Green"
  1442. LeftSlingshotb.Material = "Rubber Dark Green"
  1443. LeftSlingshotc.Material = "Rubber Dark Green"
  1444. LeftSlingshotd.Material = "Rubber Dark Green"
  1445.  
  1446. RightSlingshota.Material = "Rubber Dark Green"
  1447. RightSlingshotb.Material = "Rubber Dark Green"
  1448. RightSlingshotc.Material = "Rubber Dark Green"
  1449. RightSlingshotd.Material = "Rubber Dark Green"
  1450.  
  1451. Rubber1.Material = "Rubber Purple"
  1452. Rubber3.Material = "Rubber Blue"
  1453. Rubber4.Material = "Rubber Red"
  1454. Rubber5.Material = "Rubber Purple"
  1455. Rubber6.Material = "Rubber Blue"
  1456. Rubber7.Material = "Rubber Purple"
  1457. Rubber8.Material = "Rubber Purple"
  1458. Rubber9.Material = "Rubber Purple"
  1459. Rubber21.Material = "Rubber Purple"
  1460. Rubber10.Material = "Rubber Orange"
  1461. Rubber22.Material = "Rubber Orange"
  1462. Rubber11.Material = "Rubber Purple"
  1463.  
  1464. Rubber32.Material = "Rubber Purple"
  1465.  
  1466. Pin3.Material = "Rubber Dark Green"
  1467. Pin4.Material = "Rubber Dark Green"
  1468. PegRubber3.Material = "Rubber Dark Green"
  1469. PegRubber4.Material = "Rubber Dark Green"
  1470.  
  1471. Pin7.Material = "Black Rubber"
  1472. Pin8.Material = "Black Rubber"
  1473. PegRubber1.Material = "Black Rubber"
  1474. PegRubber2.Material = "Black Rubber"
  1475.  
  1476.  
  1477. End If
  1478.  
  1479.  
  1480. 'Plastic Protectors
  1481. '0=Random
  1482. '1=Clear
  1483. '2=OozeGreen
  1484.  
  1485. If PlasticProtectors = 0 Then
  1486. PlasticProtectorsType = Int(Rnd*2)+1
  1487. Else
  1488. PlasticProtectorsType = PlasticProtectors
  1489. End If
  1490.  
  1491. If PlasticProtectorsType = 1 Then
  1492. pClearPlastic1.Material = "ClearPlastic"
  1493. pClearPlastic1.DisableLighting = 0
  1494. pClearPlastic2.Material = "ClearPlastic"
  1495. pClearPlastic2.DisableLighting = 0
  1496. pClearPlastic3.Material = "ClearPlastic"
  1497. pClearPlastic3.DisableLighting = 0
  1498. pClearPlastic4.Material = "ClearPlastic"
  1499. pClearPlastic4.DisableLighting = 0
  1500. pClearPlastic5.Material = "ClearPlastic"
  1501. pClearPlastic5.DisableLighting = 0
  1502. pClearPlastic6.Material = "ClearPlastic"
  1503. pClearPlastic6.DisableLighting = 0
  1504. pClearPlastic7.Material = "ClearPlastic"
  1505. pClearPlastic7.DisableLighting = 0
  1506. End If
  1507.  
  1508. If PlasticProtectorsType = 2 Then
  1509. pClearPlastic1.Material = "ClearPlasticNeonGreen"
  1510. pClearPlastic1.DisableLighting = 1
  1511. pClearPlastic2.Material = "ClearPlasticNeonGreen"
  1512. pClearPlastic2.DisableLighting = 1
  1513. pClearPlastic3.Material = "ClearPlasticNeonGreen"
  1514. pClearPlastic3.DisableLighting = 1
  1515. pClearPlastic4.Material = "ClearPlasticNeonGreen"
  1516. pClearPlastic4.DisableLighting = 1
  1517. pClearPlastic5.Material = "ClearPlasticNeonGreen"
  1518. pClearPlastic5.DisableLighting = 1
  1519. pClearPlastic6.Material = "ClearPlasticNeonGreen"
  1520. pClearPlastic6.DisableLighting = 1
  1521. pClearPlastic7.Material = "ClearPlasticNeonGreen"
  1522. pClearPlastic7.DisableLighting = 1
  1523. End If
  1524.  
  1525.  
  1526. If LBCOnorOff = 1 Then
  1527. pLightBoxCover.visible = True
  1528. Else
  1529. pLightBoxCover.visible = False
  1530. End If
  1531.  
  1532. 'SideFlasherColor
  1533. '0=Random
  1534. '1=Yellow
  1535. '2=Green
  1536.  
  1537. If SideFlasherColor = 0 Then
  1538. SideFlasherColorType = Int(Rnd*2)+1
  1539. Else
  1540. SideFlasherColorType = SideFlasherColor
  1541. End If
  1542.  
  1543.  
  1544. If SideFlasherColorType = 1 Then
  1545. pDome14a.Image = "TopFlasherYellow_off"
  1546. f14aa.Color = RGB(255,128,0)
  1547. f14aa.ColorFull = RGB(255,255,255)
  1548. f14ab.Color = RGB(255,128,0)
  1549. f14ab.ColorFull = RGB(255,255,255)
  1550. pDome14b.Image = "TopFlasherYellow_off"
  1551. f14ba.Color = RGB(255,128,0)
  1552. f14ba.ColorFull = RGB(255,255,255)
  1553. f14bb.Color = RGB(255,128,0)
  1554. f14bb.ColorFull = RGB(255,255,255)
  1555. End If
  1556.  
  1557. If SideFlasherColorType = 2 Then
  1558. pDome14a.Image = "TopFlasherGreen_off"
  1559. f14aa.Color = RGB(0,128,0)
  1560. f14aa.ColorFull = RGB(0,255,0)
  1561. f14ab.Color = RGB(0,128,0)
  1562. f14ab.ColorFull = RGB(0,255,0)
  1563. pDome14b.Image = "TopFlasherGreen_off"
  1564. f14ba.Color = RGB(0,128,0)
  1565. f14ba.ColorFull = RGB(0,255,0)
  1566. f14bb.Color = RGB(0,128,0)
  1567. f14bb.ColorFull = RGB(0,255,0)
  1568. End If
  1569.  
  1570.  
  1571. If TurtleWeapons = 1 Then
  1572. pNunChuk1a.Visible = 1
  1573. pNunChuk1b.Visible = 1
  1574. pNunChuk1c.Visible = 1
  1575. pNunChuk2a.Visible = 1
  1576. pNunChuk2b.Visible = 1
  1577. pNunChuk2c.Visible = 1
  1578. pMike_Belt2.Visible = 1
  1579. pMike_Belt1.Visible = 0
  1580. pBoStaff.Visible = 1
  1581. pSai1a.Visible = 1
  1582. pSai1b.Visible = 1
  1583. pSai2a.Visible = 1
  1584. pSai2b.Visible = 1
  1585. pSword1a.Visible = 1
  1586. pSword1b.Visible = 1
  1587. pSword2a.Visible = 1
  1588. pSword2b.Visible = 1
  1589. Else
  1590. pNunChuk1a.Visible = 0
  1591. pNunChuk1b.Visible = 0
  1592. pNunChuk1c.Visible = 0
  1593. pNunChuk2a.Visible = 0
  1594. pNunChuk2b.Visible = 0
  1595. pNunChuk2c.Visible = 0
  1596. pMike_Belt2.Visible = 0
  1597. pMike_Belt1.Visible = 1
  1598. pBoStaff.Visible = 0
  1599. pSai1a.Visible = 0
  1600. pSai1b.Visible = 0
  1601. pSai2a.Visible = 0
  1602. pSai2b.Visible = 0
  1603. pSword1a.Visible = 0
  1604. pSword1b.Visible = 0
  1605. pSword2a.Visible = 0
  1606. pSword2b.Visible = 0
  1607. End If
  1608.  
  1609. 'Blacklight Ooooze
  1610. '0=Off
  1611. '1=On
  1612.  
  1613. If BlacklightOoze = 1 Then
  1614.  
  1615. bl_green.visible = True
  1616. fApronOozeL.visible = True
  1617. fApronOozeR.visible = True
  1618.  
  1619. Else
  1620.  
  1621. bl_green.visible = False
  1622. fApronOozeL.visible = False
  1623. fApronOozeR.visible = False
  1624.  
  1625. End If
  1626.  
  1627.  
  1628. 'Blacklight LaneGuides
  1629. '0=Off
  1630. '1=On
  1631.  
  1632. If BlacklightLaneGuides = 1 Then
  1633.  
  1634. Primitive4.DisableLighting = 1
  1635. Primitive13.DisableLighting = 1
  1636.  
  1637. Else
  1638.  
  1639. Primitive4.DisableLighting = 0
  1640. Primitive13.DisableLighting = 0
  1641.  
  1642. End If
  1643.  
  1644.  
  1645. 'Post Colors
  1646. '0=Random
  1647. '1=Black
  1648. '2=Yellow
  1649. '3=Green
  1650. '4=Ooze Green
  1651.  
  1652. If PostsColor = 0 Then
  1653. PostsColorType = Int(Rnd*4)+1
  1654. Else
  1655. PostsColorType = PostsColor
  1656. End If
  1657.  
  1658. If PostsColorType = 1 Then
  1659. for each xxPostsColor in RubberPosts
  1660. xxPostsColor.DisableLighting = 0
  1661. xxPostsColor.Image = "rubber-post_black"
  1662. next
  1663. End If
  1664.  
  1665. If PostsColorType = 2 Then
  1666. for each xxPostsColor in RubberPosts
  1667. xxPostsColor.DisableLighting = 0
  1668. xxPostsColor.Image = "rubber-post_yellow"
  1669. next
  1670. End If
  1671.  
  1672. If PostsColorType = 3 Then
  1673. for each xxPostsColor in RubberPosts
  1674. xxPostsColor.DisableLighting = 0
  1675. xxPostsColor.Image = "rubber-post_green"
  1676. next
  1677. End If
  1678.  
  1679. If PostsColorType = 4 Then
  1680. for each xxPostsColor in RubberPosts
  1681. xxPostsColor.DisableLighting = 1
  1682. xxPostsColor.Image = "rubber-post_oozegreen"
  1683. next
  1684. End If
  1685.  
  1686.  
  1687. 'Blacklight Pegs
  1688. '0=Off
  1689. '1=On
  1690.  
  1691. If BlacklightPegs = 1 Then
  1692. for each xxBLPeg in Pegs
  1693. xxBLPeg.DisableLighting = 1
  1694. next
  1695. Else
  1696. for each xxBLPeg in Pegs
  1697. xxBLPeg.DisableLighting = 0
  1698. next
  1699. End If
  1700.  
  1701. 'Instruction Cards
  1702.  
  1703. If CustomICs = 0 Then
  1704. CustomICsType = Int(Rnd*4)+1
  1705. Else
  1706. CustomICsType = CustomICs
  1707. End If
  1708.  
  1709. If CustomICsType = 1 Then
  1710. pICL.Image = "IC1_left"
  1711. If GameType = 1 Then
  1712. pICR.Image = "dataeast-coin"
  1713. Else
  1714. pICR.Image = "dataeast-freeplay"
  1715. End If
  1716. End If
  1717.  
  1718. If CustomICsType = 2 Then
  1719. pICL.Image = "tmnt_cICL1"
  1720. If GameType = 1 Then
  1721. pICR.Image = "tmnt_cICR1-C"
  1722. Else
  1723. pICR.Image = "tmnt_cICR1-F"
  1724. End If
  1725. End If
  1726.  
  1727. If CustomICsType = 4 Then
  1728. pICL.Image = "tmnt_cICL2"
  1729. If GameType = 1 Then
  1730. pICR.Image = "tmnt_cICR2-C"
  1731. Else
  1732. pICR.Image = "tmnt_cICR2-F"
  1733. End If
  1734. End If
  1735. If CustomICsType = 3 Then
  1736. pICL.Image = "tmnt_cICL3"
  1737. If GameType = 1 Then
  1738. pICR.Image = "tmnt_cICR3-C"
  1739. Else
  1740. pICR.Image = "tmnt_cICR3-F"
  1741. End If
  1742. End If
  1743.  
  1744. End Sub
  1745.  
  1746.  
  1747. ''''
  1748. 'Auto Plunger
  1749. ''''
  1750.  
  1751. Sub solAutofire(Enabled)
  1752. If Enabled Then
  1753. AutoPlunger.autoFire
  1754. 'Playsound SoundFX("solon",DOFContactors)
  1755. End If
  1756. End Sub
  1757.  
  1758. ''''''''
  1759. 'Targets
  1760. ''''''''
  1761. Dim Target25Step, Target26Step, Target27Step, Target28Step, Target29Step, Target30Step, Target31Step, Target32Step, Target33Step, Target34Step, Target35Step, Target36Step, Target37Step, Target38Step, Target49Step, Target55Step
  1762.  
  1763.  
  1764. Sub t25_Hit:vpmTimer.PulseSw(25):pT25A.RotZ = 5:Target25Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t25:End Sub
  1765. Sub t25_timer()
  1766. Select Case Target25Step
  1767. Case 1:pT25A.RotZ = 3
  1768. Case 2:pT25A.RotZ = -2
  1769. Case 3:pT25A.RotZ = 1
  1770. Case 4:pT25A.RotZ = 0:Me.TimerEnabled = 0:Target25Step = 0
  1771. End Select
  1772. Target25Step = Target25Step + 1
  1773. End Sub
  1774.  
  1775. Sub DoubleTarget5_hit:vpmTimer.PulseSw(26):vpmTimer.PulseSw(25):pT26A.RotZ = 5:Target26Step = 1:t26.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t26:pT25A.RotZ = 5:Target25Step = 1:t25.TimerEnabled = 1:End Sub
  1776.  
  1777. Sub t26_Hit:vpmTimer.PulseSw(26):pT26A.RotZ = 5:Target26Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t26:End Sub
  1778. Sub t26_timer()
  1779. Select Case Target26Step
  1780. Case 1:pT26A.RotZ = 3
  1781. Case 2:pT26A.RotZ = -2
  1782. Case 3:pT26A.RotZ = 1
  1783. Case 4:pT26A.RotZ = 0:Me.TimerEnabled = 0:Target26Step = 0
  1784. End Select
  1785. Target26Step = Target26Step + 1
  1786. End Sub
  1787.  
  1788. Sub DoubleTarget4_hit:vpmTimer.PulseSw(27):vpmTimer.PulseSw(26):pT27A.RotZ = 5:Target27Step = 1:t27.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t27:pT26A.RotZ = 5:Target26Step = 1:t26.TimerEnabled = 1:End Sub
  1789.  
  1790. Sub t27_Hit:vpmTimer.PulseSw(27):pT27A.RotZ = 5:Target27Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t27:End Sub
  1791. Sub t27_timer()
  1792. Select Case Target27Step
  1793. Case 1:pT27A.RotZ = 3
  1794. Case 2:pT27A.RotZ = -2
  1795. Case 3:pT27A.RotZ = 1
  1796. Case 4:pT27A.RotZ = 0:Me.TimerEnabled = 0:Target27Step = 0
  1797. End Select
  1798. Target27Step = Target27Step + 1
  1799. End Sub
  1800.  
  1801. Sub DoubleTarget3_hit:vpmTimer.PulseSw(28):vpmTimer.PulseSw(27):pT28A.RotZ = 5:Target28Step = 1:t28.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t28:pT27A.RotZ = 5:Target27Step = 1:t27.TimerEnabled = 1:End Sub
  1802.  
  1803. Sub t28_Hit:vpmTimer.PulseSw(28):pT28A.RotZ = 5:Target28Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t28:End Sub
  1804. Sub t28_timer()
  1805. Select Case Target28Step
  1806. Case 1:pT28A.RotZ = 3
  1807. Case 2:pT28A.RotZ = -2
  1808. Case 3:pT28A.RotZ = 1
  1809. Case 4:pT28A.RotZ = 0:Me.TimerEnabled = 0:Target28Step = 0
  1810. End Select
  1811. Target28Step = Target28Step + 1
  1812. End Sub
  1813.  
  1814. Sub DoubleTarget2_hit:vpmTimer.PulseSw(29):vpmTimer.PulseSw(28):pT29A.RotZ = 5:Target29Step = 1:t29.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t29:pT28A.RotZ = 5:Target28Step = 1:t28.TimerEnabled = 1:End Sub
  1815.  
  1816. Sub t29_Hit:vpmTimer.PulseSw(29):pT29A.RotZ = 5:Target29Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t29:End Sub
  1817. Sub t29_timer()
  1818. Select Case Target29Step
  1819. Case 1:pT29A.RotZ = 3
  1820. Case 2:pT29A.RotZ = -2
  1821. Case 3:pT29A.RotZ = 1
  1822. Case 4:pT29A.RotZ = 0:Me.TimerEnabled = 0:Target29Step = 0
  1823. End Select
  1824. Target29Step = Target29Step + 1
  1825. End Sub
  1826.  
  1827. Sub DoubleTarget1_hit:vpmTimer.PulseSw(30):vpmTimer.PulseSw(29):pT30A.RotZ = 5:Target30Step = 1:t30.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t30:pT29A.RotZ = 5:Target29Step = 1:t29.TimerEnabled = 1:End Sub
  1828.  
  1829. Sub t30_Hit:vpmTimer.PulseSw(30):pT30A.RotZ = 5:Target30Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t30:End Sub
  1830. Sub t30_timer()
  1831. Select Case Target30Step
  1832. Case 1:pT30A.RotZ = 3
  1833. Case 2:pT30A.RotZ = -2
  1834. Case 3:pT30A.RotZ = 1
  1835. Case 4:pT30A.RotZ = 0:Me.TimerEnabled = 0:Target30Step = 0
  1836. End Select
  1837. Target30Step = Target30Step + 1
  1838. End Sub
  1839.  
  1840. Sub t33_Hit:vpmTimer.PulseSw(33):pT33A.RotZ = 5:Target33Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t33:End Sub
  1841. Sub t33_timer()
  1842. Select Case Target33Step
  1843. Case 1:pT33A.RotZ = 3
  1844. Case 2:pT33A.RotZ = -2
  1845. Case 3:pT33A.RotZ = 1
  1846. Case 4:pT33A.RotZ = 0:Me.TimerEnabled = 0:Target33Step = 0
  1847. End Select
  1848. Target33Step = Target33Step + 1
  1849. End Sub
  1850.  
  1851. Sub DoubleTarget6_hit:vpmTimer.PulseSw(33):vpmTimer.PulseSw(34):pT33A.RotZ = 5:Target33Step = 1:t33.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t33:pT34A.RotZ = 5:Target34Step = 1:t34.TimerEnabled = 1:End Sub
  1852.  
  1853. Sub t34_Hit:vpmTimer.PulseSw(34):pT34A.RotZ = 5:Target34Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t34:End Sub
  1854. Sub t34_timer()
  1855. Select Case Target34Step
  1856. Case 1:pT34A.RotZ = 3
  1857. Case 2:pT34A.RotZ = -2
  1858. Case 3:pT34A.RotZ = 1
  1859. Case 4:pT34A.RotZ = 0:Me.TimerEnabled = 0:Target34Step = 0
  1860. End Select
  1861. Target34Step = Target34Step + 1
  1862. End Sub
  1863.  
  1864. Sub DoubleTarget7_hit:vpmTimer.PulseSw(34):vpmTimer.PulseSw(35):pT34A.RotZ = 5:Target34Step = 1:t34.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t34:pT35A.RotZ = 5:Target35Step = 1:t35.TimerEnabled = 1:End Sub
  1865.  
  1866. Sub t35_Hit:vpmTimer.PulseSw(35):pT35A.RotZ = 5:Target35Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t35:End Sub
  1867. Sub t35_timer()
  1868. Select Case Target35Step
  1869. Case 1:pT35A.RotZ = 3
  1870. Case 2:pT35A.RotZ = -2
  1871. Case 3:pT35A.RotZ = 1
  1872. Case 4:pT35A.RotZ = 0:Me.TimerEnabled = 0:Target35Step = 0
  1873. End Select
  1874. Target35Step = Target35Step + 1
  1875. End Sub
  1876.  
  1877. Sub t36_Hit:vpmTimer.PulseSw(36):pT36A.RotZ = 5:Target36Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t36:End Sub
  1878. Sub t36_timer()
  1879. Select Case Target36Step
  1880. Case 1:pT36A.RotZ = 3
  1881. Case 2:pT36A.RotZ = -2
  1882. Case 3:pT36A.RotZ = 1
  1883. Case 4:pT36A.RotZ = 0:Me.TimerEnabled = 0:Target36Step = 0
  1884. End Select
  1885. Target36Step = Target36Step + 1
  1886. End Sub
  1887.  
  1888. Sub DoubleTarget8_hit:vpmTimer.PulseSw(36):vpmTimer.PulseSw(37):pT36A.RotZ = 5:Target36Step = 1:t36.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t36:pT37A.RotZ = 5:Target37Step = 1:t37.TimerEnabled = 1:End Sub
  1889.  
  1890. Sub t37_Hit:vpmTimer.PulseSw(37):pT37A.RotZ = 5:Target37Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t37:End Sub
  1891. Sub t37_timer()
  1892. Select Case Target37Step
  1893. Case 1:pT37A.RotZ = 3
  1894. Case 2:pT37A.RotZ = -2
  1895. Case 3:pT37A.RotZ = 1
  1896. Case 4:pT37A.RotZ = 0:Me.TimerEnabled = 0:Target37Step = 0
  1897. End Select
  1898. Target37Step = Target37Step + 1
  1899. End Sub
  1900.  
  1901. Sub DoubleTarget9_hit:vpmTimer.PulseSw(37):vpmTimer.PulseSw(38):pT37A.RotZ = 5:Target37Step = 1:t37.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t37:pT38A.RotZ = 5:Target38Step = 1:t38.TimerEnabled = 1:End Sub
  1902.  
  1903. Sub t38_Hit:vpmTimer.PulseSw(38):pT38A.RotZ = 5:Target38Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t38:End Sub
  1904. Sub t38_timer()
  1905. Select Case Target38Step
  1906. Case 1:pT38A.RotZ = 3
  1907. Case 2:pT38A.RotZ = -2
  1908. Case 3:pT38A.RotZ = 1
  1909. Case 4:pT38A.RotZ = 0:Me.TimerEnabled = 0:Target38Step = 0
  1910. End Select
  1911. Target38Step = Target38Step + 1
  1912. End Sub
  1913.  
  1914. Sub t49_Hit:vpmTimer.PulseSw(49):pT49A.RotZ = 5:Target49Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t49:End Sub
  1915. Sub t49_timer()
  1916. Select Case Target49Step
  1917. Case 1:pT49A.RotZ = 3
  1918. Case 2:pT49A.RotZ = -2
  1919. Case 3:pT49A.RotZ = 1
  1920. Case 4:pT49A.RotZ = 0:Me.TimerEnabled = 0:Target49Step = 0
  1921. End Select
  1922. Target49Step = Target49Step + 1
  1923. End Sub
  1924.  
  1925. Sub t55_Hit:vpmTimer.PulseSw(55):pT55A.RotZ = 5:Target55Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("_spottarget",DOFTargets),t55:End Sub
  1926. 'Sub t55_Hit:vpmTimer.PulseSw(55):pT55A.RotZ = 5:Target55Step = 0:Me.TimerEnabled = 1:PlaySoundAt SoundFX("Knocker",DOFTargets),t55:End Sub
  1927. Sub t55_timer()
  1928. Select Case Target55Step
  1929. Case 1:pT55A.RotZ = 3
  1930. Case 2:pT55A.RotZ = -2
  1931. Case 3:pT55A.RotZ = 1
  1932. Case 4:pT55A.RotZ = 0:Me.TimerEnabled = 0:Target49Step = 0
  1933. End Select
  1934. Target55Step = Target55Step + 1
  1935. End Sub
  1936.  
  1937. ''''''''''''''''''''''''''''
  1938. ''' Ramp Switches
  1939. ''''''''''''''''''''''''''''
  1940.  
  1941. Sub sw32_Hit:Controller.Switch(32) = 1:PlaySoundAt "sensor",sw32:sw32.timerenabled = true:End Sub
  1942. Sub sw32_Unhit:Controller.Switch(32) = 0:End Sub
  1943.  
  1944. 'switch 32 animation
  1945.  
  1946. Const Switch32min = 0
  1947. Const Switch32max = -20
  1948. Dim Switch32dir
  1949. Switch32dir = -2
  1950.  
  1951. Sub sw32_timer()
  1952. pRampSwitch2B.RotY = pRampSwitch2B.RotY + Switch32dir
  1953. If pRampSwitch2B.RotY >= Switch32min Then
  1954. sw32.timerenabled = False
  1955. pRampSwitch2B.RotY = Switch32min
  1956. Switch32dir = -2
  1957. End If
  1958. If pRampSwitch2B.RotY <= Switch32max Then
  1959. Switch32dir = 4
  1960. End If
  1961. End Sub
  1962.  
  1963. Sub sw40_Hit:Controller.Switch(40) = 1:PlaySoundAt "sensor",sw40:sw40.timerenabled = true:End Sub
  1964. Sub sw40_Unhit:Controller.Switch(40) = 0:End Sub
  1965.  
  1966. 'switch 40 animation
  1967.  
  1968. Const Switch40min = 0
  1969. Const Switch40max = -20
  1970. Dim Switch40dir
  1971. Switch40dir = -2
  1972.  
  1973. Sub sw40_timer()
  1974. pRampSwitch1B.RotY = pRampSwitch1B.RotY + Switch40dir
  1975. If pRampSwitch1B.RotY >= Switch40min Then
  1976. sw40.timerenabled = False
  1977. pRampSwitch1B.RotY = Switch40min
  1978. Switch40dir = -2
  1979. End If
  1980. If pRampSwitch1B.RotY <= Switch40max Then
  1981. Switch40dir = 4
  1982. End If
  1983. End Sub
  1984.  
  1985. ''''''''''''''''''''''''''''
  1986. ''' Spinner
  1987. ''''''''''''''''''''''''''''
  1988.  
  1989. Sub sw56_Spin():vpmTimer.PulseSw 56:PlaySoundAt "fx_spinner",sw56:End Sub
  1990.  
  1991. ''''''''''''''''''''''''''''
  1992. ''' Bumpers
  1993. ''''''''''''''''''''''''''''
  1994.  
  1995. Dim bump1, bump2, bump3
  1996.  
  1997. Sub Bumper1_Hit:vpmTimer.PulseSw 47:PlaySoundAtBumperVol SoundFX("bumper1",DOFContactors),Bumper1,1:pBumpCap1.TransZ = -5:bump1 = 1:Me.TimerEnabled = 1:End Sub
  1998. Sub Bumper1_Timer()
  1999. Select Case bump1
  2000. Case 1:pBumpCap1.TransZ = -10:bump1 = 2
  2001. Case 2:pBumpCap1.TransZ = -15:bump1 = 3
  2002. Case 3:pBumpCap1.TransZ = -20:bump1 = 4
  2003. Case 4:pBumpCap1.TransZ = -15:bump1 = 5
  2004. Case 5:pBumpCap1.TransZ = -10:bump1 = 6
  2005. Case 6:pBumpCap1.TransZ = -5:bump1 = 7
  2006. Case 7:pBumpCap1.TransZ = 0:bump1 = 8
  2007. Case 8:pBumpCap1.TransZ = 5:bump1 = 9
  2008. Case 9:pBumpCap1.TransZ = 0:bump1 = 1:Me.TimerEnabled = 0
  2009. End Select
  2010. pMike_ArmL.ObjRotX = pBumpCap1.TransZ
  2011. pMike_ArmR.ObjRotX = pBumpCap1.TransZ
  2012. pMike_LegL.ObjRotX = pBumpCap1.TransZ
  2013. pMike_LegR.ObjRotX = pBumpCap1.TransZ
  2014. pMike_Head.ObjRotX = pBumpCap1.TransZ
  2015. pMike_Belt1.ObjRotX = pBumpCap1.TransZ
  2016. pMike_Belt2.ObjRotX = pBumpCap1.TransZ
  2017. pMike_Torso.ObjRotX = pBumpCap1.TransZ
  2018. pNunChuk1a.ObjRotX = pBumpCap1.TransZ
  2019. pNunChuk1b.ObjRotX = pBumpCap1.TransZ
  2020. pNunChuk1c.ObjRotX = pBumpCap1.TransZ
  2021. pNunChuk2a.ObjRotX = pBumpCap1.TransZ
  2022. pNunChuk2b.ObjRotX = pBumpCap1.TransZ
  2023. pNunChuk2c.ObjRotX = pBumpCap1.TransZ
  2024.  
  2025. End Sub
  2026.  
  2027. Sub Bumper2_Hit:vpmTimer.PulseSw 46:PlaySoundAtBumperVol SoundFX("bumper2",DOFContactors),Bumper2,1:bump2 = 1:Me.TimerEnabled = 1:End Sub
  2028. Sub Bumper2_Timer()
  2029. Select Case bump2
  2030. Case 1:
  2031. Case 2:
  2032. Case 3:
  2033. Case 4:Me.TimerEnabled = 0
  2034. End Select
  2035. End Sub
  2036.  
  2037. Sub Bumper3_Hit:vpmTimer.PulseSw 48:PlaySoundAtBumperVol SoundFX("bumper3",DOFContactors),Bumper3,1:bump3 = 1:Me.TimerEnabled = 1:End Sub
  2038. Sub Bumper3_Timer()
  2039. Select Case bump3
  2040. Case 1:
  2041. Case 2:
  2042. Case 3:
  2043. Case 4:Me.TimerEnabled = 0
  2044. End Select
  2045. End Sub
  2046.  
  2047.  
  2048. ''''''''''''''''''''''''''''
  2049. ''' Slingshots
  2050. ''''''''''''''''''''''''''''
  2051.  
  2052. Dim LeftSlingshotStep,RightSlingshotStep
  2053.  
  2054.  
  2055. Sub LeftSlingShot_Slingshot:vpmTimer.PulseSw 21:LeftSlingshota.visible = false:pSlingL.TransZ = -8:LeftSlingshotb.visible = true:PlaySoundAt SoundFX("LeftSlingShot",DOFContactors),pSlingL:LeftSlingshotStep = 0:Me.TimerEnabled = 1:End Sub
  2056. Sub LeftSlingshot_Timer
  2057. Select Case LeftSlingshotStep
  2058. Case 0:LeftSlingshotb.visible = false:pSlingL.TransZ = -16:LeftSlingshotc.visible = true
  2059. Case 1:LeftSlingshotc.visible = false:pSlingL.TransZ = -24:LeftSlingshotd.visible = true
  2060. Case 2:LeftSlingshotd.visible = false:pSlingL.TransZ = -16:LeftSlingshotc.visible = true
  2061. Case 3:LeftSlingshotc.visible = false:pSlingL.TransZ = -8:LeftSlingshotb.visible = true
  2062. Case 4:LeftSlingshotb.visible = false:pSlingL.TransZ = 0:LeftSlingshota.visible = true:Me.TimerEnabled = 0 '
  2063. End Select
  2064.  
  2065. LeftSlingshotStep = LeftSlingshotStep + 1
  2066. End Sub
  2067.  
  2068.  
  2069. Sub RightSlingShot_Slingshot:vpmTimer.PulseSw 22:RightSlingshota.visible = false:pSlingR.TransZ = -8:RightSlingshotb.visible = true:PlaySoundAt SoundFX("RightSlingShot",DOFContactors),pSlingR:RightSlingshotStep = 0:Me.TimerEnabled = 1:End Sub
  2070. Sub RightSlingshot_Timer
  2071. Select Case RightSlingshotStep
  2072. Case 0:RightSlingshotb.visible = false:pSlingR.TransZ = -16:RightSlingshotc.visible = true
  2073. Case 1:RightSlingshotc.visible = false:pSlingR.TransZ = -24:RightSlingshotd.visible = true
  2074. Case 2:RightSlingshotd.visible = false:pSlingR.TransZ = -16:RightSlingshotc.visible = true
  2075. Case 3:RightSlingshotc.visible = false:pSlingR.TransZ = -8:RightSlingshotb.visible = true
  2076. Case 4:RightSlingshotb.visible = false:pSlingR.TransZ = 0:RightSlingshota.visible = true:Me.TimerEnabled = 0 '
  2077. End Select
  2078.  
  2079. RightSlingshotStep = RightSlingshotStep + 1
  2080. End Sub
  2081.  
  2082. ''''''''''''''''''''''''''''
  2083. ''' Switches
  2084. ''''''''''''''''''''''''''''
  2085.  
  2086. Sub sw14_Hit()
  2087. Switch14dir = 1
  2088. Sw14Move = 1
  2089. Me.TimerEnabled = true
  2090. PlaySoundAt "sensor",sw14
  2091. Controller.Switch(14) = 1
  2092. End Sub
  2093.  
  2094. Sub sw14_unHit()
  2095. Switch14dir = -1
  2096. Sw14Move = 5
  2097. Me.TimerEnabled = true
  2098. Controller.Switch(14) = 0
  2099. End Sub
  2100.  
  2101. Sub sw17_Hit()
  2102. Switch17dir = 1
  2103. Sw17Move = 1
  2104. Me.TimerEnabled = true
  2105. Controller.Switch(17) = 1
  2106. PlaySoundAt "sensor",sw17
  2107. End Sub
  2108.  
  2109. Sub sw17_unHit()
  2110. Switch17dir = -1
  2111. Sw17Move = 5
  2112. Me.TimerEnabled = true
  2113. Controller.Switch(17) = 0
  2114. End Sub
  2115.  
  2116. Sub sw18_Hit()
  2117. Switch18dir = 1
  2118. Sw18Move = 1
  2119. Me.TimerEnabled = true
  2120. Controller.Switch(18) = 1
  2121. PlaySoundAt "sensor",sw18
  2122. End Sub
  2123.  
  2124. Sub sw18_unHit()
  2125. Switch18dir = -1
  2126. Sw18Move = 5
  2127. Me.TimerEnabled = true
  2128. Controller.Switch(18) = 0
  2129. End Sub
  2130.  
  2131. Sub sw19_Hit()
  2132. Switch19dir = 1
  2133. Sw19Move = 1
  2134. Me.TimerEnabled = true
  2135. Controller.Switch(19) = 1
  2136. PlaySoundAt "sensor",sw19
  2137. End Sub
  2138.  
  2139. Sub sw19_unHit()
  2140. Switch19dir = -1
  2141. Sw19Move = 5
  2142. Me.TimerEnabled = true
  2143. Controller.Switch(19) = 0
  2144. End Sub
  2145.  
  2146. Sub sw20_Hit()
  2147. Switch20dir = 1
  2148. Sw20Move = 1
  2149. Me.TimerEnabled = true
  2150. Controller.Switch(20) = 1
  2151. PlaySoundAt "sensor",sw20
  2152. End Sub
  2153.  
  2154. Sub sw20_unHit()
  2155. Switch20dir = -1
  2156. Sw20Move = 5
  2157. Me.TimerEnabled = true
  2158. Controller.Switch(20) = 0
  2159. End Sub
  2160.  
  2161. Sub sw50_Hit()
  2162. Controller.Switch(50) = 1
  2163. PlaySoundAt "sensor",sw50
  2164. End Sub
  2165.  
  2166. Sub sw50_unHit()
  2167. Controller.Switch(50) = 0
  2168. End Sub
  2169.  
  2170. 'Rollover Animations
  2171.  
  2172.  
  2173. Dim Switch14dir, SW14Move
  2174.  
  2175. Sub sw14_timer()
  2176. Select case Sw14Move
  2177.  
  2178. Case 0:me.TimerEnabled = false:pRollover5.RotX = 90
  2179.  
  2180. Case 1:pRollover5.RotX = 95
  2181.  
  2182. Case 2:pRollover5.RotX = 100
  2183.  
  2184. Case 3:pRollover5.RotX = 105
  2185.  
  2186. Case 4:pRollover5.RotX = 110
  2187.  
  2188. Case 5:pRollover5.RotX = 115
  2189.  
  2190. Case 6:me.TimerEnabled = false:pRollover5.RotX = 120
  2191.  
  2192. End Select
  2193.  
  2194. SW14Move = SW14Move + Switch14dir
  2195.  
  2196. End Sub
  2197.  
  2198.  
  2199.  
  2200. Dim Switch17dir, SW17Move
  2201. 'Switch19dir = -2
  2202.  
  2203. Sub sw17_timer()
  2204. Select case Sw17Move
  2205.  
  2206. Case 0:me.TimerEnabled = false:pRollover4.RotX = 90
  2207.  
  2208. Case 1:pRollover4.RotX = 95
  2209.  
  2210. Case 2:pRollover4.RotX = 100
  2211.  
  2212. Case 3:pRollover4.RotX = 105
  2213.  
  2214. Case 4:pRollover4.RotX = 110
  2215.  
  2216. Case 5:pRollover4.RotX = 115
  2217.  
  2218. Case 6:me.TimerEnabled = false:pRollover4.RotX = 120
  2219.  
  2220. End Select
  2221.  
  2222. SW17Move = SW17Move + Switch17dir
  2223.  
  2224. End Sub
  2225.  
  2226.  
  2227. Dim Switch18dir, SW18Move
  2228.  
  2229. Sub sw18_timer()
  2230. Select case Sw18Move
  2231.  
  2232. Case 0:me.TimerEnabled = false:pRollover3.RotX = 90
  2233.  
  2234. Case 1:pRollover3.RotX = 95
  2235.  
  2236. Case 2:pRollover3.RotX = 100
  2237.  
  2238. Case 3:pRollover3.RotX = 105
  2239.  
  2240. Case 4:pRollover3.RotX = 110
  2241.  
  2242. Case 5:pRollover3.RotX = 115
  2243.  
  2244. Case 6:me.TimerEnabled = false:pRollover3.RotX = 120
  2245.  
  2246. End Select
  2247.  
  2248. SW18Move = SW18Move + Switch18dir
  2249.  
  2250. End Sub
  2251.  
  2252.  
  2253.  
  2254. Dim Switch19dir, SW19Move
  2255.  
  2256. Sub sw19_timer()
  2257. Select case Sw19Move
  2258.  
  2259. Case 0:me.TimerEnabled = false:pRollover1.RotX = 90
  2260.  
  2261. Case 1:pRollover1.RotX = 95
  2262.  
  2263. Case 2:pRollover1.RotX = 100
  2264.  
  2265. Case 3:pRollover1.RotX = 105
  2266.  
  2267. Case 4:pRollover1.RotX = 110
  2268.  
  2269. Case 5:pRollover1.RotX = 115
  2270.  
  2271. Case 6:me.TimerEnabled = false:pRollover1.RotX = 120
  2272.  
  2273. End Select
  2274.  
  2275. SW19Move = SW19Move + Switch19dir
  2276.  
  2277. End Sub
  2278.  
  2279.  
  2280. Dim Switch20dir, SW20Move
  2281.  
  2282. Sub sw20_timer()
  2283. Select case Sw20Move
  2284.  
  2285. Case 0:me.TimerEnabled = false:pRollover2.RotX = 90
  2286.  
  2287. Case 1:pRollover2.RotX = 95
  2288.  
  2289. Case 2:pRollover2.RotX = 100
  2290.  
  2291. Case 3:pRollover2.RotX = 105
  2292.  
  2293. Case 4:pRollover2.RotX = 110
  2294.  
  2295. Case 5:pRollover2.RotX = 115
  2296.  
  2297. Case 6:me.TimerEnabled = false:pRollover2.RotX = 120
  2298.  
  2299. End Select
  2300.  
  2301. SW20Move = SW20Move + Switch20dir
  2302.  
  2303. End Sub
  2304.  
  2305. ' ===============================================================================================
  2306. ' Spinning Pizza
  2307. ' ===============================================================================================
  2308.  
  2309. Dim discAngle, stepAngle, stopDiscs, discsAreRunning
  2310.  
  2311. InitDiscs()
  2312.  
  2313. Sub InitDiscs()
  2314. discAngle = 0
  2315. discsAreRunning = False
  2316. End Sub
  2317.  
  2318. Sub SolPizzaSpin(Enabled)
  2319.  
  2320. ttPizza.MotorOn = Enabled
  2321.  
  2322. If Enabled Then
  2323. stepAngle = 20.0
  2324. discsAreRunning = True
  2325. stopDiscs = False
  2326. DiscsTimer.Interval = 20
  2327. DiscsTimer.Enabled = True
  2328. Else
  2329. stopDiscs = True
  2330. discsAreRunning = True
  2331. End If
  2332. End Sub
  2333.  
  2334. Sub DiscsTimer_Timer()
  2335. ' calc angle
  2336. discAngle = discAngle + stepAngle
  2337. If discAngle >= 360 Then
  2338. discAngle = discAngle - 360
  2339. End If
  2340.  
  2341. ' rotate discs
  2342.  
  2343. pPizza.RotY = discAngle
  2344.  
  2345. If stopDiscs Then
  2346. stepAngle = stepAngle - 0.1
  2347. If stepAngle <= 0 Then
  2348. DiscsTimer.Enabled = False
  2349. End If
  2350. End If
  2351. End Sub
  2352.  
  2353. ''''''''''''''''''''''''''''
  2354. ''' Sewer
  2355. ''''''''''''''''''''''''''''
  2356.  
  2357. Sub Kicker4_Hit():PlaySoundAt "fx_subway",Kicker4:End Sub
  2358.  
  2359.  
  2360. Dim TempBallImage
  2361. Sub sw41_Hit()
  2362. TempBallImage = ActiveBall.image
  2363. If TempBallImage = "pinball_ball2" Then
  2364. ActiveBall.image = "pinball_ball2_dim"
  2365. End If
  2366. If TempBallImage = "PinballBlizzardBlue" Then
  2367. ActiveBall.image = "PinballBlizzardBlue_dim"
  2368. End If
  2369. If TempBallImage = "PinballOutrageousOrange" Then
  2370. ActiveBall.image = "PinballOutrageousOrange_dim"
  2371. End If
  2372. If TempBallImage = "PinballPurplePizzazz" Then
  2373. ActiveBall.image = "PinballPurplePizzazz_dim"
  2374. End If
  2375. If TempBallImage = "PinballRadicalRed" Then
  2376. ActiveBall.image = "PinballRadicalRed_dim"
  2377. End If
  2378. Controller.Switch(41) = 1
  2379. End Sub
  2380.  
  2381. Sub sw41_unHit():ActiveBall.image = TempBallImage:End Sub
  2382.  
  2383. Sub SewerUpKick(Enabled)
  2384. PlaySoundAt SoundFX("solenoid",DOFContactors),sw41
  2385. sw41.Kick 0,45,1.56 'Power = 45
  2386. Controller.Switch(41) = 0
  2387. End Sub
  2388.  
  2389. Sub SewerOpen(enabled)
  2390. If Enabled Then
  2391. SewerDir = 1
  2392. SewerCover.Collidable = true
  2393. pSewerCap.RotX = 95
  2394. SewerOpenStep = 1
  2395. SewerOpenTimer.Enabled = True
  2396. Else
  2397. SewerOpenStep = 7
  2398. SewerDir = -1
  2399. End If
  2400. End Sub
  2401.  
  2402. Dim SewerOpenStep, SewerDir
  2403.  
  2404. Sub SewerOpenTimer_timer()
  2405. Select Case SewerOpenStep
  2406. Case 0:pSewerCap.RotX = 90:fSewerShadow.visible = 0
  2407. Case 1:pSewerCap.RotX = 95:fSewerShadow.visible = 1:fSewerShadow.imageA = "sewershadow1":If SewerDir = 1 then PlaySoundAt SoundFX("SOL_on",DOFContactors),sw41 End If
  2408. Case 2: pSewerCap.RotX = 100:fSewerShadow.imageA = "sewershadow1"
  2409. Case 3: pSewerCap.RotX = 105:fSewerShadow.imageA = "sewershadow2"
  2410. Case 4: pSewerCap.RotX = 110:fSewerShadow.imageA = "sewershadow3"
  2411. Case 5: pSewerCap.RotX = 115:fSewerShadow.imageA = "sewershadow4"
  2412. Case 6: pSewerCap.RotX = 120:fSewerShadow.imageA = "sewershadow5"
  2413. Case 7: pSewerCap.RotX = 125:fSewerShadow.imageA = "sewershadow6":If SewerDir = -1 then PlaySoundAt SoundFX("SOL_off",DOFContactors),sw41 End If
  2414. Case 8: pSewerCap.RotX = 130:fSewerShadow.imageA = "sewershadow7"
  2415. End Select
  2416. pSewerCapB.RotX = pSewerCap.RotX
  2417. If SewerOpenStep = 8 Then
  2418. SewerOpenStep = 8
  2419. Else
  2420. If SewerOpenStep = 0 Then
  2421. SewerOpenStep = 0
  2422. SewerCover.Collidable = False
  2423. SewerOpenTimer.Enabled = False
  2424. Else
  2425. SewerOpenStep = SewerOpenStep + SewerDir
  2426. End If
  2427. End If
  2428. End Sub
  2429.  
  2430. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  2431. ''''''''''''''''' Ball Through system''''''''''''''''''''''''''
  2432. '''''''''''''''''''''by cyberpez''''''''''''''''''''''''''''''''
  2433. ''''''''''''''''based off of EalaDubhSidhe's''''''''''''''''''''
  2434. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  2435.  
  2436. Dim BallCount
  2437. Dim cBall1, cBall2, cBall3, cBall4
  2438.  
  2439. dim bstatus
  2440.  
  2441. Sub CreatBalls()
  2442. Controller.Switch(11) = 1
  2443. Controller.Switch(12) = 1
  2444. Controller.Switch(13) = 1
  2445. Set cBall1 = Kicker1.CreateSizedballWithMass(BallRadius,Ballmass)
  2446. Set cBall2 = Kicker2.CreateSizedballWithMass(BallRadius,Ballmass)
  2447. Set cBall3 = Kicker3.CreateSizedballWithMass(BallRadius,Ballmass)
  2448. Set cBall4 = Kicker5.CreateSizedballWithMass(BallRadius,Ballmass)
  2449.  
  2450. If BallMod = 2 Then
  2451. cBall1.Image = "PinballLaserLemon"
  2452. cBall2.Image = "PinballOutrageousOrange"
  2453. cBall3.Image = "PinballRadicalRed"
  2454. cBall4.Image = "PinballRadicalRed"
  2455. End If
  2456. Kicker5.Kick 0,1
  2457. Kicker5.enabled = false
  2458. End Sub
  2459.  
  2460. Sub Kicker3_Hit():Controller.Switch(11) = 1:UpdateTrough:End Sub
  2461. Sub Kicker3_UnHit():Controller.Switch(11) = 0:UpdateTrough:End Sub
  2462. Sub Kicker2_Hit():Controller.Switch(12) = 1:UpdateTrough:End Sub
  2463. Sub Kicker2_UnHit():Controller.Switch(12) = 0:UpdateTrough:End Sub
  2464. Sub Kicker1_Hit():Controller.Switch(13) = 1:UpdateTrough:End Sub
  2465. Sub Kicker1_UnHit():Controller.Switch(13) = 0:UpdateTrough:End Sub
  2466.  
  2467. Sub UpdateTrough()
  2468. CheckBallStatus.Interval = 300
  2469. CheckBallStatus.Enabled = 1
  2470. End Sub
  2471.  
  2472. Sub CheckBallStatus_timer()
  2473. If Kicker1.BallCntOver = 0 Then Kicker2.kick 60, 9
  2474. If Kicker2.BallCntOver = 0 Then Kicker3.kick 60, 9
  2475. Me.Enabled = 0
  2476. End Sub
  2477.  
  2478. Dim Kicker1active, Kicker2active, Kicker3active, Kicker4active, Kicker5active, Kicker6active
  2479.  
  2480. Dim TurtleBall
  2481.  
  2482. Sub SetBallMod_hit()
  2483.  
  2484. If BallMod = 1 then
  2485.  
  2486. Select Case TurtleBall
  2487. Case 1: ActiveBall.Image = "PinballBlizzardBlue":TurtleBall=2
  2488. Case 2: ActiveBall.Image = "PinballPurplePizzazz":TurtleBall=3
  2489. Case 3: ActiveBall.Image = "PinballRadicalRed":TurtleBall=4
  2490. Case 4: ActiveBall.Image = "PinballOutrageousOrange":TurtleBall=1
  2491. End Select
  2492. End If
  2493. End Sub
  2494.  
  2495.  
  2496. '******************************************************
  2497. ' DRAIN & RELEASE
  2498. '******************************************************
  2499.  
  2500. Sub Drain_Hit()
  2501. PlaySound "drain"
  2502. UpdateTrough
  2503. Controller.Switch(10) = 1
  2504. fgBall = true
  2505. iBall = iBall + 1
  2506. BallsInPlay = BallsInPlay - 1
  2507. End Sub
  2508.  
  2509. Sub Drain_UnHit()
  2510. Controller.Switch(10) = 0
  2511. End Sub
  2512.  
  2513. sub kisort(enabled)
  2514. If enabled then
  2515. if fgBall then
  2516. Drain.Kick 70,20
  2517. iBall = iBall + 1
  2518. fgBall = false
  2519. end if
  2520. end if
  2521. end sub
  2522.  
  2523. Sub KickBallToLane(Enabled)
  2524. if enabled then
  2525. StopSound "intro"
  2526. PlaySound SoundFX("BallRelease",DOFContactors)
  2527. Kicker1.Kick 70,5
  2528. iBall = iBall - 1
  2529. fgBall = false
  2530. BallsInPlay = BallsInPlay + 1
  2531. UpdateTrough
  2532. end if
  2533. End Sub
  2534.  
  2535. '**********
  2536. ' Gi Lights
  2537. '**********
  2538.  
  2539. dim GION
  2540.  
  2541. Sub SolGi(Enabled)
  2542. Dim obj
  2543. If Enabled Then
  2544.  
  2545. SetLamp 200, 0
  2546. SetLamp 111, 0
  2547. If GION = 1 then playsound "flasher_relay_off", 0
  2548. GION = 0
  2549. Else
  2550.  
  2551. SetLamp 200, 1
  2552. SetLamp 111, 1
  2553. If GION = 0 then playsound "flasher_relay_on", 0
  2554. GION = 1
  2555. End If
  2556. End Sub
  2557.  
  2558.  
  2559. '================Light Handling==================
  2560. ' GI, Flashers, and Lamp handling
  2561. 'Based on JP's VP10 fading Lamp routine, based on PD's Fading Lights
  2562. ' Mod FrameTime and GI handling by nFozzy
  2563. '================================================
  2564. 'Short installation
  2565. 'Keep all non-GI lamps/Flashers in a big collection called aLampsAll
  2566. 'Initialize SolModCallbacks: Const UseVPMModSol = 1 at the top of the script, before LoadVPM. vpmInit me in table1_Init()
  2567. 'LUT images (optional)
  2568. 'Make modifications based on era of game (setlamp / flashc for games without solmodcallback, use bonus GI subs for games with only one GI control)
  2569.  
  2570. Dim LampState(340), FadingLevel(340), CollapseMe
  2571. Dim FlashSpeedUp(340), FlashSpeedDown(340), FlashMin(340), FlashMax(340), FlashLevel(340)
  2572. Dim SolModValue(340) 'holds 0-255 modulated solenoid values
  2573.  
  2574. 'These are used for fading lights and flashers brighter when the GI is darker
  2575. Dim LampsOpacity(340, 2) 'Columns: 0 = intensity / opacity, 1 = fadeup, 2 = FadeDown
  2576. Dim GIscale(4) '5 gi strings
  2577. Dim TextureArray1: TextureArray1 = Array("Plastic with an image trans", "Plastic with an image")
  2578. Dim TextureRedBulbArray: TextureRedBulbArray = Array("Bulb Red trans", "Bulb Red")
  2579. Dim TextureBlueBulbArray: TextureBlueBulbArray = Array("Bulb Blue trans", "Bulb Blue")
  2580. Dim TextureGreenBulbArray: TextureGreenBulbArray = Array("Bulb Green trans", "Bulb Green")
  2581. Dim TextureYellowBulbArray: TextureYellowBulbArray = Array("Bulb Yellow trans", "Bulb Yellow")
  2582. Dim BulbArray1: BulbArray1 = Array("Bulb_on_texture", "Bulb_texture")
  2583. Dim RedLight: RedLight = Array("Bulb_texture_on", "Bulb_texture_66", "Bulb_texture_33", "Bulb_texture_off")
  2584. Dim BlueLight: BlueLight = Array("Bulb_Blue_texture_on", "Bulb_Blue_texture_66", "Bulb_Blue_texture_33", "Bulb_Blue_texture_off")
  2585. Dim GreenLight: GreenLight = Array("Bulb_Green_texture_on", "Bulb_Green_texture_66", "Bulb_Green_texture_33", "Bulb_Green_texture_off")
  2586. Dim YellowLight: YellowLight = Array("Bulb_Yellow_texture_on", "Bulb_Yellow_texture_66", "Bulb_Yellow_texture_33", "Bulb_Yellow_texture_off")
  2587. Dim RedBumperCap: RedBumperCap = Array("RaB_Bumpercap_redon", "RaB_Bumpercap_red66", "RaB_Bumpercap_red33", "RaB_Bumpercap")
  2588. Dim YellowDome: YellowDome = Array("domeyellowbase", "domeyellowlit")
  2589. Dim RedDome: RedDome = Array("domeRedbase", "domeRedlit")
  2590. Dim YellowRoundDome: YellowRoundDome = Array("TopFlasherYellow_on", "TopFlasherYellow_66", "TopFlasherYellow_33", "TopFlasherYellow_off")
  2591. Dim GreenRoundDome: GreenRoundDome = Array("TopFlasherGreen_on", "TopFlasherGreen_66", "TopFlasherGreen_33", "TopFlasherGreen_off")
  2592. Dim YellowDome4: YellowDome4 = Array("domeyellow_on", "domeyellow_66", "domeyellow_33", "domeyellow_off")
  2593.  
  2594.  
  2595. Dim TestLight: TestLight = Array("Bulb_Yellow_texture_on", "Bulb_texture_66", "Bulb_Green_texture_33", "Bulb_Blue_texture_off")
  2596.  
  2597.  
  2598. InitLamps
  2599.  
  2600. reDim CollapseMe(1) 'Setlamps and SolModCallBacks (Click Me to Collapse)
  2601. Sub SetLamp(nr, value)
  2602. If value <> LampState(nr) Then
  2603. LampState(nr) = abs(value)
  2604. FadingLevel(nr) = abs(value) + 4
  2605. End If
  2606. End Sub
  2607.  
  2608. Sub SetLampm(nr, nr2, value) 'set 2 lamps
  2609. If value <> LampState(nr) Then
  2610. LampState(nr) = abs(value)
  2611. FadingLevel(nr) = abs(value) + 4
  2612. End If
  2613. If value <> LampState(nr2) Then
  2614. LampState(nr2) = abs(value)
  2615. FadingLevel(nr2) = abs(value) + 4
  2616. End If
  2617. End Sub
  2618.  
  2619. Sub SetModLamp(nr, value)
  2620. If value <> SolModValue(nr) Then
  2621. SolModValue(nr) = value
  2622. if value > 0 then LampState(nr) = 1 else LampState(nr) = 0
  2623. FadingLevel(nr) = LampState(nr) + 4
  2624. End If
  2625. End Sub
  2626.  
  2627. Sub SetModLampM(nr, nr2, value) 'set 2 modulated lamps
  2628. If value <> SolModValue(nr) Then
  2629. SolModValue(nr) = value
  2630. if value > 0 then LampState(nr) = 1 else LampState(nr) = 0
  2631. FadingLevel(nr) = LampState(nr) + 4
  2632. End If
  2633. If value <> SolModValue(nr2) Then
  2634. SolModValue(nr2) = value
  2635. if value > 0 then LampState(nr2) = 1 else LampState(nr2) = 0
  2636. FadingLevel(nr2) = LampState(nr2) + 4
  2637. End If
  2638. End Sub
  2639.  
  2640.  
  2641. '#end section
  2642. reDim CollapseMe(2) 'InitLamps (Click Me to Collapse)
  2643. Sub InitLamps() 'set fading speeds and other stuff here
  2644. GetOpacity aLampsAll 'All non-GI lamps and flashers go in this object array for compensation script!
  2645. Dim x
  2646. for x = 0 to uBound(LampState)
  2647. LampState(x) = 0 ' current light state, independent of the fading level. 0 is off and 1 is on
  2648. FadingLevel(x) = 4 ' used to track the fading state
  2649. FlashSpeedUp(x) = 0.1 'Fading speeds in opacity per MS I think (Not used with nFadeL or nFadeLM subs!)
  2650. FlashSpeedDown(x) = 0.1
  2651.  
  2652. FlashMin(x) = 0.001 ' the minimum value when off, usually 0
  2653. FlashMax(x) = 1 ' the minimum value when off, usually 1
  2654. FlashLevel(x) = 0.001 ' Raw Flasher opacity value. Start this >0 to avoid initial flasher stuttering.
  2655.  
  2656. SolModValue(x) = 0 ' Holds SolModCallback values
  2657.  
  2658. Next
  2659.  
  2660. for x = 0 to uBound(giscale)
  2661. Giscale(x) = 1.625 ' lamp GI compensation multiplier, eg opacity x 1.625 when gi is fully off
  2662. next
  2663.  
  2664. for x = 11 to 110 'insert fading levels (only applicable for lamps that use FlashC sub)
  2665. FlashSpeedUp(x) = 0.015
  2666. FlashSpeedDown(x) = 0.009
  2667. Next
  2668.  
  2669. for x = 111 to 186 'Flasher fading speeds 'intensityscale(%) per 10MS
  2670. FlashSpeedUp(x) = 1.1
  2671. FlashSpeedDown(x) = 0.9
  2672. next
  2673.  
  2674. for x = 200 to 203 'GI relay on / off fading speeds
  2675. FlashSpeedUp(x) = 0.01
  2676. FlashSpeedDown(x) = 0.008
  2677. FlashMin(x) = 0
  2678. Next
  2679. for x = 300 to 303 'GI 8 step modulation fading speeds
  2680. FlashSpeedUp(x) = 0.01
  2681. FlashSpeedDown(x) = 0.008
  2682. FlashMin(x) = 0
  2683. Next
  2684.  
  2685. UpdateGIon 0, 1:UpdateGIon 1, 1: UpdateGIon 2, 1 : UpdateGIon 3, 1:UpdateGIon 4, 1
  2686. UpdateGI 0, 7:UpdateGI 1, 7:UpdateGI 2, 7 : UpdateGI 3, 7:UpdateGI 4, 7
  2687. End Sub
  2688.  
  2689. Sub GetOpacity(a) 'Keep lamp/flasher data in an array
  2690. Dim x
  2691. for x = 0 to (a.Count - 1)
  2692. On Error Resume Next
  2693. if a(x).Opacity > 0 then a(x).Uservalue = a(x).Opacity
  2694. if a(x).Intensity > 0 then a(x).Uservalue = a(x).Intensity
  2695. If a(x).FadeSpeedUp > 0 then LampsOpacity(x, 1) = a(x).FadeSpeedUp : LampsOpacity(x, 2) = a(x).FadeSpeedDown
  2696. Next
  2697. for x = 0 to (a.Count - 1) : LampsOpacity(x, 0) = a(x).UserValue : Next
  2698. End Sub
  2699.  
  2700. sub DebugLampsOn(input):Dim x: for x = 10 to 100 : setlamp x, input : next : end sub
  2701.  
  2702. '#end section
  2703.  
  2704. reDim CollapseMe(3) 'LampTimer (Click Me to Collapse)
  2705. LampTimer.Interval = -1 '-1 is ideal, but it will technically work with any timer interval
  2706. Dim FrameTime, InitFadeTime : FrameTime = 10 'Count Frametime
  2707. Sub LampTimer_Timer()
  2708. FrameTime = gametime - InitFadeTime
  2709. Dim chgLamp, num, chg, ii
  2710. chgLamp = Controller.ChangedLamps
  2711. If Not IsEmpty(chgLamp) Then
  2712. For ii = 0 To UBound(chgLamp)
  2713. LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1) 'keep the real state in an array
  2714. FadingLevel(chgLamp(ii, 0) ) = chgLamp(ii, 1) + 4 'actual fading step
  2715. Next
  2716. End If
  2717.  
  2718. UpdateGIstuff
  2719. UpdateLamps
  2720. UpdateFlashers
  2721. ' CheckDropShadows
  2722.  
  2723. InitFadeTime = gametime
  2724. End Sub
  2725. '#end section
  2726. reDim CollapseMe(4) 'ASSIGNMENTS: Lamps, GI, and Flashers (Click Me to Collapse)
  2727. Sub UpdateGIstuff()
  2728.  
  2729. End Sub
  2730.  
  2731. Sub UpdateFlashers()
  2732.  
  2733.  
  2734.  
  2735. End Sub
  2736.  
  2737. Sub UpdateLamps()
  2738.  
  2739.  
  2740. FadeGI 200
  2741. UpdateGIobjectsSingle 200, theGicollection
  2742. GiCompensationSingle 200, aLampsAll, GIscale(0)
  2743. FadeLUTsingle 200, "LUTCont_", 28
  2744.  
  2745.  
  2746. NFadeL 1, L1
  2747. NFadeL 2, L2
  2748. NFadeL 3, L3
  2749. NFadeL 4, L4
  2750. NFadeL 5, L5
  2751. NFadeL 6, L6
  2752. NFadeL 7, L7
  2753. NFadeL 8, L8
  2754. NFadeL 9, L9
  2755. NFadeL 10, L10
  2756. NFadeL 11, L11
  2757. NFadeL 12, L12
  2758. NFadeL 13, L13
  2759. NFadeL 14, L14
  2760. NFadeL 15, L15
  2761. NFadeL 16, L16
  2762. NFadeL 17, L17
  2763. NFadeL 18, L18
  2764. NFadeL 19, L19
  2765. NFadeL 20, L20
  2766. NFadeL 21, L21
  2767. NFadeL 22, L22
  2768. NFadeL 23, L23
  2769. NFadeL 24, L24
  2770. NFadeL 25, L25
  2771. NFadeLm 26, L26a
  2772. NFadeLm 26, L26b
  2773. NFadeLm 26, L26c
  2774. NFadeL 26, L26d
  2775. NFadeL 27, L27
  2776. NFadeL 28, L28
  2777. NFadeLm 29, L29a
  2778. NFadeLm 29, L29b
  2779. NFadeLm 29, L29c
  2780. NFadeL 29, L29d
  2781. NFadeL 30, L30
  2782. FadePri4m 31, pBulb31, YellowLight
  2783. FadeDisableLighting 31, pBulb31
  2784. FadeMaterialP 31, pBulb31, TextureArray1
  2785.  
  2786. FadePri4m 32, pBulb32, RedLight
  2787. FadeDisableLighting 32, pBulb32
  2788. FadeMaterialP 32, pBulb32, TextureArray1
  2789.  
  2790. NFadeL 33, L33
  2791. NFadeLm 34, L34a
  2792. NFadeL 34, L34b
  2793. NFadeL 35, L35
  2794. NFadeL 36, L36
  2795. NFadeLm 37, L37a
  2796. NFadeLm 37, L37b
  2797. NFadeLm 37, L37c
  2798. NFadeL 37, L37d
  2799. NFadeL 38, L38
  2800.  
  2801. FadePri4m 39, pBulb39, RedLight
  2802. FadeDisableLighting 39, pBulb39
  2803. FadeMaterialP 39, pBulb39, TextureArray1
  2804.  
  2805. FadePri4m 40, pBulb40, GreenLight
  2806. FadeDisableLighting 40, pBulb40
  2807. FadeMaterialP 40, pBulb40, TextureArray1
  2808.  
  2809. NFadeL 41, L41
  2810. NFadeL 42, L42
  2811.  
  2812.  
  2813. FadeR 43, l43
  2814. FadeR 44, l44
  2815. FadeR 45, l45
  2816. FadeR 46, l46
  2817. FadeR 47, l47
  2818. FadeR 48, l48
  2819.  
  2820.  
  2821. NFadeL 49, L49
  2822. NFadeL 50, L50
  2823.  
  2824. NFadeL 52, L52
  2825.  
  2826. NFadeL 55, L55
  2827. NFadeL 56, L56
  2828. NFadeL 57, L57
  2829. NFadeL 58, L58
  2830. NFadeL 59, L59
  2831. NFadeL 60, L60
  2832. NFadeL 61, L61
  2833.  
  2834. NFadeLm 130, FlashLight6a
  2835. NFadeLm 130, FlashLight6b
  2836. NFadeLm 130, FlashLight6c
  2837. NFadeLm 130, FlashLight6d
  2838. FadeMaterialP 130, pFlasherDome6b, TextureArray1
  2839. FadePri2m 130, pFlasherDome6b, RedDome
  2840. nFadelm 130, RedBloom
  2841. nFadelm 130, RedBloom1
  2842. flashm 130, flasher1
  2843. flashm 130, flasher2
  2844. flashm 130, flasher3
  2845. flash 130, flasher4
  2846.  
  2847.  
  2848.  
  2849.  
  2850. NFadeLm 109, f9a
  2851. NFadeL 109, f9b
  2852.  
  2853. NFadeLm 112, f12a
  2854. NFadeL 112, f12b
  2855.  
  2856. NFadeLm 113, f13a
  2857. NFadeL 113, f13b
  2858.  
  2859.  
  2860.  
  2861. NFadeLm 114, f14c1
  2862. NFadeLm 114, f14c1
  2863. NFadeLm 114, f14c1
  2864. NFadeLm 114, f14ac
  2865. If SideFlasherColorType = 1 then
  2866. FadePri4m 114, pDome14a, YellowRoundDome
  2867. End If
  2868. If SideFlasherColorType = 2 then
  2869. FadePri4m 114, pDome14a, GreenRoundDome
  2870. End If
  2871. FadeMaterialP 114, pDome14a, TextureArray1
  2872. FadeDisableLighting 114, pDome14a
  2873. NFadeLm 114, f14aa
  2874. NFadeLm 114, f14ab
  2875. NFadeLm 114, f14ba
  2876. NFadeLm 114, f14bc
  2877. If SideFlasherColorType = 1 then
  2878. FadePri4m 114, pDome14b, YellowRoundDome
  2879. End If
  2880. If SideFlasherColorType = 2 then
  2881. FadePri4m 114, pDome14b, GreenRoundDome
  2882. End If
  2883. FadeMaterialP 114, pDome14b, TextureArray1
  2884. FadeDisableLighting 114, pDome14b
  2885. NFadeL 114, f14bb
  2886.  
  2887. NFadeLm 125, f25a
  2888. NFadeLm 125, f25a2
  2889. NFadeLm 125, f25b2
  2890. NFadeL 125, f25b
  2891.  
  2892. NFadeLm 126, f26a
  2893. NFadeLm 126, f26a2
  2894. NFadeLm 126, f26b2
  2895. NFadeL 126, f26b
  2896.  
  2897. NFadeLm 127, f27a
  2898. NFadeLm 127, f27a2
  2899. NFadeLm 127, f27b
  2900. NFadeLm 127, f27b2
  2901. NFadeL 127, f27c
  2902.  
  2903. NFadeLm 128, f28a
  2904. NFadeLm 128, f28a2
  2905. NFadeLm 128, f28b2
  2906. NFadeL 128, f28b
  2907.  
  2908.  
  2909. FadeDisableLighting 129, pFlasherDome5a
  2910. Flashm 129, Flasher5a
  2911. Flashm 129, Flasher5a1
  2912. NFadeLm 129, FlashLight5a
  2913. FadeMaterialP 129, pFlasherDome5a, TextureArray1
  2914. FadePri4m 129, pFlasherDome5a, YellowDome4
  2915.  
  2916. FadeDisableLighting 129, pFlasherDome5b
  2917. Flashm 129, Flasher5b
  2918.  
  2919. NFadeLm 129, FlashLight5b
  2920. FadeMaterialP 129, pFlasherDome5b, TextureArray1
  2921. FadePri4m 129, pFlasherDome5b, YellowDome4
  2922. Flashc 129, Flasher5b1
  2923.  
  2924.  
  2925. NFadeL 131, f131
  2926.  
  2927. NFadeLm 132, f132a
  2928. NFadeLm 132, f132b
  2929. NFadeLm 132, f132c
  2930. NFadeL 132, f132d
  2931.  
  2932. End Sub
  2933.  
  2934. '#end section
  2935.  
  2936.  
  2937. ''''Additions by CP
  2938.  
  2939.  
  2940. Sub FadeDisableLighting(nr, a)
  2941. Select Case FadingLevel(nr)
  2942. Case 2:a.BlendDisableLighting = .33
  2943. Case 3:a.BlendDisableLighting = .66
  2944. Case 4:a.BlendDisableLighting = 0
  2945. Case 5:a.BlendDisableLighting = 1
  2946. End Select
  2947. End Sub
  2948.  
  2949. Sub FadeDisableLighting1(nr, a)
  2950. Select Case FadingLevel(nr)
  2951. Case 2:a.BlendDisableLighting = .033
  2952. Case 3:a.BlendDisableLighting = .066
  2953. Case 4:a.BlendDisableLighting = 0
  2954. Case 5:a.BlendDisableLighting = .1
  2955. End Select
  2956. End Sub
  2957.  
  2958. 'trxture swap
  2959. dim itemw, itemp, itemp2
  2960.  
  2961. Sub FadeMaterialW(nr, itemw, group)
  2962. Select Case FadingLevel(nr)
  2963. Case 4:itemw.TopMaterial = group(1):itemw.SideMaterial = group(1)
  2964. Case 5:itemw.TopMaterial = group(0):itemw.SideMaterial = group(0)
  2965. End Select
  2966. End Sub
  2967.  
  2968.  
  2969. Sub FadeMaterialP(nr, itemp, group)
  2970. Select Case FadingLevel(nr)
  2971. Case 4:itemp.Material = group(1)
  2972. Case 5:itemp.Material = group(0)
  2973. End Select
  2974. End Sub
  2975.  
  2976.  
  2977. Sub FadeMaterial2P(nr, itemp2, group)
  2978. Select Case FadingLevel(nr)
  2979. Case 4:itemp2.Material = group(1)
  2980. Case 5:itemp2.Material = group(0)
  2981. End Select
  2982. End Sub
  2983.  
  2984.  
  2985. 'Reels
  2986.  
  2987. Sub FadeR(nr, a)
  2988. Select Case FadingLevel(nr)
  2989. Case 2:a.SetValue 3:FadingLevel(nr) = 0
  2990. Case 3:a.SetValue 2:FadingLevel(nr) = 2
  2991. Case 4:a.SetValue 1:FadingLevel(nr) = 3
  2992. Case 5:a.SetValue 1:FadingLevel(nr) = 1
  2993. End Select
  2994. End Sub
  2995.  
  2996. Sub FadeRm(nr, a)
  2997. Select Case FadingLevel(nr)
  2998. Case 2:a.SetValue 3
  2999. Case 3:a.SetValue 2
  3000. Case 4:a.SetValue 1
  3001. Case 5:a.SetValue 1
  3002. End Select
  3003. End Sub
  3004.  
  3005. Sub FadePri4m(nr, pri, group)
  3006. Select Case FadingLevel(nr)
  3007. Case 2:pri.image = group(1) 'Off
  3008. Case 3:pri.image = group(3) 'Fading...
  3009. Case 4:pri.image = group(2) 'Fading...
  3010. Case 5:pri.image = group(0) 'ON
  3011. End Select
  3012. End Sub
  3013.  
  3014. Sub FadePri4(nr, pri, group)
  3015. Select Case FadingLevel(nr)
  3016. Case 2:pri.image = group(1):FadingLevel(nr) = 0 'Off
  3017. Case 3:pri.image = group(3):FadingLevel(nr) = 2 'Fading...
  3018. Case 4:pri.image = group(2):FadingLevel(nr) = 3 'Fading...
  3019. Case 5:pri.image = group(0):FadingLevel(nr) = 1 'ON
  3020. End Select
  3021. End Sub
  3022.  
  3023. Sub FadePri2m(nr, pri, group)
  3024. Select Case FadingLevel(nr)
  3025. Case 2:pri.image = group(1) 'Off
  3026. ' Case 3:pri.image = group(3) 'Fading...
  3027. ' Case 4:pri.image = group(2) 'Fading...
  3028. Case 5:pri.image = group(0) 'ON
  3029. End Select
  3030. End Sub
  3031.  
  3032. Sub FadePri2(nr, pri, group)
  3033. Select Case FadingLevel(nr)
  3034. Case 2:pri.image = group(1):FadingLevel(nr) = 0 'Off
  3035. ' Case 3:pri.image = group(3):FadingLevel(nr) = 2 'Fading...
  3036. ' Case 4:pri.image = group(2):FadingLevel(nr) = 3 'Fading...
  3037. Case 5:pri.image = group(0):FadingLevel(nr) = 1 'ON
  3038. End Select
  3039. End Sub
  3040.  
  3041.  
  3042.  
  3043. ''''End Of Additions by CP
  3044.  
  3045.  
  3046.  
  3047. reDim CollapseMe(5) 'Combined GI subs / functions (Click Me to Collapse)
  3048. Set GICallback = GetRef("UpdateGIon") 'On/Off GI to NRs 200-203
  3049. Sub UpdateGIOn(no, Enabled) : Setlamp no+200, cInt(enabled) : End Sub
  3050.  
  3051. Set GICallback2 = GetRef("UpdateGI")
  3052. Sub UpdateGI(no, step) '8 step Modulated GI to NRs 300-303
  3053. Dim ii, x', i
  3054. If step = 0 then exit sub 'only values from 1 to 8 are visible and reliable. 0 is not reliable and 7 & 8 are the same so...
  3055. SetModLamp no+300, ScaleGI(step, 0)
  3056. LampState((no+300)) = 0
  3057. ' if no = 2 then tb.text = no & vbnewline & step & vbnewline & ScaleGI(step,0) & SolModValue(102)
  3058. End Sub
  3059.  
  3060. Function ScaleGI(value, scaletype) 'returns an intensityscale-friendly 0->100% value out of 1>8 'it does go to 8
  3061. Dim i
  3062. Select Case scaletype 'select case because bad at maths
  3063. case 0 : i = value * (1/8) '0 to 1
  3064. case 25 : i = (1/28)*(3*value + 4)
  3065. case 50 : i = (value+5)/12
  3066. case else : i = value * (1/8) '0 to 1
  3067. ' x = (4*value)/3 - 85 '63.75 to 255
  3068. End Select
  3069. ScaleGI = i
  3070. End Function
  3071.  
  3072. ' Dim LSstate : LSstate = False 'fading sub handles SFX 'Uncomment to enable
  3073. Sub FadeGI(nr) 'in On/off 'Updates nothing but flashlevel
  3074. Select Case FadingLevel(nr)
  3075. Case 3 : FadingLevel(nr) = 0
  3076. Case 4 'off
  3077. ' If Not LSstate then Playsound "FX_Relay_Off",0,LVL(0.1) : LSstate = True 'handle SFX
  3078. FlashLevel(nr) = FlashLevel(nr) - (FlashSpeedDown(nr) * FrameTime)
  3079. If FlashLevel(nr) < FlashMin(nr) Then
  3080. FlashLevel(nr) = FlashMin(nr)
  3081. FadingLevel(nr) = 3 'completely off
  3082. ' LSstate = False
  3083. End if
  3084. Case 5 ' on
  3085. ' If Not LSstate then Playsound "FX_Relay_On",0,LVL(0.1) : LSstate = True 'handle SFX
  3086. FlashLevel(nr) = FlashLevel(nr) + (FlashSpeedUp(nr) * FrameTime)
  3087. If FlashLevel(nr) > FlashMax(nr) Then
  3088. FlashLevel(nr) = FlashMax(nr)
  3089. FadingLevel(nr) = 6 'completely on
  3090. ' LSstate = False
  3091. End if
  3092. Case 6 : FadingLevel(nr) = 1
  3093. End Select
  3094. End Sub
  3095. Sub ModGI(nr2) 'in 0->1 'Updates nothing but flashlevel 'never off
  3096. Dim DesiredFading
  3097. Select Case FadingLevel(nr2)
  3098. case 3 : FadingLevel(nr2) = 0 'workaround - wait a frame to let M sub finish fading
  3099. ' Case 4 : FadingLevel(nr2) = 3 'off -disabled off, only gicallback1 can turn off GI(?) 'experimental
  3100. Case 5, 4 ' Fade (Dynamic)
  3101. DesiredFading = SolModValue(nr2)
  3102. if FlashLevel(nr2) < DesiredFading Then '+
  3103. FlashLevel(nr2) = FlashLevel(nr2) + (FlashSpeedUp(nr2) * FrameTime )
  3104. If FlashLevel(nr2) >= DesiredFading Then FlashLevel(nr2) = DesiredFading : FadingLevel(nr2) = 1
  3105. elseif FlashLevel(nr2) > DesiredFading Then '-
  3106. FlashLevel(nr2) = FlashLevel(nr2) - (FlashSpeedDown(nr2) * FrameTime )
  3107. If FlashLevel(nr2) <= DesiredFading Then FlashLevel(nr2) = DesiredFading : FadingLevel(nr2) = 6
  3108. End If
  3109. Case 6
  3110. FadingLevel(nr2) = 1
  3111. End Select
  3112. End Sub
  3113.  
  3114. Sub UpdateGIobjects(nr, nr2, a) 'Just Update GI
  3115. If FadingLevel(nr) > 1 or FadingLevel(nr2) > 1 Then
  3116. Dim x, Output : Output = FlashLevel(nr2) * FlashLevel(nr)
  3117. for each x in a : x.IntensityScale = Output : next
  3118. End If
  3119. end Sub
  3120.  
  3121. Sub GiCompensation(nr, nr2, a, GIscaleOff) 'One NR pairing only fading
  3122. ' tbgi.text = "GI: " & SolModValue(nr) & " " & FlashLevel(nr) & " " & FadingLevel(nr) & vbnewline & _
  3123. ' "ModGI: " & SolModValue(nr2) & " " & FlashLevel(nr2) & " " & FadingLevel(nr2) & vbnewline & _
  3124. ' "Solmodvalue, Flashlevel, Fading step"
  3125. if FadingLevel(nr) > 1 or FadingLevel(nr2) > 1 Then
  3126. Dim x, Giscaler, Output : Output = FlashLevel(nr2) * FlashLevel(nr)
  3127. Giscaler = ((Giscaleoff-1) * (ABS(Output-1) ) ) + 1 'fade GIscale the opposite direction
  3128.  
  3129. for x = 0 to (a.Count - 1) 'Handle Compensate Flashers
  3130. On Error Resume Next
  3131. a(x).Opacity = LampsOpacity(x, 0) * Giscaler
  3132. a(x).Intensity = LampsOpacity(x, 0) * Giscaler
  3133. a(x).FadeSpeedUp = LampsOpacity(x, 1) * Giscaler
  3134. a(x).FadeSpeedDown = LampsOpacity(x, 2) * Giscaler
  3135. Next
  3136. ' tbbb.text = giscaler & " on:" & FadingLevel(nr) & vbnewline & "flash: " & output & " onmod:" & FadingLevel(nr2) & vbnewline & l37.intensity
  3137. ' tbbb1.text = FadingLevel(nr) & vbnewline & FadingLevel(nr2)
  3138. ' tbgi1.text = Output & " giscale:" & giscaler 'debug
  3139. End If
  3140. ' tbbb1.text = FLashLevel(nr) & vbnewline & FlashLevel(nr2)
  3141. End Sub
  3142.  
  3143. Sub GiCompensationAvg(nr, nr2, nr3, nr4, a, GIscaleOff) 'Two pairs of NRs averaged together
  3144. ' tbgi.text = "GI: " & SolModValue(nr) & " " & FlashLevel(nr) & " " & FadingLevel(nr) & vbnewline & _
  3145. ' "ModGI: " & SolModValue(nr2) & " " & FlashLevel(nr2) & " " & FadingLevel(nr2) & vbnewline & _
  3146. ' "Solmodvalue, Flashlevel, Fading step"
  3147. if FadingLevel(nr) > 1 or FadingLevel(nr2) > 1 or FadingLevel(nr3) > 1 or FadingLevel(nr4) > 1 Then
  3148. Dim x, Giscaler, Output : Output = (((FlashLevel(nr)*FlashLevel(nr2)) + (FlashLevel(nr3)*Flashlevel(nr4))) /2)
  3149. Giscaler = ((Giscaleoff-1) * (ABS(Output-1) ) ) + 1 'fade GIscale the opposite direction
  3150.  
  3151. for x = 0 to (a.Count - 1) 'Handle Compensate Flashers
  3152. On Error Resume Next
  3153. a(x).Opacity = LampsOpacity(x, 0) * Giscaler
  3154. a(x).Intensity = LampsOpacity(x, 0) * Giscaler
  3155. a(x).FadeSpeedUp = LampsOpacity(x, 1) * Giscaler
  3156. a(x).FadeSpeedDown = LampsOpacity(x, 2) * Giscaler
  3157. Next
  3158.  
  3159.  
  3160. REM tbgi1.text = "Output:" & output & vbnewline & _
  3161. REM "GIscaler" & giscaler & vbnewline & _
  3162. REM "..."
  3163. End If
  3164. REM tbgi.text = "GI0 " & flashlevel(200) & " " & flashlevel(300) & vbnewline & _
  3165. REM "GI1 " & flashlevel(201) & " " & flashlevel(301) & vbnewline & _
  3166. REM "GI2 " & flashlevel(202) & " " & flashlevel(302) & vbnewline & _
  3167. REM "GI3 " & flashlevel(203) & " " & flashlevel(303) & vbnewline & _
  3168. REM "GI4 " & flashlevel(204) & " " & flashlevel(304) & vbnewline & _
  3169. REM "..."
  3170. End Sub
  3171.  
  3172. Sub GiCompensationAvgM(nr, nr2, nr3, nr4, nr5, nr6, a, GIscaleOff) 'Three pairs of NRs averaged together
  3173. ' tbgi.text = "GI: " & SolModValue(nr) & " " & FlashLevel(nr) & " " & FadingLevel(nr) & vbnewline & _
  3174. ' "ModGI: " & SolModValue(nr2) & " " & FlashLevel(nr2) & " " & FadingLevel(nr2) & vbnewline & _
  3175. ' "Solmodvalue, Flashlevel, Fading step"
  3176. if FadingLevel(nr) > 1 or FadingLevel(nr2) > 1 Then
  3177. Dim x, Giscaler, Output
  3178. Output = (((FlashLevel(nr)*FlashLevel(nr2)) + (FlashLevel(nr3)*Flashlevel(nr4)) + (FlashLevel(nr5)*FlashLevel(nr6)))/3)
  3179.  
  3180. Giscaler = ((Giscaleoff-1) * (ABS(Output-1) ) ) + 1 'fade GIscale the opposite direction
  3181.  
  3182. for x = 0 to (a.Count - 1) 'Handle Compensate Flashers
  3183. On Error Resume Next
  3184. a(x).Opacity = LampsOpacity(x, 0) * Giscaler
  3185. a(x).Intensity = LampsOpacity(x, 0) * Giscaler
  3186. a(x).FadeSpeedUp = LampsOpacity(x, 1) * Giscaler
  3187. a(x).FadeSpeedDown = LampsOpacity(x, 2) * Giscaler
  3188. Next
  3189. ' tbbb.text = giscaler & " on:" & FadingLevel(nr) & vbnewline & "flash: " & output & " onmod:" & FadingLevel(nr2) & vbnewline & l37.intensity
  3190. ' tbbb1.text = FadingLevel(nr) & vbnewline & FadingLevel(nr2)
  3191. ' tbgi1.text = Output & " giscale:" & giscaler 'debug
  3192. End If
  3193. ' tbbb1.text = FLashLevel(nr) & vbnewline & FlashLevel(nr2)
  3194. End Sub
  3195.  
  3196. Sub FadeLUT(nr, nr2, LutName, LutCount) 'fade lookuptable NOTE- this is a bad idea for darkening your table as
  3197. If FadingLevel(nr) >2 or FadingLevel(nr2) > 2 Then '-it will strip the whites out of your image
  3198. Dim GoLut
  3199. GoLut = cInt(LutCount * (FlashLevel(nr)*FlashLevel(nr2) ) )
  3200. RaB.ColorGradeImage = LutName & GoLut
  3201. ' tbgi2.text = Table1.ColorGradeImage & vbnewline & golut 'debug
  3202. End If
  3203. End Sub
  3204.  
  3205. Sub FadeLUTavg(nr, nr2, nr3, nr4, LutName, LutCount) 'FadeLut for two GI strings (WPC)
  3206. If FadingLevel(nr) >2 or FadingLevel(nr2) > 2 or FadingLevel(nr3) >2 or FadingLevel(nr4) > 2 Then
  3207. Dim GoLut
  3208. GoLut = cInt(LutCount * (((FlashLevel(nr)*FlashLevel(nr2)) + (FlashLevel(nr3)*Flashlevel(nr4))) /2) )
  3209. RaB.ColorGradeImage = LutName & GoLut
  3210. REM tbgi2.text = Table1.ColorGradeImage & vbnewline & golut 'debug
  3211. End If
  3212. End Sub
  3213.  
  3214. Sub FadeLUTavgM(nr, nr2, nr3, nr4, nr5, nr6, LutName, LutCount) 'FadeLut for three GI strings (WPC)
  3215. If FadingLevel(nr) >2 or FadingLevel(nr2) > 2 or FadingLevel(nr3) >2 or FadingLevel(nr4) > 2 or _
  3216. FadingLevel(nr5) >2 or FadingLevel(nr6) > 2 Then
  3217. Dim GoLut
  3218. GoLut = cInt(LutCount * (((FlashLevel(nr)*FlashLevel(nr2)) + (FlashLevel(nr3)*Flashlevel(nr4)) + (FlashLevel(nr5)*FlashLevel(nr6)))/3) ) 'what a mess
  3219. RaB.ColorGradeImage = LutName & GoLut
  3220. ' tbgi2.text = Table1.ColorGradeImage & vbnewline & golut 'debug
  3221. End If
  3222. End Sub
  3223.  
  3224. '#end section
  3225.  
  3226. reDim CollapseMe(6) 'Fading subs (Click Me to Collapse)
  3227. Sub nModFlash(nr, object, scaletype, offscale) 'Fading with modulated callbacks
  3228. Dim DesiredFading
  3229. Select Case FadingLevel(nr)
  3230. case 3 : FadingLevel(nr) = 0 'workaround - wait a frame to let M sub finish fading
  3231. Case 4 'off
  3232. If Offscale = 0 then Offscale = 1
  3233. FlashLevel(nr) = FlashLevel(nr) - (FlashSpeedDown(nr) * FrameTime ) * offscale
  3234. If FlashLevel(nr) < 0 then FlashLevel(nr) = 0 : FadingLevel(nr) = 3
  3235. Object.IntensityScale = ScaleLights(FlashLevel(nr),0 )
  3236. Case 5 ' Fade (Dynamic)
  3237. DesiredFading = ScaleByte(SolModValue(nr), scaletype)
  3238. if FlashLevel(nr) < DesiredFading Then '+
  3239. FlashLevel(nr) = FlashLevel(nr) + (FlashSpeedUp(nr) * FrameTime )
  3240. If FlashLevel(nr) >= DesiredFading Then FlashLevel(nr) = DesiredFading : FadingLevel(nr) = 1
  3241. elseif FlashLevel(nr) > DesiredFading Then '-
  3242. FlashLevel(nr) = FlashLevel(nr) - (FlashSpeedDown(nr) * FrameTime )
  3243. If FlashLevel(nr) <= DesiredFading Then FlashLevel(nr) = DesiredFading : FadingLevel(nr) = 6
  3244. End If
  3245. Object.Intensityscale = ScaleLights(FlashLevel(nr),0 )
  3246. Case 6 : FadingLevel(nr) = 1
  3247. End Select
  3248. End Sub
  3249.  
  3250. Sub nModFlashM(nr, Object)
  3251. Select Case FadingLevel(nr)
  3252. Case 3, 4, 5, 6 : Object.Intensityscale = ScaleLights(FlashLevel(nr),0 )
  3253. End Select
  3254. End Sub
  3255.  
  3256. Sub Flashc(nr, object) 'FrameTime Compensated. Can work with Light Objects (make sure state is 1 though)
  3257. Select Case FadingLevel(nr)
  3258. Case 3 : FadingLevel(nr) = 0
  3259. Case 4 'off
  3260. FlashLevel(nr) = FlashLevel(nr) - (FlashSpeedDown(nr) * FrameTime)
  3261. If FlashLevel(nr) < FlashMin(nr) Then
  3262. FlashLevel(nr) = FlashMin(nr)
  3263. FadingLevel(nr) = 3 'completely off
  3264. End if
  3265. Object.IntensityScale = FlashLevel(nr)
  3266. Case 5 ' on
  3267. FlashLevel(nr) = FlashLevel(nr) + (FlashSpeedUp(nr) * FrameTime)
  3268. If FlashLevel(nr) > FlashMax(nr) Then
  3269. FlashLevel(nr) = FlashMax(nr)
  3270. FadingLevel(nr) = 6 'completely on
  3271. End if
  3272. Object.IntensityScale = FlashLevel(nr)
  3273. Case 6 : FadingLevel(nr) = 1
  3274. End Select
  3275. End Sub
  3276.  
  3277.  
  3278. Sub Flash(nr, object)
  3279. Select Case FadingLevel(nr)
  3280. Case 3
  3281. FadingLevel(nr) = 0
  3282. Case 4 'off
  3283. FlashLevel(nr) = FlashLevel(nr) - (1/FlashSpeedDown(nr) * FrameTime)
  3284. If FlashLevel(nr) < FlashMin(nr) Then
  3285. FlashLevel(nr) = FlashMin(nr)
  3286. FadingLevel(nr) = 3 'completely off
  3287. End if
  3288. Object.IntensityScale = FlashLevel(nr)
  3289. Case 5 ' on
  3290. FlashLevel(nr) = FlashLevel(nr) + (1/FlashSpeedUp(nr) * FrameTime)
  3291. If FlashLevel(nr) > FlashMax(nr) Then
  3292. FlashLevel(nr) = FlashMax(nr)
  3293. FadingLevel(nr) = 6 'completely on
  3294. End if
  3295. Object.IntensityScale = FlashLevel(nr)
  3296. Case 6
  3297. FadingLevel(nr) = 1
  3298. End Select
  3299. End Sub
  3300.  
  3301.  
  3302. Sub Flashm(nr, object) 'multiple flashers, it just sets the flashlevel
  3303. select case FadingLevel(nr)
  3304. case 3, 4, 5, 6 : Object.IntensityScale = FlashLevel(nr)
  3305. end select
  3306. End Sub
  3307.  
  3308. Sub NFadeL(nr, object) 'Simple VPX light fading using State
  3309. Select Case FadingLevel(nr)
  3310. Case 3:object.state = 0:FadingLevel(nr) = 0
  3311. Case 4:object.state = 0:FadingLevel(nr) = 3
  3312. Case 5:object.state = 1:FadingLevel(nr) = 6
  3313. Case 6:object.state = 1:FadingLevel(nr) = 1
  3314. End Select
  3315. End Sub
  3316.  
  3317. Sub NFadeLm(nr, object) ' used for multiple lights
  3318. Select Case FadingLevel(nr)
  3319. Case 3:object.state = 0
  3320. Case 4:object.state = 0
  3321. Case 5:object.state = 1
  3322. Case 6:object.state = 1
  3323. End Select
  3324. End Sub
  3325.  
  3326. '#End Section
  3327.  
  3328. reDim CollapseMe(7) 'Fading Functions (Click Me to Collapse)
  3329. Function ScaleLights(value, scaletype) 'returns an intensityscale-friendly 0->100% value out of 255
  3330. Dim i
  3331. Select Case scaletype 'select case because bad at maths 'TODO: Simplify these functions. B/c this is absurdly bad.
  3332. case 0 : i = value * (1 / 255) '0 to 1
  3333. case 6 : i = (value + 17)/272 '0.0625 to 1
  3334. case 9 : i = (value + 25)/280 '0.089 to 1
  3335. case 15 : i = (value / 300) + 0.15
  3336. case 20 : i = (4 * value)/1275 + (1/5)
  3337. case 25 : i = (value + 85) / 340
  3338. case 37 : i = (value+153) / 408 '0.375 to 1
  3339. case 40 : i = (value + 170) / 425
  3340. case 50 : i = (value + 255) / 510 '0.5 to 1
  3341. case 75 : i = (value + 765) / 1020 '0.75 to 1
  3342. case Else : i = 10
  3343. End Select
  3344. ScaleLights = i
  3345. End Function
  3346.  
  3347. Function ScaleByte(value, scaletype) 'returns a number between 1 and 255
  3348. Dim i
  3349. Select Case scaletype
  3350. case 0 : i = value * 1 '0 to 1
  3351. case 9 : i = (5*(200*value + 1887))/1037 'ugh
  3352. case 15 : i = (16*value)/17 + 15
  3353. Case 63 : i = (3*(value + 85))/4
  3354. case else : i = value * 1 '0 to 1
  3355. End Select
  3356. ScaleByte = i
  3357. End Function
  3358.  
  3359. '#end section
  3360.  
  3361. reDim CollapseMe(8) 'Bonus GI Subs for games with only simple On/Off GI (Click Me to Collapse)
  3362. Sub UpdateGIobjectsSingle(nr, a) 'An UpdateGI script for simple (Sys11 / Data East or whatever)
  3363. If FadingLevel(nr) > 1 Then
  3364. Dim x, Output : Output = FlashLevel(nr)
  3365. for each x in a : x.IntensityScale = Output : next
  3366. End If
  3367. end Sub
  3368.  
  3369. Sub GiCompensationSingle(nr, a, GIscaleOff) 'One NR pairing only fading
  3370. if FadingLevel(nr) > 1 Then
  3371. Dim x, Giscaler, Output : Output = FlashLevel(nr)
  3372. Giscaler = ((Giscaleoff-1) * (ABS(Output-1) ) ) + 1 'fade GIscale the opposite direction
  3373.  
  3374. for x = 0 to (a.Count - 1) 'Handle Compensate Flashers
  3375. On Error Resume Next
  3376. a(x).Opacity = LampsOpacity(x, 0) * Giscaler
  3377. a(x).Intensity = LampsOpacity(x, 0) * Giscaler
  3378. a(x).FadeSpeedUp = LampsOpacity(x, 1) * Giscaler
  3379. a(x).FadeSpeedDown = LampsOpacity(x, 2) * Giscaler
  3380. Next
  3381. End If
  3382. ' tbbb1.text = FLashLevel(nr) & vbnewline & FlashLevel(nr2)
  3383. End Sub
  3384.  
  3385. Sub FadeLUTsingle(nr, LutName, LutCount) 'fade lookuptable NOTE- this is a bad idea for darkening your table as
  3386. If FadingLevel(nr) >2 Then '-it will strip the whites out of your image
  3387. Dim GoLut
  3388. GoLut = cInt(LutCount * FlashLevel(nr) )
  3389. tmnt.ColorGradeImage = LutName & GoLut
  3390. ' tbgi2.text = Table1.ColorGradeImage & vbnewline & golut 'debug
  3391. End If
  3392. End Sub
  3393.  
  3394. '#end section
  3395.  
  3396. Sub theend() : End Sub
  3397.  
  3398.  
  3399. REM Troubleshooting :
  3400. REM Flashers/gi are intermittent or aren't showing up
  3401. REM Ensure flashers start visible, light objects start with state = 1
  3402.  
  3403. REM No lamps or no GI
  3404. REM Make sure these constants are set up this way
  3405. REM Const UseSolenoids = 1
  3406. REM Const UseLamps = 0
  3407. REM Const UseGI = 1
  3408.  
  3409. REM SolModCallback error
  3410. REM Ensure you have the latest scripts. Clear out any loose scripts in your tables that might be causing conflicts.
  3411.  
  3412. REM Table1 Error
  3413. REM Rename the table to Table1 or find/Replace table1 with whatever the table's name is
  3414.  
  3415. REM SolModCallbacks aren't sending anything
  3416. REM Two important things to get SolModCallbacks to initialize properly:
  3417. REM Put this at the top of the script, before LoadVPM
  3418. REM Const UseVPMModSol = 1
  3419. REM Put this in the table1_Init() section
  3420. REM vpmInit me
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426. '*****************************************
  3427. ' rothbauerw's Manual Ball Control
  3428. '*****************************************
  3429.  
  3430. Dim BCup, BCdown, BCleft, BCright
  3431. Dim ControlBallInPlay, ControlActiveBall
  3432. Dim BCvel, BCyveloffset, BCboostmulti, BCboost
  3433.  
  3434. BCboost = 1 'Do Not Change - default setting
  3435. BCvel = 4 'Controls the speed of the ball movement
  3436. BCyveloffset = -0.01 'Offsets the force of gravity to keep the ball from drifting vertically on the table, should be negative
  3437. BCboostmulti = 3 'Boost multiplier to ball veloctiy (toggled with the B key)
  3438.  
  3439. ControlBallInPlay = false
  3440.  
  3441. Sub StartBallControl_Hit()
  3442. Set ControlActiveBall = ActiveBall
  3443. ControlBallInPlay = true
  3444. End Sub
  3445.  
  3446. Sub StopBallControl_Hit()
  3447. ControlBallInPlay = false
  3448. End Sub
  3449.  
  3450. Sub BallControlTimer_Timer()
  3451. If EnableBallControl and ControlBallInPlay then
  3452. If BCright = 1 Then
  3453. ControlActiveBall.velx = BCvel*BCboost
  3454. ElseIf BCleft = 1 Then
  3455. ControlActiveBall.velx = -BCvel*BCboost
  3456. Else
  3457. ControlActiveBall.velx = 0
  3458. End If
  3459.  
  3460. If BCup = 1 Then
  3461. ControlActiveBall.vely = -BCvel*BCboost
  3462. ElseIf BCdown = 1 Then
  3463. ControlActiveBall.vely = BCvel*BCboost
  3464. Else
  3465. ControlActiveBall.vely = bcyveloffset
  3466. End If
  3467. End If
  3468. End Sub
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475. '*****************************************
  3476. ' BALL SHADOW
  3477. '*****************************************
  3478. Dim BallShadow
  3479. BallShadow = Array (BallShadow1,BallShadow2,BallShadow3,BallShadow4,BallShadow5,BallShadow6,BallShadow7)
  3480.  
  3481. Sub BallShadowUpdate_timer()
  3482. Dim BOT, b
  3483. BOT = GetBalls
  3484. ' hide shadow of deleted balls
  3485. If UBound(BOT)<(tnob-1) Then
  3486. For b = (UBound(BOT) + 1) to (tnob-1)
  3487. BallShadow(b).visible = 0
  3488. Next
  3489. End If
  3490. ' exit the Sub if no balls on the table
  3491. If UBound(BOT) = -1 Then Exit Sub
  3492. ' render the shadow for each ball
  3493. For b = 0 to UBound(BOT)
  3494. If BOT(b).X < tmnt.Width/2 Then
  3495. BallShadow(b).X = ((BOT(b).X) - (Ballsize/6) + ((BOT(b).X - (tmnt.Width/2))/7)) '+ 13
  3496. Else
  3497. BallShadow(b).X = ((BOT(b).X) + (Ballsize/6) + ((BOT(b).X - (tmnt.Width/2))/7)) '- 13
  3498. End If
  3499. ballShadow(b).Y = BOT(b).Y + 10
  3500. If BOT(b).Z > 20 Then
  3501. BallShadow(b).visible = 1
  3502. Else
  3503. BallShadow(b).visible = 0
  3504. End If
  3505. Next
  3506. End Sub
  3507.  
  3508.  
  3509.  
  3510. ' *********************************************************************
  3511. ' Supporting Ball & Sound Functions
  3512. ' *********************************************************************
  3513.  
  3514. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  3515. Vol = Csng(BallVel(ball) ^2 / 200)*1.2
  3516. End Function
  3517.  
  3518. Function VolZ(ball) ' Calculates the Volume of the sound based on the ball speed in the Z
  3519. VolZ = Csng(BallVelZ(ball) ^2 / 200)*1.2
  3520. End Function
  3521.  
  3522. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
  3523. Dim tmp
  3524. tmp = ball.x * 2 / tmnt.width-1
  3525. If tmp > 0 Then
  3526. Pan = Csng(tmp ^10)
  3527. Else
  3528. Pan = Csng(-((- tmp) ^10) )
  3529. End If
  3530. End Function
  3531.  
  3532. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  3533. Pitch = BallVel(ball) * 20
  3534. End Function
  3535.  
  3536. Function BallVel(ball) 'Calculates the ball speed
  3537. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  3538. End Function
  3539.  
  3540. function AudioFade(ball)
  3541. Dim tmp
  3542. tmp = ball.y * 2 / tmnt.height-1
  3543. If tmp > 0 Then
  3544. AudioFade = Csng(tmp ^10)
  3545. Else
  3546. AudioFade = Csng(-((- tmp) ^10) )
  3547. End If
  3548. End Function
  3549.  
  3550. Function BallVelZ(ball) 'Calculates the ball speed in the -Z
  3551. BallVelZ = INT((ball.VelZ) * -1 )
  3552. End Function
  3553.  
  3554. '*** Determines if a Points (px,py) is inside a 4 point polygon A-D in Clockwise/CCW order
  3555. Function InRect(px,py,ax,ay,bx,by,cx,cy,dx,dy)
  3556. Dim AB, BC, CD, DA
  3557. AB = (bx*py) - (by*px) - (ax*py) + (ay*px) + (ax*by) - (ay*bx)
  3558. BC = (cx*py) - (cy*px) - (bx*py) + (by*px) + (bx*cy) - (by*cx)
  3559. CD = (dx*py) - (dy*px) - (cx*py) + (cy*px) + (cx*dy) - (cy*dx)
  3560. DA = (ax*py) - (ay*px) - (dx*py) + (dy*px) + (dx*ay) - (dy*ax)
  3561.  
  3562. If (AB <= 0 AND BC <=0 AND CD <= 0 AND DA <= 0) Or (AB >= 0 AND BC >=0 AND CD >= 0 AND DA >= 0) Then
  3563. InRect = True
  3564. Else
  3565. InRect = False
  3566. End If
  3567. End Function
  3568.  
  3569. '*****************************************
  3570. ' JP's VP10 Rolling Sounds
  3571. '*****************************************
  3572.  
  3573. Const tnob = 7 ' total number of balls
  3574. ReDim rolling(tnob)
  3575. InitRolling
  3576.  
  3577. Sub InitRolling
  3578. Dim i
  3579. For i = 0 to tnob
  3580. rolling(i) = False
  3581. Next
  3582. End Sub
  3583.  
  3584. Sub CollisionTimer_Timer()
  3585. Dim BOT, b
  3586. BOT = GetBalls
  3587.  
  3588. ' stop the sound of deleted balls
  3589. For b = UBound(BOT) + 1 to tnob
  3590. rolling(b) = False
  3591. StopSound("fx_ballrolling" & b)
  3592. Next
  3593.  
  3594. ' exit the sub if no balls on the table
  3595. If UBound(BOT) = -1 Then Exit Sub
  3596.  
  3597. ' play the rolling sound for each ball
  3598. For b = 0 to UBound(BOT)
  3599. If BallVel(BOT(b) ) > 1 Then
  3600. rolling(b) = True
  3601. if BOT(b).z < 30 Then ' Ball on playfield
  3602. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) )*.7, Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) )
  3603. Else ' Ball on raised ramp
  3604. If OnWireRamp = 1 Then
  3605. PlaySound("metalrolling" & b), -1, Vol(BOT(b) )*1.2, Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0, AudioFade(BOT(b) ) ' vol was *.7 then nothing
  3606. Else
  3607. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) )*1.2, Pan(BOT(b) ), 0, Pitch(BOT(b) )+60000, 1, 0, AudioFade(BOT(b) ) ' vol was *.5 then nothing
  3608. End If
  3609. End If
  3610. Else
  3611. If rolling(b) = True Then
  3612. StopSound("fx_ballrolling" & b)
  3613. rolling(b) = False
  3614. End If
  3615. End If
  3616.  
  3617. 'Ball Drop Hits
  3618.  
  3619. If BOT(b).VelZ < 0 and BOT(b).z < 60 and BOT(b).z > 40 Then
  3620. If InRect(BOT(b).x,BOT(b).y,(pRampWedge1.x-40),(pRampWedge1.y-40),(pRampWedge1.x+40),(pRampWedge1.y-40),(pRampWedge1.x+40),(pRampWedge1.y+40),(pRampWedge1.x-40),(pRampWedge1.y+40)) Then
  3621. ElseIf InRect(BOT(b).x,BOT(b).y,(pRampWedge2.x-40),(pRampWedge2.y-40),(pRampWedge2.x+40),(pRampWedge2.y-40),(pRampWedge2.x+40),(pRampWedge2.y+40),(pRampWedge2.x-40),(pRampWedge2.y+40)) Then
  3622. ElseIf InRect(BOT(b).x,BOT(b).y,(pRampWedge3.x-40),(pRampWedge3.y-40),(pRampWedge3.x+40),(pRampWedge3.y-40),(pRampWedge3.x+40),(pRampWedge3.y+40),(pRampWedge3.x-40),(pRampWedge3.y+40)) Then
  3623. Else
  3624. PlaySoundAtBOTBallZ "Ball_Bounce", BOT(b)
  3625. debug.print BOT(b).z
  3626. End If
  3627. End If
  3628. Next
  3629.  
  3630.  
  3631. End Sub
  3632.  
  3633.  
  3634. 'RampHelpers
  3635.  
  3636. Dim OnWireRamp
  3637.  
  3638. Sub tRampHelper1a_hit()
  3639. OnWireRamp = 1
  3640. End Sub
  3641.  
  3642. Sub tRampHelper1b_hit()
  3643. OnWireRamp = 0
  3644. StopSound("metalrolling")
  3645. End Sub
  3646.  
  3647. Sub tRampHelper2a_hit()
  3648. OnWireRamp = 1
  3649. End Sub
  3650.  
  3651. Sub tRampHelper2b_hit()
  3652. OnWireRamp = 0
  3653. StopSound("metalrolling")
  3654. End Sub
  3655.  
  3656.  
  3657. '**********************
  3658. ' Ball Collision Sound
  3659. '**********************
  3660.  
  3661. Sub OnBallBallCollision(ball1, ball2, velocity)
  3662. PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 200, Pan(ball1), 0, Pitch(ball1), 0, 0, AudioFade(ball1)
  3663. End Sub
  3664.  
  3665.  
  3666.  
  3667. '******************************************************
  3668. ' JP's Sound Routines
  3669. '******************************************************
  3670.  
  3671. Sub Pins_Hit (idx)
  3672. PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  3673. End Sub
  3674.  
  3675. Sub Targets_Hit (idx)
  3676. PlaySound "target", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall)
  3677. End Sub
  3678.  
  3679. Sub Metals_Hit (idx)
  3680. PlaySound "metalhit_medium", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  3681. End Sub
  3682.  
  3683. Sub Gates_Hit (idx)
  3684. PlaySound "gate4", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0, AudioFade(ActiveBall)
  3685. End Sub
  3686.  
  3687. Sub aRubbers_Hit(idx)
  3688. PlaySoundAtBallVol "rubber_hit_" & Int(Rnd*3)+1, .8
  3689. End Sub
  3690.  
  3691. Sub Posts_Hit(idx)
  3692. PlaySoundAtBallVol "rubber_hit_" & Int(Rnd*3)+1, .8
  3693. End Sub
  3694.  
  3695.  
  3696. Sub LeftFlipper_Collide(parm)
  3697. PlaySoundAtBallVol "flip_hit_" & Int(Rnd*3)+1, 2
  3698. End Sub
  3699.  
  3700. Sub RightFlipper_Collide(parm)
  3701. PlaySoundAtBallVol "flip_hit_" & Int(Rnd*3)+1, 2
  3702. End Sub
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.  
  3716.  
  3717.  
  3718. '**************************************************************************
  3719. ' Positional Sound Playback Functions by DJRobX
  3720. '**************************************************************************
  3721.  
  3722. 'Set position as table object (Use object or light but NOT wall) and Vol to 1
  3723.  
  3724. Sub PlaySoundAt(sound, tableobj)
  3725. PlaySound sound, 1, 1, Pan(tableobj), 0,0,0, 1, AudioFade(tableobj)
  3726. End Sub
  3727.  
  3728.  
  3729. 'Set all as per ball position & speed.
  3730.  
  3731. Sub PlaySoundAtBall(sound)
  3732. PlaySound sound, 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall)
  3733. End Sub
  3734.  
  3735.  
  3736. 'Set position as table object and Vol manually.
  3737.  
  3738. Sub PlaySoundAtVol(sound, tableobj, Vol)
  3739. PlaySound sound, 1, Vol, Pan(tableobj), 0,0,0, 1, AudioFade(tableobj)
  3740. End Sub
  3741.  
  3742. Sub PlaySoundAtBOTBallZ(sound, BOT)
  3743. PlaySound sound, 0, VolZ(BOT), Pan(BOT), 0, Pitch(BOT), 1, 1, AudioFade(BOT)
  3744. End Sub
  3745.  
  3746. 'Set all as per ball position & speed, but Vol Multiplier may be used eg; PlaySoundAtBallVol "sound",3
  3747.  
  3748. Sub PlaySoundAtBallVol(sound, VolMult)
  3749. PlaySound sound, 0, Vol(ActiveBall) * VolMult, Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 1, AudioFade(ActiveBall)
  3750. End Sub
  3751.  
  3752.  
  3753. 'Set position as bumperX and Vol manually.
  3754.  
  3755. Sub PlaySoundAtBumperVol(sound, tableobj, Vol)
  3756. PlaySound sound, 1, Vol, Pan(tableobj), 0,0,1, 1, AudioFade(tableobj)
  3757. End Sub
  3758.  
  3759. '*****************************
  3760. 'Random Ramp and Orbit Sounds
  3761. '*****************************
  3762.  
  3763. Dim NextOrbitHit:NextOrbitHit = 0
  3764.  
  3765. Sub WireRampBumps_Hit(idx)
  3766. if BallVel(ActiveBall) > .3 and Timer > NextOrbitHit then
  3767. RandomBump3 .1, Pitch(ActiveBall)+5
  3768. ' Schedule the next possible sound time. This prevents it from rapid-firing noises too much.
  3769. ' Lowering these numbers allow more closely-spaced clunks.
  3770. NextOrbitHit = Timer + .4 + (Rnd * .2)
  3771. end if
  3772. End Sub
  3773.  
  3774. Sub PlasticRampBumps_Hit(idx)
  3775. if BallVel(ActiveBall) > .4 and Timer > NextOrbitHit then
  3776. RandomBump 5, Pitch(ActiveBall)
  3777. ' Schedule the next possible sound time. This prevents it from rapid-firing noises too much.
  3778. ' Lowering these numbers allow more closely-spaced clunks.
  3779. NextOrbitHit = Timer + .2 + (Rnd * .2)
  3780. end if
  3781. End Sub
  3782.  
  3783.  
  3784. Sub MetalGuideBumps_Hit(idx)
  3785. if BallVel(ActiveBall) > .3 and Timer > NextOrbitHit then
  3786. RandomBump2 2, Pitch(ActiveBall)
  3787. ' Schedule the next possible sound time. This prevents it from rapid-firing noises too much.
  3788. ' Lowering these numbers allow more closely-spaced clunks.
  3789. NextOrbitHit = Timer + .2 + (Rnd * .2)
  3790. end if
  3791. End Sub
  3792.  
  3793. Sub MetalWallBumps_Hit(idx)
  3794. if BallVel(ActiveBall) > .3 and Timer > NextOrbitHit then
  3795. RandomBump 2, 20000 'Increased pitch to simulate metal wall
  3796. ' Schedule the next possible sound time. This prevents it from rapid-firing noises too much.
  3797. ' Lowering these numbers allow more closely-spaced clunks.
  3798. NextOrbitHit = Timer + .2 + (Rnd * .2)
  3799. end if
  3800. End Sub
  3801.  
  3802.  
  3803. ' Requires rampbump1 to 7 in Sound Manager
  3804. Sub RandomBump(voladj, freq)
  3805. dim BumpSnd:BumpSnd= "fx_rampbump" & CStr(Int(Rnd*7)+1)
  3806. PlaySound BumpSnd, 0, Vol(ActiveBall)*voladj, Pan(ActiveBall), 0, freq, 0, 1, AudioFade(ActiveBall)
  3807. End Sub
  3808.  
  3809. ' Requires metalguidebump1 to 2 in Sound Manager
  3810. Sub RandomBump2(voladj, freq)
  3811. dim BumpSnd:BumpSnd= "metalguidebump" & CStr(Int(Rnd*2)+1)
  3812. PlaySound BumpSnd, 0, Vol(ActiveBall)*voladj, Pan(ActiveBall), 0, freq, 0, 1, AudioFade(ActiveBall)
  3813. End Sub
  3814.  
  3815. ' Requires WireRampBump1 to 5 in Sound Manage
  3816. Sub RandomBump3(voladj, freq)
  3817. dim BumpSnd:BumpSnd= "WireRampBump" & CStr(Int(Rnd*5)+1)
  3818. PlaySound BumpSnd, 0, Vol(ActiveBall)*voladj, Pan(ActiveBall), 0, freq, 0, 1, AudioFade(ActiveBall)
  3819. End Sub
  3820.  
  3821. ' Stop Bump Sounds
  3822. Sub BumpSTOP1_Hit ()
  3823. dim i:for i=1 to 4:StopSound "WireRampBump" & i:next
  3824. NextOrbitHit = Timer + 1
  3825. End Sub
  3826.  
  3827. Sub BumpSTOP2_Hit ()
  3828. dim i:for i=1 to 4:StopSound "PlasticRampBump" & i:next
  3829. NextOrbitHit = Timer + 1
  3830. End Sub
Advertisement
Add Comment
Please, Sign In to add comment