Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '**********************************************
- 'DOWNLOADED FREE AND ONLY FROM WWW.VPINBALL.COM
- '**********************************************
- Option Explicit
- Randomize
- On Error Resume Next
- ExecuteGlobal GetTextFile("controller.vbs")
- If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
- On Error Goto 0
- Const cGameName = "st_161h" 'change the romname here
- Const GIOnDuringAttractMode = 1 '1 - GI on during attract, 0 - GI off during attract
- Const VengeanceDisable = 0 'Default: 0 - Kicker is enabled. 1 - Kicker is disabled (Test)
- Const GIColorMode = 1 '1 - GI Color linked to mode selection, 0 - Standard GI
- Const PewPew = 1 '1 - lasers enabled, 0 - lasers disabled (performance increase)
- Sub LoadCoreVBS
- On Error Resume Next
- ExecuteGlobal GetTextFile("core.vbs")
- If Err Then MsgBox "Can't open core.vbs"
- On Error Goto 0
- End Sub
- Dim VarHidden, UseVPMDMD
- If Table.ShowDT = true then
- UseVPMDMD = True
- VarHidden = 1
- lockdown.visible = true
- fireplate.visible = true
- pushbutton.visible = true
- wallsprim.visible = false
- wallsstraight.visible = true
- leftrail.visible = true
- rightrail.visible = true
- else
- UseVPMDMD = False
- VarHidden = 0
- lockdown.visible = false
- fireplate.visible = false
- pushbutton.visible = false
- wallsprim.visible = true
- wallsstraight.visible = false
- leftrail.visible = false
- rightrail.visible = false
- end if
- LoadVPM "01560000", "sam.VBS", 3.10
- '********************
- 'Standard definitions
- '********************
- Const UseSolenoids = 1
- Const UseLamps = 0
- Const UseSync = 1
- Const HandleMech = 0
- 'Standard Sounds
- Const SSolenoidOn = "Solenoid"
- Const SSolenoidOff = ""
- Const SCoin = "coin"
- '************
- ' Table init.
- '************
- 'Variables
- Dim Bump1,Bump2,Bump3,Mech3bank,bsTrough,bsVUK,visibleLock,bsTEject,bsSVUK,bsRScoop
- Dim dtSingle
- Dim PlungerIM
- Dim PMag
- Dim mag2
- Dim bsRHole
- Dim FireButtonFlag:FireButtonFlag = 0
- Dim light1pos(2)
- Dim light2pos(2)
- Dim light3pos(2)
- Dim light4pos(2)
- Dim light5pos(2)
- Dim light6pos(2)
- Dim light7pos(2)
- Dim light8pos(2)
- Dim light9pos(2)
- Dim light10pos(2)
- Dim light11pos(2)
- Dim light12pos(2)
- Dim light13pos(2)
- Dim light14pos(2)
- Dim light15pos(2)
- Dim light16pos(2)
- Dim light17pos(2)
- Dim light18pos(2)
- Dim light19pos(2)
- Dim light20pos(2)
- Dim light21pos(2)
- Dim light22pos(2)
- Dim light23pos(2)
- Dim light24pos(2)
- Dim light25pos(2)
- Dim light26pos(2)
- Dim light27pos(2)
- Dim light28pos(2)
- Dim light29pos(2)
- Dim light30pos(2)
- Dim light31pos(2)
- Dim light32pos(2)
- Dim light33pos(2)
- Dim light34pos(2)
- Dim light35pos(2)
- Dim light36pos(2)
- Dim light37pos(2)
- Dim light38pos(2)
- Dim light39pos(2)
- Dim light40pos(2)
- Dim light41pos(2)
- Dim light42pos(2)
- Dim light43pos(2)
- Dim light44pos(2)
- Dim light45pos(2)
- Dim light46pos(2)
- Dim light47pos(2)
- Dim light48pos(2)
- Dim light49pos(2)
- Dim light50pos(2)
- Dim light51pos(2)
- Dim light52pos(2)
- Dim light53pos(2)
- Dim light54pos(2)
- Dim light55pos(2)
- Dim light56pos(2)
- Dim light57pos(2)
- Dim light58pos(2)
- Dim light59pos(2)
- Dim light60pos(2)
- Dim light61pos(2)
- Dim light62pos(2)
- Dim light63pos(2)
- Dim light64pos(2)
- Dim light65pos(2)
- Dim light66pos(2)
- Dim light67pos(2)
- Dim light68pos(2)
- Dim light69pos(2)
- Dim light70pos(2)
- Dim light71pos(2)
- Dim light72pos(2)
- Dim light73pos(2)
- Dim light74pos(2)
- Dim light75pos(2)
- Dim light76pos(2)
- Dim light77pos(2)
- Dim light78pos(2)
- Dim light79pos(2)
- Dim light80pos(2)
- Dim light81pos(2)
- Dim light82pos(2)
- Dim light83pos(2)
- Dim light84pos(2)
- Dim light85pos(2)
- Dim light86pos(2)
- Dim light87pos(2)
- Dim light88pos(2)
- Dim light89pos(2)
- Dim light90pos(2)
- Dim light91pos(2)
- Dim light92pos(2)
- Dim light93pos(2)
- Dim light94pos(2)
- Dim light95pos(2)
- Dim light96pos(2)
- Dim light97pos(2)
- Dim light98pos(2)
- Dim light99pos(2)
- Dim light100pos(2)
- Dim light101pos(2)
- Dim light102pos(2)
- Dim light103pos(2)
- Dim light104pos(2)
- Dim light105pos(2)
- Dim light106pos(2)
- Dim light107pos(2)
- Dim light108pos(2)
- Dim light109pos(2)
- Dim light110pos(2)
- Dim light111pos(2)
- Dim light112pos(2)
- Dim light113pos(2)
- Dim light114pos(2)
- Dim light115pos(2)
- Dim light116pos(2)
- Dim light117pos(2)
- Dim light118pos(2)
- Dim light119pos(2)
- Dim light120pos(2)
- Sub Table_Init
- '*****
- light1pos(0) = laser1.x: light1pos(1) = laser1.y
- light2pos(0) = Laser2.x: light2pos(1) = Laser2.y
- light3pos(0) = Laser3.x: light3pos(1) = Laser3.y
- light4pos(0) = Laser4.x: light4pos(1) = Laser4.y
- light5pos(0) = Laser5.x: light5pos(1) = Laser5.y
- light6pos(0) = Laser6.x: light6pos(1) = laser6.y
- light7pos(0) = Laser7.x: light7pos(1) = Laser7.y
- light8pos(0) = Laser8.x: light8pos(1) = Laser8.y
- light9pos(0) = Laser9.x: light9pos(1) = Laser9.y
- light10pos(0) = Laser10.x: light10pos(1) = Laser10.y
- light11pos(0) = Laser11.x: light11pos(1) = Laser11.y
- light12pos(0) = Laser12.x: light12pos(1) = Laser12.y
- light13pos(0) = Laser13.x: light13pos(1) = Laser13.y
- light14pos(0) = Laser14.x: light14pos(1) = Laser14.y
- light15pos(0) = Laser15.x: light15pos(1) = Laser15.y
- light16pos(0) = Laser16.x: light16pos(1) = Laser16.y
- light17pos(0) = Laser17.x: light17pos(1) = Laser17.y
- light18pos(0) = Laser18.x: light18pos(1) = Laser18.y
- light19pos(0) = Laser19.x: light19pos(1) = Laser19.y
- light20pos(0) = Laser20.x: light20pos(1) = Laser20.y
- light21pos(0) = laser21.x: light21pos(1) = laser21.y
- light22pos(0) = Laser22.x: light22pos(1) = Laser22.y
- light23pos(0) = Laser23.x: light23pos(1) = Laser23.y
- light24pos(0) = Laser24.x: light24pos(1) = Laser24.y
- light25pos(0) = Laser25.x: light25pos(1) = Laser25.y
- light26pos(0) = Laser26.x: light26pos(1) = laser26.y
- light27pos(0) = Laser27.x: light27pos(1) = Laser27.y
- light28pos(0) = Laser28.x: light28pos(1) = Laser28.y
- light29pos(0) = Laser29.x: light29pos(1) = Laser29.y
- light30pos(0) = Laser30.x: light30pos(1) = Laser30.y
- light31pos(0) = Laser31.x: light31pos(1) = Laser31.y
- light32pos(0) = Laser32.x: light32pos(1) = Laser32.y
- light33pos(0) = Laser33.x: light33pos(1) = Laser33.y
- light34pos(0) = Laser34.x: light34pos(1) = Laser34.y
- light35pos(0) = Laser35.x: light35pos(1) = Laser35.y
- light36pos(0) = Laser36.x: light36pos(1) = Laser36.y
- light37pos(0) = Laser37.x: light37pos(1) = Laser37.y
- light38pos(0) = Laser38.x: light38pos(1) = Laser38.y
- light39pos(0) = Laser39.x: light39pos(1) = Laser39.y
- light40pos(0) = Laser40.x: light40pos(1) = Laser40.y
- light41pos(0) = Laser41.x - 50: light41pos(1) = laser41.y - 500
- light42pos(0) = Laser42.x - 50: light42pos(1) = laser42.y - 500
- light43pos(0) = Laser43.x - 50: light43pos(1) = laser43.y - 500
- light44pos(0) = Laser44.x - 50: light44pos(1) = laser44.y - 500
- light45pos(0) = Laser45.x - 50: light45pos(1) = laser45.y - 500
- light46pos(0) = Laser46.x - 50: light46pos(1) = laser46.y - 500
- light47pos(0) = Laser47.x - 50: light47pos(1) = laser47.y - 500
- light48pos(0) = Laser48.x - 50: light48pos(1) = laser48.y - 500
- light49pos(0) = Laser49.x - 50: light49pos(1) = laser49.y - 500
- light50pos(0) = Laser50.x - 50: light50pos(1) = laser50.y - 500
- light51pos(0) = Laser51.x - 50: light51pos(1) = laser51.y - 500
- light52pos(0) = Laser52.x - 50: light52pos(1) = laser52.y - 500
- light53pos(0) = Laser53.x - 50: light53pos(1) = laser53.y - 500
- light54pos(0) = Laser54.x - 50: light54pos(1) = laser54.y - 500
- light55pos(0) = Laser55.x - 50: light55pos(1) = laser55.y - 500
- light56pos(0) = Laser56.x - 50: light56pos(1) = laser56.y - 500
- light57pos(0) = Laser57.x - 50: light57pos(1) = laser57.y - 500
- light58pos(0) = Laser58.x - 50: light58pos(1) = laser58.y - 500
- light59pos(0) = Laser59.x - 50: light59pos(1) = laser59.y - 500
- light60pos(0) = Laser60.x - 50: light60pos(1) = laser60.y - 500
- light61pos(0) = Laser61.x - 50: light61pos(1) = laser61.y - 500
- light62pos(0) = Laser62.x - 50: light62pos(1) = laser62.y - 500
- light63pos(0) = Laser63.x - 50: light63pos(1) = laser63.y - 500
- light64pos(0) = Laser64.x - 50: light64pos(1) = laser64.y - 500
- light65pos(0) = Laser65.x - 50: light65pos(1) = laser65.y - 500
- light66pos(0) = Laser66.x - 50: light66pos(1) = laser66.y - 500
- light67pos(0) = Laser67.x - 50: light67pos(1) = laser67.y - 500
- light68pos(0) = Laser68.x - 50: light68pos(1) = laser68.y - 500
- light69pos(0) = Laser69.x - 50: light69pos(1) = laser69.y - 500
- light70pos(0) = Laser70.x - 50: light70pos(1) = laser70.y - 500
- light71pos(0) = Laser71.x - 50: light71pos(1) = laser71.y - 500
- light72pos(0) = Laser72.x - 50: light72pos(1) = laser72.y - 500
- light73pos(0) = Laser73.x - 50: light73pos(1) = laser73.y - 500
- light74pos(0) = Laser74.x - 50: light74pos(1) = laser74.y - 500
- light75pos(0) = Laser75.x - 50: light75pos(1) = laser75.y - 500
- light76pos(0) = Laser76.x - 50: light76pos(1) = laser76.y - 500
- light77pos(0) = Laser77.x - 50: light77pos(1) = laser77.y - 500
- light78pos(0) = Laser78.x - 50: light78pos(1) = laser78.y - 500
- light79pos(0) = Laser79.x - 50: light79pos(1) = laser79.y - 500
- light80pos(0) = Laser80.x - 50: light80pos(1) = laser80.y - 500
- light81pos(0) = Laser81.x: light81pos(1) = laser81.y + 300
- light82pos(0) = Laser82.x: light82pos(1) = laser82.y + 300
- light83pos(0) = Laser83.x: light83pos(1) = laser83.y + 300
- light84pos(0) = Laser84.x: light84pos(1) = laser84.y + 300
- light85pos(0) = Laser85.x: light85pos(1) = laser85.y + 300
- light86pos(0) = Laser86.x: light86pos(1) = laser86.y + 300
- light87pos(0) = Laser87.x: light87pos(1) = laser87.y + 300
- light88pos(0) = Laser88.x: light88pos(1) = laser88.y + 300
- light89pos(0) = Laser89.x: light89pos(1) = laser89.y + 300
- light90pos(0) = Laser90.x: light90pos(1) = laser90.y + 300
- light91pos(0) = Laser91.x: light91pos(1) = laser91.y + 300
- light92pos(0) = Laser92.x: light92pos(1) = laser92.y + 300
- light93pos(0) = Laser93.x: light93pos(1) = laser93.y + 300
- light94pos(0) = Laser94.x: light94pos(1) = laser94.y + 300
- light95pos(0) = Laser95.x: light95pos(1) = laser95.y + 300
- light96pos(0) = Laser96.x: light96pos(1) = laser96.y + 300
- light97pos(0) = Laser97.x: light97pos(1) = laser97.y + 300
- light98pos(0) = Laser98.x: light98pos(1) = laser98.y + 300
- light99pos(0) = Laser99.x: light99pos(1) = laser99.y + 300
- light100pos(0) = Laser100.x: light100pos(1) = laser100.y + 300
- light101pos(0) = Laser101.x: light101pos(1) = laser101.y + 300
- light102pos(0) = Laser102.x: light102pos(1) = laser102.y + 300
- light103pos(0) = Laser103.x: light103pos(1) = laser103.y + 300
- light104pos(0) = Laser104.x: light104pos(1) = laser104.y + 300
- light105pos(0) = Laser105.x: light105pos(1) = laser105.y + 300
- light106pos(0) = Laser106.x: light106pos(1) = laser106.y + 300
- light107pos(0) = Laser107.x: light107pos(1) = laser107.y + 300
- light108pos(0) = Laser108.x: light108pos(1) = laser108.y + 300
- light109pos(0) = Laser109.x: light109pos(1) = laser109.y + 300
- light110pos(0) = Laser110.x: light110pos(1) = laser110.y + 300
- light111pos(0) = Laser111.x: light111pos(1) = laser111.y + 300
- light112pos(0) = Laser112.x: light112pos(1) = laser112.y + 300
- light113pos(0) = Laser113.x: light113pos(1) = laser113.y + 300
- light114pos(0) = Laser114.x: light114pos(1) = laser114.y + 300
- light115pos(0) = Laser115.x: light115pos(1) = laser115.y + 300
- light116pos(0) = Laser116.x: light116pos(1) = laser116.y + 300
- light117pos(0) = Laser117.x: light117pos(1) = laser117.y + 300
- light118pos(0) = Laser118.x: light118pos(1) = laser118.y + 300
- light119pos(0) = Laser119.x: light119pos(1) = laser119.y + 300
- light120pos(0) = Laser120.x: light120pos(1) = laser120.y + 300
- ' Laser.UpdateInterval = 5
- ' Laser.Play SeqScrewRightOn,340,100
- kickback2.Pullback
- With Controller
- .GameName = cGameName
- If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
- .SplashInfoLine = "Star Trek (Stern 2013)"
- .HandleKeyboard = 0
- .ShowTitle = 0
- .ShowDMDOnly = 1
- .ShowFrame = 0
- .HandleMechanics = 1
- .Hidden = VarHidden
- .Games(cGameName).Settings.Value("sound") = 1
- On Error Resume Next
- .Run GetPlayerHWnd
- If Err Then MsgBox Err.Description
- End With
- On Error Goto 0
- Const IMPowerSetting = 50
- Const IMTime = 0.6
- Set plungerIM = New cvpmImpulseP
- With plungerIM
- .InitImpulseP swplunger, IMPowerSetting, IMTime
- .Random 0.3
- .Switch 71
- .InitExitSnd SoundFX("plunger",DOFContactors), SoundFX("plunger",DOFContactors)
- .CreateEvents "plungerIM"
- End With
- '**Trough
- Set bsTrough = New cvpmBallStack
- bsTrough.InitSw 0, 21, 20, 19, 18, 0, 0, 0
- bsTrough.InitKick BallRelease, 50, 10
- bsTrough.InitExitSnd SoundFX("ballrel",DOFContactors), SoundFX("Solenoid",DOFContactors)
- bsTrough.Balls = 4
- Set mag2= New cvpmMagnet
- With mag2
- .InitMagnet Magnet2, 55
- .GrabCenter = True
- .solenoid=3
- .CreateEvents "mag2"
- End With
- set dtSingle=new cvpmDropTarget
- dtSingle.InitDrop sw11,11
- dtSingle.InitSnd SoundFX("flapclos",DOFContactors),SoundFX("flapopen",DOFContactors)
- Set bsRHole = New cvpmSaucer
- With bsRHole
- '.InitKicker kicker3, 10, 184, 22, 0
- if scoopposition = 0 Then 'scoop kicks out to flipper
- '.InitSw 0, 10, 0, 0, 0, 0, 0, 0
- '.InitKicker kicker3, 10, 184, 22, 0
- '.KickZ = 55
- '.InitExitSnd SoundFX("scoopexit",DOFContactors), SoundFX("Solenoid",DOFContactors)
- '.KickForceVar = 2
- End If
- If scoopposition = 1 Then 'scoop kicks up to ramp
- '.InitAltKick 0, 180
- '.InitSw 0, 10, 0, 0, 0, 0, 0, 0
- '.KickZ 90
- '.InitKicker kicker3, 10, 0, 22, 180
- '.KickZ = 90
- '.InitExitSnd SoundFX("scoopexit",DOFContactors), SoundFX("Solenoid",DOFContactors)
- '.KickForceVar = 2
- End If
- End With
- '**Nudging
- vpmNudge.TiltSwitch=-7
- vpmNudge.Sensitivity=1
- vpmNudge.TiltObj=Array(Bumper1,Bumper2,Bumper3,LeftSlingshot,RightSlingshot)
- '**Main Timer init
- PinMAMETimer.Interval = PinMAMEInterval
- PinMAMETimer.Enabled = 1
- If GIOnDuringAttractMode = 1 Then GI_AllOn
- End Sub
- '*****Keys
- Sub Table_KeyDown(ByVal Keycode)
- If vpmKeyDown(keycode) Then Exit Sub
- If Keycode = LeftFlipperKey then
- Controller.Switch(84)=1
- Exit Sub
- End If
- If Keycode = RightFlipperKey then
- Controller.Switch(90)=1
- Controller.Switch(82)=1
- ' dim bulb
- ' debug.print "laser enabled"
- ' for each bulb in LasersPew
- ' bulb.state = 1
- ' Next
- ' Laser.UpdateInterval = 5
- ' Laser.Play SeqScrewRightOn,340,100
- ' timer3.enabled = 1
- Exit Sub
- End If
- ' If keycode = RightMagnaSave and FireButtonFlag = 1 then VengeanceHit 1:else vpmTimer.PulseSw 71:End If
- ' If keycode = LeftMagnaSave and FireButtonFlag = 1 then VengeanceHit 1:else vpmTimer.PulseSw 71:End If
- If keycode = RightMagnaSave then Controller.Switch(71) = 0:End If
- If keycode = LeftMagnaSave then Controller.Switch(71) = 0:End If
- If keycode = PlungerKey Then Plunger.Pullback
- If keycode = LeftTiltKey Then nudgebobble(keycode):End If
- If keycode = RightTiltKey Then nudgebobble(keycode):End If
- If Keycode = StartGameKey Then vpmTimer.PulseSw 16
- ' If vpmKeyDown(keycode) Then Exit Sub
- End Sub
- Sub Table_KeyUp(ByVal keycode)
- If vpmKeyUp(keycode) Then Exit Sub
- If Keycode = LeftFlipperKey then
- Controller.Switch(84)=0
- Exit Sub
- End If
- If Keycode = RightFlipperKey then
- Controller.Switch(90)=0
- Controller.Switch(82)=0
- ' dim bulb
- ' debug.print "laser disabled"
- ' Laser.StopPlay
- ' for each bulb in LasersPew
- ' bulb.state = 0
- ' Next
- ' timer3.enabled = 0
- ' Exit Sub
- End If
- 'If Keycode = StartGameKey Then Controller.Switch(16) = 0
- If keycode = RightMagnaSave then Controller.Switch(71) = 1:End If
- If keycode = LeftMagnaSave then Controller.Switch(71) = 1:End If
- If Keycode = PlungerKey Then Plunger.Fire:playsound "plunger2"
- End Sub
- 'Solenoids
- SolCallback(1) = "solTrough"
- SolCallback(2) = "solAutofire"
- 'sol 3 magnet (done)
- SolCallback(4) = "dtSingle.SolDropUp"
- SolCallback(5) = "dtSingle.SolHit 1,"
- SolCallback(6) = "LeftKickout"
- SolCallback(7) = "SolKickback"
- SolCallback(8) = "SolShaker"
- 'sol9 left pop
- 'sol10 right pop
- 'sol11 bottom pop
- 'sol12 upper right flip
- 'sol13 left sling
- 'sol14 right sling
- SolCallback(15) = "SolLFlipper"
- SolCallback(16) = "SolRFlipper"
- SolCallback(17) = "Sol17"
- SolCallback(18) = "Sol18"
- SolCallback(19) = "Sol19" 'left ramp flash
- SolCallback(20) = "Sol20" 'right ramp flash
- SolCallback(21) = "Sol21"
- SolCallback(22) = "LaserMotor"
- SolCallback(23) = "Sol23"
- 'sol24 Optional
- SolCallback(24) = "SolKnocker"
- SolCallback(25) = "FlashPops"
- SolCallback(26) = "Sol26"
- SolCallback(27) = "Sol27"
- SolCallback(28) = "Sol28"
- SolCallback(29) = "Sol29" 'left loop / spinner
- SolCallback(30) = "Sol30"
- SolCallback(31) = "VengFlash" 'vengeance ship
- SolCallback(32) = "LeftSpot"
- SolCallback(59) = "RightSpot" '(actually 41)
- 'sol60 flash backbox x2 (actually 42)
- 'sol61 flash backbox x2 (actually 43)
- 'sol62 flash backbox (actually 44)
- 'sol63 flash backbox (actually 45)
- 'sol64 flash backbox (actually 46)
- 'SolCallback(51) = "Gate3.Collidable ="
- 'SolCallback(52) = "Gate2.Collidable ="
- SolCallback(51) = "Gate3Sol"
- SolCallback(52) = "Gate2Sol"
- SolCallback(53) = "VengeanceLE"
- SolCallback(54) = "KickbackPlunger"
- SolCallback(55) = "ScoopRot"
- 'sol56 vengeance ship latch
- Sub Gate3Sol(enabled)
- If enabled Then
- Gate3.Collidable = 0
- Else
- Gate3.Collidable = 1
- End If
- End Sub
- Sub Gate2Sol(enabled)
- If enabled Then
- Gate2.Collidable = 0
- Else
- Gate2.Collidable = 1
- End If
- End Sub
- Sub Sol17(enabled)
- If Enabled Then
- SetLamp 357, 1
- Else
- SetLamp 357, 0
- End If
- End Sub
- Sub Sol18(enabled)
- If Enabled Then
- SetLamp 358, 1
- Else
- SetLamp 358, 0
- End If
- End Sub
- Sub Sol19(enabled)
- If Enabled Then
- SetLamp 339, 1
- Else
- SetLamp 339, 0
- End If
- End Sub
- Sub Sol20(enabled)
- If Enabled Then
- SetLamp 340, 1
- Else
- SetLamp 340, 0
- End If
- End Sub
- Sub Sol21(enabled)
- If Enabled Then
- SetLamp 342, 1
- Else
- SetLamp 342, 0
- End If
- End Sub
- Dim LatchOn:LatchOn = False
- Sub Sol23(enabled)
- If Enabled Then
- SetLamp 333, 1
- Else
- SetLamp 333, 0
- End If
- End Sub
- Sub Sol26(enabled)
- If Enabled Then
- SetLamp 326, 1
- Else
- SetLamp 326, 0
- End If
- End Sub
- Sub Sol27(enabled)
- If Enabled Then
- SetLamp 327, 1
- Else
- SetLamp 327, 0
- End If
- End Sub
- Sub Sol28(enabled)
- If Enabled Then
- SetLamp 328, 1
- Else
- SetLamp 328, 0
- End If
- End Sub
- Sub Sol29(enabled)
- If Enabled Then
- SetLamp 349, 1
- Else
- SetLamp 349, 0
- End If
- End Sub
- Sub Sol30(enabled)
- If Enabled Then
- SetLamp 330, 1
- Else
- SetLamp 330, 0
- End If
- End Sub
- Sub Latch(enabled)
- If Enabled then
- debug.print "latch disabled"
- LatchOn = False
- Else
- debug.print "latch enabled"
- LatchOn = True
- End If
- End Sub
- SolCallback(sLRFlipper) = "SolRFlipper"
- SolCallback(sLLFlipper) = "SolLFlipper"
- Sub LeftKickout(enabled)
- If Enabled Then
- 'debug.print "leftkickout!!!"
- If scoopposition = 0 Then
- kicker3.kick 184, 22
- Controller.Switch(10) = 0
- playsound SoundFX("gunpopper",DOFContactors)
- End If
- If scoopposition = 1 Then
- kicker3.kick 0, 50, 90
- Controller.Switch(10) = 0
- playsound SoundFX("warehousekick",DOFContactors)
- End If
- Else
- End If
- End Sub
- Sub SolShaker(enabled)
- End Sub
- Sub SolKnocker(enabled)
- End Sub
- Sub FlashPops(Enabled)
- If Enabled Then
- SetLamp 325, 1
- SetFlash 325, 1
- Else
- SetLamp 325, 0
- SetFlash 325, 0
- End If
- End Sub
- Sub LeftSpot(Enabled)
- If Enabled Then
- SetLamp 332, 1
- SetFlash 332, 1
- Else
- SetLamp 332, 0
- SetFlash 332, 0
- End If
- End Sub
- Sub RightSpot(Enabled)
- If Enabled Then
- 'debug.print "sol41 enabled"
- SetLamp 341, 1
- SetFlash 341, 1
- Else
- SetLamp 341, 0
- SetFlash 341, 0
- End If
- End Sub
- Sub solDTReset (enabled)
- If enabled Then
- sw11.isdropped = false
- End If
- End Sub
- Sub solDTDown (enabled)
- If enabled Then
- sw11.isdropped = true
- End If
- End Sub
- Sub VengFlash(Enabled)
- If Enabled Then
- 'vengflashGI.State = 1
- SetLamp 331, 1
- SetFlash 331, 1
- 'vengeancespot.state = 1
- vengEL.visible = 1
- Else
- 'vengflashGI.State = 0
- SetLamp 331, 0
- SetFlash 331, 0
- 'vengeancespot.state = 0
- vengEL.visible = 0
- End If
- End Sub
- Sub Flash119(Enabled)
- If Enabled Then
- SetLamp 119, 1
- SetFlash 119, 1
- Else
- SetLamp 119, 0
- SetFlash 119, 0
- End If
- End Sub
- Sub Flash120(Enabled)
- If Enabled Then
- SetLamp 120, 1
- SetFlash 120, 1
- Else
- SetLamp 120, 0
- SetFlash 120, 0
- End If
- End Sub
- Sub solTrough(Enabled)
- If Enabled Then
- bsTrough.ExitSol_On
- vpmTimer.PulseSw 22
- End If
- End Sub
- Sub solAutofire(Enabled)
- If Enabled Then
- PlungerIM.AutoFire
- End If
- End Sub
- Sub LaserMotor(enabled)
- dim bulb
- If Enabled Then
- If PewPew = 1 then
- 'debug.print "laser enabled"
- for each bulb in LasersPew
- bulb.state = 1
- Next
- Laser.UpdateInterval = 5
- Laser.Play SeqScrewRightOn,340,100
- timer3.enabled = 1
- End If
- LaserSimple.State = 2
- Else
- If PewPew = 1 then
- 'debug.print "laser disabled"
- Laser.StopPlay
- for each bulb in LasersPew
- bulb.state = 0
- Next
- timer3.enabled = 0
- End If
- LaserSimple.State = 0
- End If
- End Sub
- Sub KickbackPlunger(enabled)
- If Enabled Then
- kickback2.fire
- playsound SoundFX("plunger",DOFContactors)
- 'KickbackKicker2.Enabled = true
- 'debug.print "kickback enabled"
- Else
- 'kickback2.Fire
- 'KickbackKicker2.Enabled = false
- 'debug.print "kickback disabled"
- kickback2.TimerEnabled = true
- End If
- End Sub
- Sub Kickback2_Timer()
- Kickback2.Pullback
- kickback2.TimerEnabled = False
- End Sub
- dim scoopposition:scoopposition = 0
- Sub ScoopRot(Enabled)
- If Enabled Then
- 'debug.print "scooprot!!!"
- ScoopFlipper.RotateToEnd
- scoopposition = 1
- Else
- ScoopFlipper.RotateToStart
- scoopposition = 0
- End If
- End Sub
- 'Sub KickbackKicker2_Hit:KickbackKicker2.Kick 0, 55:End Sub
- 'primitive flippers!
- dim MotorCallback
- Set MotorCallback = GetRef("GameTimer")
- Sub GameTimer
- UpdateFlipperLogos
- End Sub
- Sub UpdateFlipperLogo_Timer
- LFLogo.RotY = LeftFlipper.CurrentAngle
- RFlogo.RotY = RightFlipper.CurrentAngle
- LFLogo1.RotY = LeftFlipper.CurrentAngle
- RFlogo2.RotY = RightFlipper.CurrentAngle
- RFlogo1.RotY = UpRightFlipper.CurrentAngle
- VengeancePrim.RotX = VengeanceFlipper.CurrentAngle
- f31.RotX = VengeancePrim.rotx
- vengEL.rotx = VengeancePrim.rotx
- scooprotate.RotY = ScoopFlipper.CurrentAngle
- End Sub
- Sub SolLFlipper(Enabled)
- If Enabled Then
- PlaySound SoundFX("FlipperUpLeft",DOFFlippers)
- LeftFlipper.RotateToEnd
- Else
- PlaySound SoundFX("flipperdown",DOFFlippers)
- LeftFlipper.RotateToStart
- End If
- End Sub
- Sub VengeanceLE(Enabled)
- If Enabled Then
- debug.print "vengeancele enabled"
- If LatchOn = True then
- ' debug.print "vengeancele enabled"
- 'PlaySound SoundFX("flipperup")
- 'VengeanceFlipper.RotateToEnd
- End If
- If LatchOn = False Then
- VengeanceFlipper.RotateToEnd
- VengeanceHit 1
- End If
- Else
- debug.print "vengeancele disabled"
- If LatchOn = True Then
- ' debug.print "vengeancele disabled"
- ' PlaySound SoundFX("flipperdown")
- VengeanceFlipper.RotateToStart
- 'VengeanceFlipper2.RotateToStart
- VengeanceHit 0
- End If
- If LatchOn = False Then
- VengeanceFlipper.RotateToStart
- 'VengeanceFlipper2.RotateToStart
- End If
- End If
- End Sub
- Sub SolRFlipper(Enabled)
- If Enabled Then
- PlaySound SoundFX("FlipperUpRight",DOFFlippers)
- RightFlipper.RotateToEnd
- UpRightFlipper.RotateToEnd
- Else
- PlaySound SoundFX("flipperdown",DOFFlippers)
- RightFlipper.RotateToStart
- UpRightFlipper.RotateToStart
- End If
- End Sub
- Sub SolURFlipper(Enabled)
- If Enabled Then
- PlaySound SoundFX("flipperupright",DOFFlippers)
- UpRightFlipper.RotateToEnd
- Else
- PlaySound SoundFX("flipperdown",DOFFlippers)
- UpRightFlipper.RotateToStart
- End If
- End Sub
- Sub LeftSlingShot_Slingshot
- Leftsling = True
- Controller.Switch(26) = 1
- PlaySound SoundFX("slingshot_left",DOFContactors):LeftSlingshot.TimerEnabled = 1
- End Sub
- Dim Leftsling:Leftsling = False
- Sub LS_Timer()
- If Leftsling = True and Left1.ObjRotZ < -7 then Left1.ObjRotZ = Left1.ObjRotZ + 2
- If Leftsling = False and Left1.ObjRotZ > -20 then Left1.ObjRotZ = Left1.ObjRotZ - 2
- If Left1.ObjRotZ >= -7 then Leftsling = False
- If Leftsling = True and Left2.ObjRotZ > -212.5 then Left2.ObjRotZ = Left2.ObjRotZ - 2
- If Leftsling = False and Left2.ObjRotZ < -199.5 then Left2.ObjRotZ = Left2.ObjRotZ + 2
- If Left2.ObjRotZ <= -212.5 then Leftsling = False
- If Leftsling = True and Left3.TransZ > -23 then Left3.TransZ = Left3.TransZ - 4
- If Leftsling = False and Left3.TransZ < -0 then Left3.TransZ = Left3.TransZ + 4
- If Left3.TransZ <= -23 then Leftsling = False
- End Sub
- Sub LeftSlingShot_Timer:Me.TimerEnabled = 0:Controller.Switch(26) = 0:End Sub
- Sub RightSlingShot_Slingshot
- Rightsling = True
- Controller.Switch(27) = 1
- PlaySound SoundFX("slingshot_right",DOFContactors):RightSlingshot.TimerEnabled = 1
- End Sub
- Dim Rightsling:Rightsling = False
- Sub RS_Timer()
- If Rightsling = True and Right1.ObjRotZ > 7 then Right1.ObjRotZ = Right1.ObjRotZ - 2
- If Rightsling = False and Right1.ObjRotZ < 20 then Right1.ObjRotZ = Right1.ObjRotZ + 2
- If Right1.ObjRotZ <= 7 then Rightsling = False
- If Rightsling = True and Right2.ObjRotZ < 212.5 then Right2.ObjRotZ = Right2.ObjRotZ + 2
- If Rightsling = False and Right2.ObjRotZ > 199.5 then Right2.ObjRotZ = Right2.ObjRotZ - 2
- If Right2.ObjRotZ >= 212.5 then Rightsling = False
- If Rightsling = True and Right3.TransZ > -23 then Right3.TransZ = Right3.TransZ - 4
- If Rightsling = False and Right3.TransZ < -0 then Right3.TransZ = Right3.TransZ + 4
- If Right3.TransZ <= -23 then Rightsling = False
- End Sub
- Sub RightSlingShot_Timer:Me.TimerEnabled = 0:Controller.Switch(27) = 0:End Sub
- Sub Bumper1_Hit:fb1.State = 1:fb1a.State = 1:vpmTimer.PulseSw 30:PlaySound SoundFX("bumper1",DOFContactors):Bumper1.TimerEnabled = 1:End Sub
- Sub Bumper1_Timer:Bumper1.TimerEnabled = 0:fb1.State = 0:fb1a.State = 0:End Sub
- Sub Bumper2_Hit:fb2.State = 1:fb2a.State = 1:vpmTimer.PulseSw 31:PlaySound SoundFX("bumper1",DOFContactors):Bumper2.TimerEnabled = 1:End Sub
- Sub Bumper2_Timer:Bumper2.TimerEnabled = 0:fb2.State = 0:fb2a.State = 0:End Sub
- Sub Bumper3_Hit:fb3.State = 1:fb3a.State = 1:vpmTimer.PulseSw 32:PlaySound SoundFX("bumper1",DOFContactors):Bumper3.TimerEnabled = 1:End Sub
- Sub Bumper3_Timer:Bumper3.TimerEnabled = 0:fb3.State = 0:fb3a.State = 0:End Sub
- 'Drains and Kickers
- Dim BallInPlay:BallInPlay = 0
- Sub Drain_Hit
- PlaySound "Drain"
- bsTrough.AddBall Me
- Drain.TimerInterval = 200
- Drain.TimerEnabled = 1
- BallInPlay = BallInPlay - 1
- End Sub
- Sub Drain_Timer
- If GI_TroughCheck = 4 And LampState(13) = 0 Then
- GI_AllOff 0
- End If
- Drain.TimerEnabled = False
- End Sub
- Sub BallRelease_UnHit(): GI_AllOn: BallInPlay = BallInPlay + 1:End Sub
- Sub RLS_Timer()
- sw12p.RotX = -(sw12.currentangle) +90
- End Sub
- '''*****************************************************************************************
- '''*freneticamnesic level nudge script, based on rascals nudge bobble with help from gtxjoe*
- '''* add timers and "Nudgebobble(keycode)" to left and right tilt keys to activate *
- '''*****************************************************************************************
- Dim keycode
- Dim bgcharctr:bgcharctr = 2
- Dim centerlocation:centerlocation = 90
- Dim bgdegree:bgdegree = 7 'move +/- 7 degrees
- Dim bgdurationctr:bgdurationctr = 0
- Sub LevelT_Timer()
- Dim loopctr
- Level.RotAndTra7 = Level.RotAndTra7 + bgcharctr 'change rotation value by bgcharctr
- 'debug.print "Degrees: " & Level.RotAndTra7 & " Max degree offset: " & bgdegree & " Cycle count: " & bgdurationctr ''debug print
- If Level.RotAndTra7 >= bgdegree + centerlocation then bgcharctr = -1:bgdurationctr = bgdurationctr + 1 'if level moves past max degrees, change direction and increate durationctr
- If Level.RotAndTra7 <= -bgdegree + centerlocation then bgcharctr = 1 'if level moves past min location, change direction
- If bgdurationctr = 4 then bgdegree = bgdegree - 2:bgdurationctr = 0 'if level has moved back and forth 5 times, decrease amount of movement by -2 and repeat by resetting durationctr
- If bgdegree <= 0 then LevelT.Enabled = False:bgdegree = 7 'if amount of movement is 0, turn off LevelT timer and reset movement back to max 7 degrees
- End Sub
- Sub Nudgebobble(keycode)
- If keycode = LeftTiltKey then bgcharctr = -1 'if nudge left, move in - direction
- If keycode = RightTiltKey then bgcharctr = 1 'if nudge right, move in + direction
- If keycode = CenterTiltKey then 'if nudge center, generate random number 1 or 2. If 1 change it to -2. use this number for initial direction
- Dim randombobble:randombobble = Int(2 * Rnd + 1)
- If randombobble = 1 then randombobble = -2
- bgcharctr = randombobble
- End If
- LevelT.Enabled = True:bgdurationctr = 0:bgdegree = 7
- End Sub
- Sub bobblesome_Timer() 'This looks like a free running timer that 1 out of ten times will start movement
- Dim chance
- chance = Int(10*Rnd+1)
- If chance = 5 then Nudgebobble(CenterTiltKey)
- End Sub
- '*******************************************************************************************
- Sub SolKickBack(enabled)
- if enabled then
- if VengeanceDisable = 0 Then vengeancekb.Enabled = True
- 'VengeanceHit 1
- 'debug.print timer & " :solkickback"
- else
- End if
- End Sub
- Sub Vengeancekb_Hit()
- 'debug.print timer & " :vkicker hit"
- Vengeancekb.kick 175, 40
- Vengeancekb.Enabled = False
- PlaySound SoundFX("ballhit",DOFContactors)
- End Sub
- Dim aBall, aZpos
- Sub Kicker3a_Hit
- Set aBall = ActiveBall
- aZpos = 50
- kicker3a.TimerInterval = 2
- kicker3a.TimerEnabled = 1
- Controller.Switch(10) = 1
- playsound "warehousehit"
- End Sub
- Sub Kicker3a_Timer
- aBall.Z = aZpos
- aZpos = aZpos-2
- If aZpos <0 Then
- kicker3a.TimerEnabled = 0
- kicker3a.DestroyBall
- 'bsRHole.AddBall Me
- kicker3.CreateBall
- kicker3a.Enabled = 0
- unhittimer.Enabled = 1
- End If
- End Sub
- Sub unhittimer_timer
- 'Controller.Switch(10) = 0
- unhittimer.enabled = 0
- End Sub
- Sub k3trig_hit
- Kicker3a.enabled = 1
- end sub
- Sub k3trig_unHit
- BallInPlunger = 0
- End Sub
- Sub sw1_Hit:Me.TimerEnabled = 1:Controller.Switch(1) = 1:PlaySound "rollover":End Sub
- Sub sw1_Timer:Me.TimerEnabled = 0:Controller.Switch(1) = 0:End Sub
- Sub sw2_Hit:Me.TimerEnabled = 1:Controller.Switch(2) = 1:PlaySound "rollover":End Sub
- Sub sw2_Timer:Me.TimerEnabled = 0:Controller.Switch(2) = 0:End Sub
- Sub sw4_Hit:Me.TimerEnabled = 1:Controller.Switch(4) = 1:PlaySound "rollover":End Sub
- Sub sw4_Timer:Me.TimerEnabled = 0:Controller.Switch(4) = 0:End Sub
- Sub sw7_Hit : vpmTimer.PulseSw 7:sw7.TimerEnabled = 1:sw7p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw7_Timer:Me.TimerEnabled = 0:sw7p.TransX = 0:End Sub
- Sub sw8_Hit : vpmTimer.PulseSw 8:sw8.TimerEnabled = 1:sw8p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw8_Timer:Me.TimerEnabled = 0:sw8p.TransX = 0:End Sub
- Sub sw9_Hit : vpmTimer.PulseSw 9:sw9.TimerEnabled = 1:sw9p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw9_Timer:Me.TimerEnabled = 0:sw9p.TransX = 0:End Sub
- 'Sub sw11_Hit : dtSingle.Hit 1:VengeanceHit 1:GI_AllOff 1000: End Sub
- Sub sw11_Hit : dtSingle.Hit 1:GI_AllOff 1000:End Sub
- Sub sw11t_Timer()
- sw11back.isdropped = sw11.isdropped
- End Sub
- Sub sw12_Spin:vpmTimer.PulseSw 12:PlaySound "spinner":End Sub 'left loop spinner
- Sub sw13_Hit:Me.TimerEnabled = 1:Controller.Switch(13) = 1:End Sub
- Sub sw13_Timer:Me.TimerEnabled = 0:Controller.Switch(13) = 0:End Sub
- Sub sw14_Hit:Me.TimerEnabled = 1:Controller.Switch(14) = 1:opto2.opacity = 0:OptoOnT.Enabled = 0:End Sub
- Sub sw14_Timer:Me.TimerEnabled = 0:Controller.Switch(14) = 0:opto2.opacity = 1000:OptoOnT.Enabled = 1:End Sub
- Dim BallInPlunger:BallInPlunger = False
- Sub sw23_Hit:Controller.Switch(23) = 1:BallInPlunger = True:PlaySound "rollover":End Sub
- Sub sw23_unHit:BallInPlunger = False:Controller.Switch(23) = 0:End Sub
- Sub sw24_Hit:Me.TimerEnabled = 1:Controller.Switch(24) = 1:PlaySound "rollover":End Sub
- Sub sw24_Timer:Me.TimerEnabled = 0:Controller.Switch(24) = 0:End Sub
- Sub sw25_Hit:Me.TimerEnabled = 1:Controller.Switch(25) = 1:PlaySound "rollover":End Sub
- Sub sw25_Timer:Me.TimerEnabled = 0:Controller.Switch(25) = 0:End Sub
- Sub sw28_Hit:Me.TimerEnabled = 1:Controller.Switch(28) = 1:PlaySound "rollover":End Sub
- Sub sw28_Timer:Me.TimerEnabled = 0:Controller.Switch(28) = 0:End Sub
- Sub sw29_Hit:Me.TimerEnabled = 1:Controller.Switch(29) = 1:PlaySound "rollover":End Sub
- Sub sw29_Timer:Me.TimerEnabled = 0:Controller.Switch(29) = 0:End Sub
- Sub sw33_Hit:Controller.Switch(33) = 1:opto9.opacity = 0:OptoOnT.Enabled = 0:End Sub
- Sub sw33_unHit:Controller.Switch(33) = 0:opto9.opacity = 1000:OptoOnT.Enabled = 1:End Sub
- Sub sw34_Hit:Me.TimerEnabled = 1:Controller.Switch(34) = 1:opto11.opacity = 0:OptoOnT.Enabled = 0:End Sub
- Sub sw34_Timer:Me.TimerEnabled = 0:Controller.Switch(34) = 0:opto11.opacity = 1000:OptoOnT.Enabled = 1:End Sub
- Sub sw35_Hit:Me.TimerEnabled = 1:Controller.Switch(35) = 1:opto3.opacity = 0:OptoOnT.Enabled = 0:End Sub
- Sub sw35_Timer:Me.TimerEnabled = 0:Controller.Switch(35) = 0:opto3.opacity = 1000:OptoOnT.Enabled = 1:End Sub
- Sub sw36_Hit:Me.TimerEnabled = 1:Controller.Switch(36) = 1:End Sub
- Sub sw36_Timer:Me.TimerEnabled = 0:Controller.Switch(36) = 0:End Sub
- Sub sw37_Hit:Me.TimerEnabled = 1:Controller.Switch(37) = 1:opto6.opacity = 0:OptoOnT.Enabled = 0:End Sub
- Sub sw37_Timer:Me.TimerEnabled = 0:Controller.Switch(37) = 0:opto6.opacity = 1000:OptoOnT.Enabled = 1:End Sub
- Sub sw38_Hit:Me.TimerEnabled = 1:Controller.Switch(38) = 1:opto7.opacity = 0:OptoOnT.Enabled = 0:End Sub
- Sub sw38_Timer:Me.TimerEnabled = 0:Controller.Switch(38) = 0:opto7.opacity = 1000:OptoOnT.Enabled = 1:End Sub
- Sub sw39_Hit : vpmTimer.PulseSw 39:sw39.TimerEnabled = 1:sw39p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw39_Timer:Me.TimerEnabled = 0:sw39p.TransX = 0:End Sub
- Sub sw40_Hit : vpmTimer.PulseSw 40:sw40.TimerEnabled = 1:sw40p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw40_Timer:Me.TimerEnabled = 0:sw40p.TransX = 0:End Sub
- Sub sw41_Hit : vpmTimer.PulseSw 41:sw41.TimerEnabled = 1:sw41p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw41_Timer:Me.TimerEnabled = 0:sw41p.TransX = 0:End Sub
- Sub sw42_Hit : vpmTimer.PulseSw 42:sw42.TimerEnabled = 1:sw42p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw42_Timer:Me.TimerEnabled = 0:sw42p.TransX = 0:End Sub
- Sub sw43_Hit : vpmTimer.PulseSw 43:sw43.TimerEnabled = 1:sw43p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw43_Timer:Me.TimerEnabled = 0:sw43p.TransX = 0:End Sub
- Sub sw44_Hit:Me.TimerEnabled = 1:Controller.Switch(44) = 1:PlaySound "rollover":End Sub
- Sub sw44_Timer:Me.TimerEnabled = 0:Controller.Switch(44) = 0:End Sub
- Sub sw45_Hit : vpmTimer.PulseSw 45:sw45.TimerEnabled = 1:sw45p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw45_Timer:Me.TimerEnabled = 0:sw45p.TransX = 0:End Sub
- Sub sw46_Hit : vpmTimer.PulseSw 46:sw46.TimerEnabled = 1:sw46p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw46_Timer:Me.TimerEnabled = 0:sw46p.TransX = 0:End Sub
- Sub sw47_Hit : vpmTimer.PulseSw 47:sw47.TimerEnabled = 1:sw47p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw47_Timer:Me.TimerEnabled = 0:sw47p.TransX = 0:End Sub
- Sub sw48_Hit : vpmTimer.PulseSw 48:sw48.TimerEnabled = 1:sw48p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw48_Timer:Me.TimerEnabled = 0:sw48p.TransX = 0:End Sub
- Sub sw49_Hit : vpmTimer.PulseSw 49:sw49.TimerEnabled = 1:sw49p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw49_Timer:Me.TimerEnabled = 0:sw49p.TransX = 0:End Sub
- Sub sw50_Hit : vpmTimer.PulseSw 50:sw50.TimerEnabled = 1:sw50p.TransX = -4: playsound SoundFX("target",DOFTargets): End Sub
- Sub sw50_Timer:Me.TimerEnabled = 0:sw50p.TransX = 0:End Sub
- Sub sw51_Hit:Me.TimerEnabled = 1:Controller.Switch(51) = 1:PlaySound "rollover":End Sub
- Sub sw51_Timer:Me.TimerEnabled = 0:Controller.Switch(51) = 0:End Sub
- Sub sw52_Hit:Me.TimerEnabled = 1:Controller.Switch(52) = 1:PlaySound "rollover":End Sub
- Sub sw52_Timer:Me.TimerEnabled = 0:Controller.Switch(52) = 0:End Sub
- Dim lastRGBDofColor
- Sub StarfleetRGBs_Timer()
- SetRGBLamp l1, Lampstate(84),Lampstate(85),Lampstate(86)
- SetRGBLamp l2, Lampstate(81),Lampstate(87),Lampstate(88)
- SetRGBLamp l3, Lampstate(83),Lampstate(82),Lampstate(89)
- SetRGBLamp l4, Lampstate(92),Lampstate(91),Lampstate(90)
- SetRGBLamp l5, Lampstate(93),Lampstate(94),Lampstate(95)
- SetRGBLamp l6, Lampstate(96),Lampstate(97),Lampstate(98)
- SetRGBLamp l7, Lampstate(99),Lampstate(100),Lampstate(101)
- SetRGBLamp l8, Lampstate(102),Lampstate(103),Lampstate(104)
- SetRGBLamp l9, Lampstate(113),Lampstate(114),Lampstate(115)
- SetRGBLamp l10, Lampstate(116),Lampstate(117),Lampstate(118)
- SetRGBLamp l11, Lampstate(119),Lampstate(120),Lampstate(121)
- SetRGBLamp l12, Lampstate(122),Lampstate(123),Lampstate(124)
- SetRGBLamp l13, Lampstate(125),Lampstate(126),Lampstate(127)
- SetRGBLamp l14, Lampstate(128),Lampstate(129),Lampstate(130)
- SetRGBLamp l15, Lampstate(131),Lampstate(133),Lampstate(132)
- SetRGBLamp l16, Lampstate(134),Lampstate(136),Lampstate(135)
- SetRGBLamp l17, Lampstate(146),Lampstate(147),Lampstate(148)
- SetRGBLamp l18, Lampstate(149),Lampstate(150),Lampstate(151)
- SetRGBLamp l19, Lampstate(152),Lampstate(153),Lampstate(154)
- SetRGBLamp l20, Lampstate(155),Lampstate(156),Lampstate(157)
- SetRGBLamp l21, Lampstate(158),Lampstate(159),Lampstate(160)
- SetRGBLamp l22, Lampstate(161),Lampstate(162),Lampstate(163)
- SetRGBLamp l23, Lampstate(164),Lampstate(165),Lampstate(166)
- SetRGBLamp l24, Lampstate(167),Lampstate(168),Lampstate(169)
- SetRGBLamp l25, Lampstate(170),Lampstate(171),Lampstate(172)
- SetRGBLamp l26, Lampstate(179),Lampstate(177),Lampstate(178)
- SetRGBLamp l27, Lampstate(182),Lampstate(180),Lampstate(181)
- SetRGBLamp l28, Lampstate(185),Lampstate(183),Lampstate(184)
- SetRGBLamp l29, Lampstate(186),Lampstate(187),Lampstate(188)
- SetRGBLamp l30, Lampstate(189),Lampstate(190),Lampstate(191)
- SetRGBLamp l31, Lampstate(192),Lampstate(193),Lampstate(194)
- SetRGBLamp l32, Lampstate(195),Lampstate(197),Lampstate(196)
- SetRGBLamp l33, Lampstate(198),Lampstate(200),Lampstate(199)
- SetRGBLamp l34, Lampstate(214),Lampstate(215),Lampstate(216)
- SetRGBLamp l35, Lampstate(211),Lampstate(217),Lampstate(218)
- SetRGBLamp l36, Lampstate(213),Lampstate(212),Lampstate(219)
- SetRGBLamp l37, Lampstate(222),Lampstate(221),Lampstate(220)
- SetRGBLamp l38, Lampstate(223),Lampstate(224),Lampstate(225)
- SetRGBLamp l39, Lampstate(226),Lampstate(227),Lampstate(228)
- SetRGBLamp l40, Lampstate(229),Lampstate(230),Lampstate(231)
- SetRGBLamp l41, Lampstate(232),Lampstate(233),Lampstate(234)
- SetRGBLamp l42, Lampstate(235),Lampstate(236),Lampstate(237)
- SetRGBLamp l43, Lampstate(238),Lampstate(239),Lampstate(240)
- SetRGBLamp l44, Lampstate(241),Lampstate(242),Lampstate(243)
- SetRGBLamp l45, Lampstate(244),Lampstate(245),Lampstate(246)
- SetRGBLamp l46, Lampstate(247),Lampstate(248),Lampstate(249)
- SetRGBLamp l47, Lampstate(250),Lampstate(251),Lampstate(252)
- SetRGBLamp l48, Lampstate(253),Lampstate(254),Lampstate(255)
- SetRGBLamp l49, Lampstate(256),Lampstate(257),Lampstate(258)
- SetRGBLamp l52, Lampstate(278),Lampstate(279),Lampstate(280)
- SetRGBLamp l53, Lampstate(281),Lampstate(283),Lampstate(282)
- SetRGBLamp l54, Lampstate(284),Lampstate(286),Lampstate(285)
- SetRGBLamp l55, Lampstate(287),Lampstate(289),Lampstate(288)
- SetRGBLamp l58, Lampstate(308),Lampstate(309),Lampstate(310)
- SetRGBLamp l59, Lampstate(311),Lampstate(312),Lampstate(313)
- SetRGBLamp l60, Lampstate(314),Lampstate(315),Lampstate(316)
- SetRGBLamp l61, Lampstate(317),Lampstate(319),Lampstate(318)
- SetRGBLamp l62, Lampstate(320),Lampstate(322),Lampstate(321)
- SetRGBLamp l63, Lampstate(300),Lampstate(302),Lampstate(301)
- SetRGBLamp l64, Lampstate(303),Lampstate(305),Lampstate(304)
- dim red, green, blue
- if Lampstate(303) <> 0 or Lampstate(305) <> 0 or Lampstate(304) <> 0 Then
- 'debug.print "R=" & Lampstate(303) & " G=" & Lampstate(305) & " B=" & Lampstate(304)
- If Lampstate(303) <> 0 Then
- If LampState(303) > 255 Then
- red = 800
- Else
- red = 700
- End If
- Else
- red = 600
- End If
- If Lampstate(305) <> 0 Then
- If LampState(305) > 255 Then
- green = 20
- Else
- green = 10
- End If
- Else
- green = 0
- End If
- If Lampstate(304) <> 0 Then
- If LampState(304) > 255 Then
- blue = 2
- Else
- blue = 1
- End If
- Else
- blue = 0
- End If
- end if
- 'If LampState(84) > 0 or LampState(85) > 0 or LampState(86) > 0 then l1.Color=RGB(Lampstate(84),Lampstate(85),Lampstate(86)):l1.Colorfull=RGB(Lampstate(84),Lampstate(85),Lampstate(86)):l1.State = 1
- 'If LampState(81) > 0 or LampState(87) > 0 or LampState(88) > 0 then l2.Color=RGB(Lampstate(81),Lampstate(87),Lampstate(88)):l2.Colorfull=RGB(Lampstate(81),Lampstate(87),Lampstate(88)):l2.State = 1
- 'If LampState(82) > 0 or LampState(83) > 0 or LampState(89) > 0 then l3.Color=RGB(Lampstate(83),Lampstate(82),Lampstate(89)):l3.Colorfull=RGB(Lampstate(83),Lampstate(82),Lampstate(89)):l3.State = 1
- 'If LampState(90) > 0 or LampState(91) > 0 or LampState(92) > 0 then l4.Color=RGB(Lampstate(92),Lampstate(91),Lampstate(90)):l4.Colorfull=RGB(Lampstate(92),Lampstate(91),Lampstate(90)):l4.State = 1
- 'If LampState(93) > 0 or LampState(94) > 0 or LampState(95) > 0 then l5.Color=RGB(Lampstate(93),Lampstate(94),Lampstate(95)):l5.Colorfull=RGB(Lampstate(93),Lampstate(94),Lampstate(95)):l5.State = 1
- 'If LampState(96) > 0 or LampState(97) > 0 or LampState(98) > 0 then l6.Color=RGB(Lampstate(96),Lampstate(97),Lampstate(98)):l6.Colorfull=RGB(Lampstate(96),Lampstate(97),Lampstate(98)):l6.State = 1
- 'If LampState(99) > 0 or LampState(100) > 0 or LampState(101) > 0 then l7.Color=RGB(Lampstate(99),Lampstate(100),Lampstate(101)):l7.Colorfull=RGB(Lampstate(99),Lampstate(100),Lampstate(101)):l7.State = 1
- 'If LampState(102) > 0 or LampState(103) > 0 or LampState(104) > 0 then l8.Color=RGB(Lampstate(102),Lampstate(103),Lampstate(104)):l8.Colorfull=RGB(Lampstate(102),Lampstate(103),Lampstate(104)):l8.State = 1
- 'If LampState(113) > 0 or LampState(114) > 0 or LampState(115) > 0 then l9.Color=RGB(Lampstate(113),Lampstate(114),Lampstate(115)):l9.Colorfull=RGB(Lampstate(113),Lampstate(114),Lampstate(115)):l9.State = 1
- 'If LampState(116) > 0 or LampState(117) > 0 or LampState(118) > 0 then l10.Color=RGB(Lampstate(116),Lampstate(117),Lampstate(118)):l10.Colorfull=RGB(Lampstate(116),Lampstate(117),Lampstate(118)):l10.State = 1
- 'If LampState(119) > 0 or LampState(120) > 0 or LampState(121) > 0 then l11.Color=RGB(Lampstate(119),Lampstate(120),Lampstate(121)):l11.Colorfull=RGB(Lampstate(119),Lampstate(120),Lampstate(121)):l11.State = 1
- 'If LampState(122) > 0 or LampState(123) > 0 or LampState(124) > 0 then l12.Color=RGB(Lampstate(122),Lampstate(123),Lampstate(124)):l12.Colorfull=RGB(Lampstate(122),Lampstate(123),Lampstate(124)):l12.State = 1
- 'If LampState(125) > 0 or LampState(126) > 0 or LampState(127) > 0 then l13.Color=RGB(Lampstate(125),Lampstate(126),Lampstate(127)):l13.Colorfull=RGB(Lampstate(125),Lampstate(126),Lampstate(127)):l13.State = 1
- 'If LampState(128) > 0 or LampState(129) > 0 or LampState(130) > 0 then l14.Color=RGB(Lampstate(128),Lampstate(129),Lampstate(130)):l14.Colorfull=RGB(Lampstate(128),Lampstate(129),Lampstate(130)):l14.State = 1
- 'If LampState(131) > 0 or LampState(132) > 0 or LampState(133) > 0 then l15.Color=RGB(Lampstate(131),Lampstate(133),Lampstate(132)):l15.Colorfull=RGB(Lampstate(131),Lampstate(133),Lampstate(132)):l15.State = 1
- 'If LampState(134) > 0 or LampState(135) > 0 or LampState(136) > 0 then l16.Color=RGB(Lampstate(134),Lampstate(136),Lampstate(135)):l16.Colorfull=RGB(Lampstate(134),Lampstate(136),Lampstate(135)):l16.State = 1
- 'If LampState(146) > 0 or LampState(147) > 0 or LampState(148) > 0 then l17.Color=RGB(Lampstate(146),Lampstate(147),Lampstate(148)):l17.Colorfull=RGB(Lampstate(146),Lampstate(147),Lampstate(148)):l17.State = 1
- 'If LampState(149) > 0 or LampState(150) > 0 or LampState(151) > 0 then l18.Color=RGB(Lampstate(149),Lampstate(150),Lampstate(151)):l18.Colorfull=RGB(Lampstate(149),Lampstate(150),Lampstate(151)):l18.State = 1
- 'If LampState(152) > 0 or LampState(153) > 0 or LampState(154) > 0 then l19.Color=RGB(Lampstate(152),Lampstate(153),Lampstate(154)):l19.Colorfull=RGB(Lampstate(152),Lampstate(153),Lampstate(154)):l19.State = 1
- 'If LampState(155) > 0 or LampState(156) > 0 or LampState(157) > 0 then l20.Color=RGB(Lampstate(155),Lampstate(156),Lampstate(157)):l20.Colorfull=RGB(Lampstate(155),Lampstate(156),Lampstate(157)):l20.State = 1
- 'If LampState(158) > 0 or LampState(159) > 0 or LampState(160) > 0 then l21.Color=RGB(Lampstate(158),Lampstate(159),Lampstate(160)):l21.Colorfull=RGB(Lampstate(158),Lampstate(159),Lampstate(160)):l21.State = 1
- 'If LampState(161) > 0 or LampState(162) > 0 or LampState(163) > 0 then l22.Color=RGB(Lampstate(161),Lampstate(162),Lampstate(163)):l22.Colorfull=RGB(Lampstate(161),Lampstate(162),Lampstate(163)):l22.State = 1
- 'If LampState(164) > 0 or LampState(165) > 0 or LampState(166) > 0 then l23.Color=RGB(Lampstate(164),Lampstate(165),Lampstate(166)):l23.Colorfull=RGB(Lampstate(164),Lampstate(165),Lampstate(166)):l23.State = 1
- 'If LampState(167) > 0 or LampState(168) > 0 or LampState(169) > 0 then l24.Color=RGB(Lampstate(167),Lampstate(168),Lampstate(169)):l24.Colorfull=RGB(Lampstate(167),Lampstate(168),Lampstate(169)):l24.State = 1
- 'If LampState(170) > 0 or LampState(171) > 0 or LampState(172) > 0 then l25.Color=RGB(Lampstate(170),Lampstate(171),Lampstate(172)):l25.Colorfull=RGB(Lampstate(170),Lampstate(171),Lampstate(172)):l25.State = 1
- 'If LampState(177) > 0 or LampState(178) > 0 or LampState(179) > 0 then l26.Color=RGB(Lampstate(179),Lampstate(177),Lampstate(178)):l26.Colorfull=RGB(Lampstate(179),Lampstate(177),Lampstate(178)):l26.State = 1
- 'If LampState(180) > 0 or LampState(181) > 0 or LampState(182) > 0 then l27.Color=RGB(Lampstate(182),Lampstate(180),Lampstate(181)):l27.Colorfull=RGB(Lampstate(182),Lampstate(180),Lampstate(181)):l27.State = 1
- 'If LampState(183) > 0 or LampState(184) > 0 or LampState(185) > 0 then l28.Color=RGB(Lampstate(185),Lampstate(183),Lampstate(184)):l28.Colorfull=RGB(Lampstate(185),Lampstate(183),Lampstate(184)):l28.State = 1
- 'If LampState(186) > 0 or LampState(187) > 0 or LampState(188) > 0 then l29.Color=RGB(Lampstate(186),Lampstate(187),Lampstate(188)):l29.Colorfull=RGB(Lampstate(186),Lampstate(187),Lampstate(188)):l29.State = 1
- 'If LampState(189) > 0 or LampState(190) > 0 or LampState(191) > 0 then l30.Color=RGB(Lampstate(189),Lampstate(190),Lampstate(191)):l30.Colorfull=RGB(Lampstate(189),Lampstate(190),Lampstate(191)):l30.State = 1
- 'If LampState(192) > 0 or LampState(193) > 0 or LampState(194) > 0 then l31.Color=RGB(Lampstate(192),Lampstate(193),Lampstate(194)):l31.Colorfull=RGB(Lampstate(192),Lampstate(193),Lampstate(194)):l31.State = 1
- 'If LampState(195) > 0 or LampState(196) > 0 or LampState(197) > 0 then l32.Color=RGB(Lampstate(195),Lampstate(197),Lampstate(196)):l32.Colorfull=RGB(Lampstate(195),Lampstate(197),Lampstate(196)):l32.State = 1
- 'If LampState(198) > 0 or LampState(199) > 0 or LampState(200) > 0 then l33.Color=RGB(Lampstate(198),Lampstate(200),Lampstate(199)):l33.Colorfull=RGB(Lampstate(198),Lampstate(200),Lampstate(199)):l33.State = 1
- 'If LampState(214) > 0 or LampState(215) > 0 or LampState(216) > 0 then l34.Color=RGB(Lampstate(214),Lampstate(215),Lampstate(216)):l34.Colorfull=RGB(Lampstate(214),Lampstate(215),Lampstate(216)):l34.State = 1
- 'If LampState(211) > 0 or LampState(217) > 0 or LampState(218) > 0 then l35.Color=RGB(Lampstate(211),Lampstate(217),Lampstate(218)):l35.Colorfull=RGB(Lampstate(211),Lampstate(217),Lampstate(218)):l35.State = 1
- 'If LampState(212) > 0 or LampState(213) > 0 or LampState(219) > 0 then l36.Color=RGB(Lampstate(213),Lampstate(212),Lampstate(219)):l36.Colorfull=RGB(Lampstate(213),Lampstate(212),Lampstate(219)):l36.State = 1
- 'If LampState(220) > 0 or LampState(221) > 0 or LampState(222) > 0 then l37.Color=RGB(Lampstate(222),Lampstate(221),Lampstate(220)):l37.Colorfull=RGB(Lampstate(222),Lampstate(221),Lampstate(220)):l37.State = 1
- 'If LampState(223) > 0 or LampState(224) > 0 or LampState(225) > 0 then l38.Color=RGB(Lampstate(223),Lampstate(224),Lampstate(225)):l38.Colorfull=RGB(Lampstate(223),Lampstate(224),Lampstate(225)):l38.State = 1
- 'If LampState(226) > 0 or LampState(227) > 0 or LampState(228) > 0 then l39.Color=RGB(Lampstate(226),Lampstate(227),Lampstate(228)):l39.Colorfull=RGB(Lampstate(226),Lampstate(227),Lampstate(228)):l39.State = 1
- 'If LampState(229) > 0 or LampState(230) > 0 or LampState(231) > 0 then l40.Color=RGB(Lampstate(229),Lampstate(230),Lampstate(231)):l40.Colorfull=RGB(Lampstate(229),Lampstate(230),Lampstate(231)):l40.State = 1
- 'If LampState(232) > 0 or LampState(233) > 0 or LampState(234) > 0 then l41.Color=RGB(Lampstate(232),Lampstate(233),Lampstate(234)):l41.Colorfull=RGB(Lampstate(232),Lampstate(233),Lampstate(234)):l41.State = 1
- 'If LampState(235) > 0 or LampState(236) > 0 or LampState(237) > 0 then l42.Color=RGB(Lampstate(235),Lampstate(236),Lampstate(237)):l42.Colorfull=RGB(Lampstate(235),Lampstate(236),Lampstate(237)):l42.State = 1
- 'If LampState(238) > 0 or LampState(239) > 0 or LampState(240) > 0 then l43.Color=RGB(Lampstate(238),Lampstate(239),Lampstate(240)):l43.Colorfull=RGB(Lampstate(238),Lampstate(239),Lampstate(240)):l43.State = 1
- 'If LampState(241) > 0 or LampState(242) > 0 or LampState(243) > 0 then l44.Color=RGB(Lampstate(241),Lampstate(242),Lampstate(243)):l44.Colorfull=RGB(Lampstate(241),Lampstate(242),Lampstate(243)):l44.State = 1
- 'If LampState(244) > 0 or LampState(245) > 0 or LampState(246) > 0 then l45.Color=RGB(Lampstate(244),Lampstate(245),Lampstate(246)):l45.Colorfull=RGB(Lampstate(244),Lampstate(245),Lampstate(246)):l45.State = 1
- 'If LampState(247) > 0 or LampState(248) > 0 or LampState(249) > 0 then l46.Color=RGB(Lampstate(247),Lampstate(248),Lampstate(249)):l46.Colorfull=RGB(Lampstate(247),Lampstate(248),Lampstate(249)):l46.State = 1
- 'If LampState(250) > 0 or LampState(251) > 0 or LampState(252) > 0 then l47.Color=RGB(Lampstate(250),Lampstate(251),Lampstate(252)):l47.Colorfull=RGB(Lampstate(250),Lampstate(251),Lampstate(252)):l47.State = 1
- 'If LampState(253) > 0 or LampState(254) > 0 or LampState(255) > 0 then l48.Color=RGB(Lampstate(253),Lampstate(254),Lampstate(255)):l48.Colorfull=RGB(Lampstate(253),Lampstate(254),Lampstate(255)):l48.State = 1
- 'If LampState(256) > 0 or LampState(257) > 0 or LampState(258) > 0 then l49.Color=RGB(Lampstate(256),Lampstate(257),Lampstate(258)):l49.Colorfull=RGB(Lampstate(256),Lampstate(257),Lampstate(258)):l49.State = 1
- 'If LampState(278) > 0 or LampState(279) > 0 or LampState(280) > 0 then l52.Color=RGB(Lampstate(278),Lampstate(279),Lampstate(280)):l52.Colorfull=RGB(Lampstate(278),Lampstate(279),Lampstate(280)):l52.State = 1
- 'If LampState(281) > 0 or LampState(282) > 0 or LampState(283) > 0 then l53.Color=RGB(Lampstate(281),Lampstate(282),Lampstate(283)):l53.Colorfull=RGB(Lampstate(281),Lampstate(282),Lampstate(283)):l53.State = 1
- 'If LampState(284) > 0 or LampState(285) > 0 or LampState(286) > 0 then l54.Color=RGB(Lampstate(284),Lampstate(285),Lampstate(286)):l54.Colorfull=RGB(Lampstate(284),Lampstate(285),Lampstate(286)):l54.State = 1
- 'If LampState(287) > 0 or LampState(288) > 0 or LampState(289) > 0 then l55.Color=RGB(Lampstate(287),Lampstate(288),Lampstate(289)):l55.Colorfull=RGB(Lampstate(287),Lampstate(288),Lampstate(289)):l55.State = 1
- 'If LampState(308) > 0 or LampState(309) > 0 or LampState(310) > 0 then l58.Color=RGB(Lampstate(308),Lampstate(309),Lampstate(310)):l58.Colorfull=RGB(Lampstate(308),Lampstate(309),Lampstate(310)):l58.State = 1
- 'If LampState(311) > 0 or LampState(312) > 0 or LampState(313) > 0 then l59.Color=RGB(Lampstate(311),Lampstate(312),Lampstate(313)):l59.Colorfull=RGB(Lampstate(311),Lampstate(312),Lampstate(313)):l59.State = 1
- 'If LampState(314) > 0 or LampState(315) > 0 or LampState(316) > 0 then l60.Color=RGB(Lampstate(314),Lampstate(315),Lampstate(316)):l60.Colorfull=RGB(Lampstate(314),Lampstate(315),Lampstate(316)):l60.State = 1
- 'If LampState(317) > 0 or LampState(318) > 0 or LampState(319) > 0 then l61.Color=RGB(Lampstate(317),Lampstate(319),Lampstate(318)):l61.Colorfull=RGB(Lampstate(317),Lampstate(319),Lampstate(318)):l61.State = 1
- 'If LampState(320) > 0 or LampState(321) > 0 or LampState(322) > 0 then l62.Color=RGB(Lampstate(320),Lampstate(322),Lampstate(321)):l62.Colorfull=RGB(Lampstate(320),Lampstate(322),Lampstate(321)):l62.State = 1
- 'If LampState(300) > 0 or LampState(301) > 0 or LampState(302) > 0 then l63.Color=RGB(Lampstate(300),Lampstate(301),Lampstate(302)):l63.Colorfull=RGB(Lampstate(300),Lampstate(301),Lampstate(302)):l63.State = 1
- 'If LampState(303) > 0 or LampState(304) > 0 or LampState(305) > 0 then l64.Color=RGB(Lampstate(303),Lampstate(304),Lampstate(305)):l64.Colorfull=RGB(Lampstate(303),Lampstate(304),Lampstate(305)):l64.State = 1
- 'If LampState(84) = 0 and LampState(85) = 0 and LampState(86) = 0 then l1.State = 0
- 'If LampState(81) = 0 and LampState(87) = 0 and LampState(88) = 0 then l2.State = 0
- 'If LampState(82) = 0 and LampState(83) = 0 and LampState(89) = 0 then l3.State = 0
- 'If LampState(90) = 0 and LampState(91) = 0 and LampState(92) = 0 then l4.State = 0
- 'If LampState(93) = 0 and LampState(94) = 0 and LampState(95) = 0 then l5.State = 0
- 'If LampState(96) = 0 and LampState(97) = 0 and LampState(98) = 0 then l6.State = 0
- 'If LampState(99) = 0 and LampState(100) = 0 and LampState(101) = 0 then l7.State = 0
- 'If LampState(102) = 0 and LampState(103) = 0 and LampState(104) = 0 then l8.State = 0
- 'If LampState(113) = 0 and LampState(114) = 0 and LampState(115) = 0 then l9.State = 0
- 'If LampState(116) = 0 and LampState(117) = 0 and LampState(118) = 0 then l10.State = 0
- 'If LampState(119) = 0 and LampState(120) = 0 and LampState(121) = 0 then l11.State = 0
- 'If LampState(122) = 0 and LampState(123) = 0 and LampState(124) = 0 then l12.State = 0
- 'If LampState(125) = 0 and LampState(126) = 0 and LampState(127) = 0 then l13.State = 0
- 'If LampState(128) = 0 and LampState(129) = 0 and LampState(130) = 0 then l14.State = 0
- 'If LampState(131) = 0 and LampState(132) = 0 and LampState(133) = 0 then l15.State = 0
- 'If LampState(134) = 0 and LampState(135) = 0 and LampState(136) = 0 then l16.State = 0
- 'If LampState(146) = 0 and LampState(147) = 0 and LampState(148) = 0 then l17.State = 0
- 'If LampState(149) = 0 and LampState(150) = 0 and LampState(151) = 0 then l18.State = 0
- 'If LampState(152) = 0 and LampState(153) = 0 and LampState(154) = 0 then l19.State = 0
- 'If LampState(155) = 0 and LampState(156) = 0 and LampState(157) = 0 then l20.State = 0
- 'If LampState(158) = 0 and LampState(159) = 0 and LampState(160) = 0 then l21.State = 0
- 'If LampState(161) = 0 and LampState(162) = 0 and LampState(163) = 0 then l22.State = 0
- 'If LampState(164) = 0 and LampState(165) = 0 and LampState(166) = 0 then l23.State = 0
- 'If LampState(167) = 0 and LampState(168) = 0 and LampState(169) = 0 then l24.State = 0
- 'If LampState(170) = 0 and LampState(171) = 0 and LampState(172) = 0 then l25.State = 0
- 'If LampState(177) = 0 and LampState(178) = 0 and LampState(179) = 0 then l26.State = 0
- 'If LampState(180) = 0 and LampState(181) = 0 and LampState(182) = 0 then l27.State = 0
- 'If LampState(183) = 0 and LampState(184) = 0 and LampState(185) = 0 then l28.State = 0
- 'If LampState(186) = 0 and LampState(187) = 0 and LampState(188) = 0 then l29.State = 0
- 'If LampState(189) = 0 and LampState(190) = 0 and LampState(191) = 0 then l30.State = 0
- 'If LampState(192) = 0 and LampState(193) = 0 and LampState(194) = 0 then l31.State = 0
- 'If LampState(195) = 0 and LampState(196) = 0 and LampState(197) = 0 then l32.State = 0
- 'If LampState(198) = 0 and LampState(199) = 0 and LampState(200) = 0 then l33.State = 0
- 'If LampState(214) = 0 and LampState(215) = 0 and LampState(216) = 0 then l34.State = 0
- 'If LampState(211) = 0 and LampState(217) = 0 and LampState(218) = 0 then l35.State = 0
- 'If LampState(212) = 0 and LampState(213) = 0 and LampState(219) = 0 then l36.State = 0
- 'If LampState(220) = 0 and LampState(221) = 0 and LampState(222) = 0 then l37.State = 0
- 'If LampState(223) = 0 and LampState(224) = 0 and LampState(225) = 0 then l38.State = 0
- 'If LampState(226) = 0 and LampState(227) = 0 and LampState(228) = 0 then l39.State = 0
- 'If LampState(229) = 0 and LampState(230) = 0 and LampState(231) = 0 then l40.State = 0
- 'If LampState(232) = 0 and LampState(233) = 0 and LampState(234) = 0 then l41.State = 0
- 'If LampState(235) = 0 and LampState(236) = 0 and LampState(237) = 0 then l42.State = 0
- 'If LampState(238) = 0 and LampState(239) = 0 and LampState(240) = 0 then l43.State = 0
- 'If LampState(241) = 0 and LampState(242) = 0 and LampState(243) = 0 then l44.State = 0
- 'If LampState(244) = 0 and LampState(245) = 0 and LampState(246) = 0 then l45.State = 0
- 'If LampState(247) = 0 and LampState(248) = 0 and LampState(249) = 0 then l46.State = 0
- 'If LampState(250) = 0 and LampState(251) = 0 and LampState(252) = 0 then l47.State = 0
- 'If LampState(253) = 0 and LampState(254) = 0 and LampState(255) = 0 then l48.State = 0
- 'If LampState(256) = 0 and LampState(257) = 0 and LampState(258) = 0 then l49.State = 0
- 'If LampState(278) = 0 and LampState(279) = 0 and LampState(280) = 0 then l52.State = 0
- 'If LampState(281) = 0 and LampState(282) = 0 and LampState(283) = 0 then l53.State = 0
- 'If LampState(284) = 0 and LampState(285) = 0 and LampState(286) = 0 then l54.State = 0
- 'If LampState(287) = 0 and LampState(288) = 0 and LampState(289) = 0 then l55.State = 0
- 'If LampState(308) = 0 and LampState(309) = 0 and LampState(310) = 0 then l58.State = 0
- 'If LampState(311) = 0 and LampState(312) = 0 and LampState(313) = 0 then l59.State = 0
- 'If LampState(314) = 0 and LampState(315) = 0 and LampState(316) = 0 then l60.State = 0
- 'If LampState(317) = 0 and LampState(318) = 0 and LampState(319) = 0 then l61.State = 0
- 'If LampState(320) = 0 and LampState(321) = 0 and LampState(322) = 0 then l62.State = 0
- 'If LampState(300) = 0 and LampState(301) = 0 and LampState(302) = 0 then l63.State = 0
- 'If LampState(303) = 0 and LampState(304) = 0 and LampState(305) = 0 then l64.State = 0
- 'If LampState(78) = 0 then l66.State = 0
- 'If LampState(77) = 0 then l67.State = 0
- 'If LampState(76) = 0 then l68.State = 0
- 'If LampState(78) > 0 then l66.State = 1
- 'If LampState(77) > 0 then l67.State = 1
- 'If LampState(76) > 0 then l68.State = 1
- 'l80.state = LampState(277)
- r53.Color = l53.Color
- r54.Color = l54.Color
- r55.Color = l55.Color
- 'Light.color=RGB(r,g,b)
- l80.Intensity = LampState(277) / 10
- l50.Intensity = LampState(276) / 15
- f80.Opacity = LampState(277) * 10
- l50f.Opacity = LampState(276) * 1000
- End Sub
- 'RGBLamp 1, 84, 85, 86
- 'Sub RGBLamp (MLamp, VPMLampR, VPMLampG, VPMLampB)
- ' If ChgLamp(VPMLampR, 1) = 1 then RGBRed = 255 else RGBRed = 0
- ' If ChgLamp(VPMLampG, 1) = 1 then RGBGreen = 255 else RGBGreen = 0
- ' If ChgLamp(VPMLampB, 1) = 1 then RGBBlue = 255 else RGBBlue = 0
- ' MLamp.color=RGB(RGBRed,RGBGreen,RGBBlue):MLamp.State = 1
- '
- ' 'MsgBox "Sub " & MyLight.Name & "_Timer : " & MyLight.name & ".State="& MyLight.name & ".UserValue: "& MyLight.name & ".TimerEnabled=False: End Sub"
- ' ExecuteGlobal "Sub " & MLamp.Name & "_Timer : " & MLamp.name & ".State="& MLamp.name & ".UserValue: "& MLamp.name & ".TimerEnabled=False: End Sub"
- 'End Sub
- 'Dim RGBLamp(100)
- Dim FadingLevel(360), FadingState(360)
- Dim FlashState(360), FlashLevel(360)
- Dim FlashSpeedUp, FlashSpeedDown
- 'Dim x
- 'AllLampsOff()
- 'LampTimer.Interval = 35 'lamp fading speed
- 'LampTimer.Enabled = 1
- '
- FlashInit()
- FlasherTimer.Interval = 10 'flash fading speed
- FlasherTimer.Enabled = 1
- '' Lamp & Flasher Timers
- 'Sub LampTimer_Timer()
- ' Dim chgLamp, num, chg, ii
- ' chgLamp = Controller.ChangedLamps
- ' If Not IsEmpty(chgLamp) Then
- ' For ii = 0 To UBound(chgLamp)
- ' LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
- ' FadingLevel(chgLamp(ii, 0) ) = chgLamp(ii, 1) + 4
- ' FlashState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
- ' If GIColorMode = 1 and GI_Light.State = 1 Then 'If GI Color changing mode enabled and GI lights are on
- ' Select Case chgLamp(ii, 0) 'Check if GI light needs to be changed
- ' Case 9
- ' If chgLamp(ii, 1) = 1 then red = 0:green = 0:blue = 255 : GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- ' Case 15
- ' If chgLamp(ii, 1) = 1 then red = 255:green = 0:blue = 0 : GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- ' Case 10
- ' If chgLamp(ii, 1) = 1 then red = 255:green = 255:blue = 0: GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- ' Case 14
- ' If chgLamp(ii, 1) = 1 then red = 0:green = 255:blue = 255 : GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- ' Case 16
- ' If chgLamp(ii, 1) = 1 then red = 128:green = 0:blue = 128: GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- ' Case 11
- ' If chgLamp(ii, 1) = 1 then red = 0:green = 255:blue = 0 : GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- ' End Select
- ' End If
- ' If BallInPlunger = 0 Then 'if ball is not in plunger lane
- ' Select Case chgLamp(ii, 0)
- ' Case 3
- ' If chgLamp(ii, 1) = 1 then FireButtonFlag = 1: FireButtonTimeoutTimer.Enabled= 0: FireButtonTimeoutTimer.Enabled = 1
- ' End Select
- ' End If
- ' Next
- ' End If
- '
- ' UpdateLamps
- 'End
- Dim LampState(400)
- '
- 'AllLampsOff()
- 'LampTimer.Interval = 35
- 'LampTimer.Enabled = 1
- '
- 'Sub LampTimer_Timer()
- ' Dim chgLamp, ii
- ' chgLamp = Controller.ChangedLamps
- ' If Not IsEmpty(chgLamp) Then
- ' For ii = 0 To UBound(chgLamp)
- '
- ' LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
- '
- ' 'Print Light state changes
- ' debug.print "Lamp " & chgLamp(ii, 0) & ": " & chgLamp(ii, 1)
- '
- '
- ' Next
- ' End If
- ' UpdateLamps
- 'End Sub
- '
- 'Sub AllLampsOff()
- ' On Error Resume Next
- '
- ' Dim x
- ' For x = 0 to 360
- ' LampState(x) = 0
- ' Next
- '
- ' UpdateLamps:UpdateLamps:Updatelamps
- 'End Sub
- '
- 'Sub SetLamp(nr, value)
- ' If value <> LampState(nr) Then
- ' LampState(nr) = abs(value)
- ' End If
- 'End Sub
- '
- Sub FireButtonTimeoutTimer_Timer
- FireButtonFlag = 0
- FireButtonTimeoutTimer.Enabled= 0
- End Sub
- GISetDefaultColorTimer.Interval = 1000
- Sub GISetDefaultColorTimer_Timer 'If timer expires, no mode is running so set defaultGIcolor
- If GI_Light.State = 1 Then
- red = 0:green = 0:blue = 255
- End If
- GISetDefaultColorTimer.Enabled = 0
- End Sub
- Sub FlashInit
- Dim i
- For i = 0 to 200
- FlashState(i) = 0
- FlashLevel(i) = 0
- Next
- FlashSpeedUp = 50 ' fast speed when turning on the flasher
- FlashSpeedDown = 35 ' slow speed when turning off the flasher, gives a smooth fading
- AllFlashOff()
- End Sub
- Sub AllFlashOff
- Dim i
- For i = 0 to 360
- FlashState(i) = 0
- Next
- End Sub
- Sub Reflections_Timer()
- If l53.State = 1 then r53.Opacity = 20 else r53.Opacity = 0
- If l54.State = 1 then r54.Opacity = 20 else r54.Opacity = 0
- If l55.State = 1 then r55.Opacity = 20 else r55.Opacity = 0
- ' If f29.opacity = 0 then sw12p.image = "spinnert4"
- ' If f29.opacity >= 1 and f29.opacity <= 20 then sw12p.image = "spinnert4_20"
- ' If f29.opacity >= 21 and f29.opacity <= 40 then sw12p.image = "spinnert4_40"
- ' If f29.opacity >= 41 and f29.opacity <= 60 then sw12p.image = "spinnert4_60"
- ' If f29.opacity >= 61 and f29.opacity <= 80 then sw12p.image = "spinnert4_80"
- ' If f29.opacity >= 81 then sw12p.image = "spinnert4_100"
- End Sub
- 'Dim LampState(400)
- AllLampsOff()
- LampTimer.Interval = 35
- LampTimer.Enabled = 1
- Sub LampTimer_Timer()
- Dim chgLamp, ii
- chgLamp = Controller.ChangedLamps
- If Not IsEmpty(chgLamp) Then
- For ii = 0 To UBound(chgLamp)
- LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1) * 2
- 'Print Light state changes
- 'debug.print "Lamp " & chgLamp(ii, 0) & ": " & chgLamp(ii, 1)
- 'LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
- FadingLevel(chgLamp(ii, 0) ) = chgLamp(ii, 1) + 4
- FlashState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
- If GIColorMode = 1 and GI_Light.State = 1 Then 'If GI Color changing mode enabled and GI lights are on
- Select Case chgLamp(ii, 0) 'Check if GI light needs to be changed
- Case 9
- If chgLamp(ii, 1) = 1 then red = 0:green = 0:blue = 255 : GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- Case 15
- If chgLamp(ii, 1) = 1 then red = 255:green = 0:blue = 0 : GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- Case 10
- If chgLamp(ii, 1) = 1 then red = 255:green = 255:blue = 0: GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- Case 14
- If chgLamp(ii, 1) = 1 then red = 0:green = 255:blue = 255 : GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- Case 16
- If chgLamp(ii, 1) = 1 then red = 128:green = 0:blue = 128: GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- Case 11
- If chgLamp(ii, 1) = 1 then red = 0:green = 255:blue = 0 : GISetDefaultColorTimer.enabled = 0: GISetDefaultColorTimer.enabled = 1
- End Select
- End If
- If BallInPlunger = 0 Then 'if ball is not in plunger lane
- Select Case chgLamp(ii, 0)
- Case 3
- If chgLamp(ii, 1) = 1 then FireButtonFlag = 1: FireButtonTimeoutTimer.Enabled= 0: FireButtonTimeoutTimer.Enabled = 1
- End Select
- End If
- Next
- End If
- UpdateLamps
- End Sub
- Sub AllLampsOff()
- On Error Resume Next
- Dim x
- For x = 0 to 360
- LampState(x) = 0
- Next
- UpdateLamps:UpdateLamps:Updatelamps
- End Sub
- Sub SetRGBLamp(Lamp, R, G, B)
- 'dim IntensityValue
- 'IntensityValue = .2126 * R + .7152 * G + .0722 * B
- Lamp.Color = RGB(R, G, B)
- Lamp.ColorFull = RGB(R, G, B)
- 'Lamp.Intensity = IntensityValue *100 / 255
- Lamp.State = 1
- End Sub
- 'Sub SetLamp(nr, value)
- ' If value <> LampState(nr) Then
- ' LampState(nr) = abs(value)
- ' End If
- 'End Sub
- Sub UpdateLamps()
- ' NFadeL 3, l3
- ' NFadeL 4, l4
- ' NFadeL 5, l5
- ' NFadeL 7, l7
- ' NFadeL 8, l8
- ' NFadeL 9, l9
- ' NFadeL 10, l10
- ' NFadeL 11, l11
- ' NFadeL 12, l12
- ' NFadeL 13, l13
- ' NFadeL 14, l14
- ' NFadeL 15, l15
- ' NFadeL 16, l16
- ' NFadeL 17, l17
- ' NFadeL 18, l18
- ' NFadeL 19, l19
- ' NFadeL 20, l20
- ' NFadeL 21, l21
- ' NFadeL 22, l22
- ' NFadeL 23, l23
- ' NFadeL 24, l24
- ' NFadeL 32, l32
- ' NFadeL 40, l40
- ' NFadeL 48, l48
- ' NFadeL 49, l49
- ' NFadeL 50, l50
- ' NFadeL 51, l51
- ' NFadeL 52, l52
- ' NFadeL 53, l53
- ' NFadeL 54, l54
- ' NFadeL 55, l55
- ' NFadeL 56, l56
- ' NFadeL 57, l57
- ' NFadeL 59, l59
- ' NFadeL 60, l60
- ' NFadeL 61, l61
- ' NFadeL 62, l62
- ' NFadeL 63, l63
- ' NFadeL 64, l64
- ' NFadeL 65, l65
- ' NFadeL 66, l66
- ' NFadeL 67, l67
- ' NFadeL 68, l68
- ' NFadeL 69, l69
- ' NFadeL 70, l70
- ' NFadeL 71, l71
- ' NFadeL 72, l72
- ' NFadeL 73, l73
- ' NFadeL 74, l74
- ' NFadeL 75, l75
- ' NFadeL 76, l76
- NFadeLm 50, PhaseLE
- NFadeL 50, PhaseRE
- NFadeLm 51, PhaseL1
- NFadeL 51, PhaseR1
- NFadeLm 52, PhaseL2
- NFadeL 52, PhaseR2
- NFadeLm 53, PhaseL3
- NFadeL 53, PhaseR3
- NFadeLm 54, PhaseL4
- NFadeL 54, PhaseR4
- NFadeLm 55, PhaseL5
- NFadeL 55, PhaseR5
- NFadeLm 56, PhaseL6
- NFadeL 56, PhaseR6
- NFadeLm 57, PhaseL7
- NFadeL 57, PhaseR7
- NFadeLm 58, PhaseL8
- NFadeL 58, PhaseR8
- NFadeLm 59, PhaseL9
- NFadeL 59, PhaseR9
- NFadeLm 60, PhaseL10
- NFadeL 60, PhaseR10
- NFadeLm 61, PhaseL11
- NFadeL 61, PhaseR11
- NFadeLm 62, PhaseL12
- NFadeL 62, PhaseR12
- NFadeLm 63, PhaseL13
- NFadeL 63, PhaseR13
- NFadeLm 64, PhaseL14
- NFadeL 64, PhaseR14
- NFadeLm 65, PhaseL15
- NFadeL 65, PhaseR15
- NFadeLm 66, PhaseL16
- NFadeL 66, PhaseR16
- NFadeLm 67, PhaseL17
- NFadeL 67, PhaseR17
- NFadeLm 68, PhaseL18
- NFadeL 68, PhaseR18
- NFadeLm 69, PhaseL19
- NFadeL 69, PhaseR19
- NFadeLm 70, PhaseL20
- NFadeL 70, PhaseR20
- NFadeLm 71, PhaseL21
- NFadeL 71, PhaseR21
- NFadeLm 72, PhaseL22
- NFadeL 72, PhaseR22
- 'NFadeL 277, l80
- NFadeL 358, f18
- NFadeLm 339, f119a
- NFadeLm 339, f119b
- NFadeL 339, f119c
- NFadeLm 340, f120a
- NFadeLm 340, f120b
- NFadeL 340, f120c
- NFadeLm 349, f129a
- NFadeL 349, Light42
- 'NFadeL 276, l50
- NFadeL 295, l70
- NFadeL 292, l71
- NFadeL 293, l72
- NFadeL 294, l73
- NFadeL 299, l74
- NFadeL 296, l75
- NFadeL 297, l76
- NFadeL 298, l77
- NFadeL 326, f26
- NFadeL 357, f17
- NFadeL 327, f27
- NFadeL 332, f32
- NFadeL 341, f41
- NFadeLm 331, VengFlashGI
- NFadeL 331, vengeancespot
- NFadeL 328, f28
- NFadeL 333, f23
- NFadeL 342, f21
- NFadeL 325, f25
- NFadeL 330, f30
- 'NFadeL 277, l80
- End Sub
- 'Sub FadePrim(nr, pri, a, b, c, d)
- ' Select Case FadingLevel(nr)
- ' Case 2:pri.image = d:FadingLevel(nr) = 0
- ' Case 3:pri.image = c:FadingLevel(nr) = 1
- ' Case 4:pri.image = b:FadingLevel(nr) = 2
- ' Case 5:pri.image = a:FadingLevel(nr) = 3
- ' End Select
- 'End Sub
- '
- '''Lights
- '
- 'Sub FadeL(nr, a, b)
- ' Select Case FadingLevel(nr)
- ' Case 2:b.state = 0:FadingLevel(nr) = 0
- ' Case 3:b.state = 1:FadingLevel(nr) = 2
- ' Case 4:a.state = 0:FadingLevel(nr) = 3
- ' Case 5:a.state = 1:FadingLevel(nr) = 1
- ' End Select
- 'End Sub
- '
- Sub NFadeL(nr, a)
- Select Case FadingLevel(nr)
- Case 4:a.state = 0:FadingLevel(nr) = 0
- Case 5:a.State = 1:FadingLevel(nr) = 1
- End Select
- End Sub
- Sub NFadeLm(nr, a)
- Select Case FadingLevel(nr)
- Case 4:a.state = 0
- Case 5:a.State = 1
- End Select
- End Sub
- '
- '' Flasher objects
- '' Uses own faster timer
- '
- Sub Flash(nr, object)
- Select Case FlashState(nr)
- Case 0 'off
- FlashLevel(nr) = FlashLevel(nr) - FlashSpeedDown
- If FlashLevel(nr) < 0 Then
- FlashLevel(nr) = 0
- FlashState(nr) = -1 'completely off
- End if
- Object.opacity = FlashLevel(nr)
- Case 1 ' on
- FlashLevel(nr) = FlashLevel(nr) + FlashSpeedUp
- If FlashLevel(nr) > 1000 Then
- FlashLevel(nr) = 1000
- FlashState(nr) = -2 'completely on
- End if
- Object.opacity = FlashLevel(nr)
- End Select
- End Sub
- Sub Flashm(nr, object) 'multiple flashers, it doesn't change the flashstate
- Select Case FlashState(nr)
- Case 0 'off
- Object.opacity = FlashLevel(nr)
- Case 1 ' on
- Object.opacity = FlashLevel(nr)
- End Select
- End Sub
- 'Sub AllLampsOff()On Error Resume Next:Dim x:For x = 0 to 360:LampState(x) = 0:FadingLevel(x) = 4:Next:UpdateLamps:UpdateLamps:Updatelamps:End Sub
- Sub SetLamp(nr, value)
- If value = 0 AND LampState(nr) = 0 Then Exit Sub
- If value = 1 AND LampState(nr) = 1 Then Exit Sub
- LampState(nr) = abs(value) + 4
- FadingLevel(nr ) = abs(value) + 4: FadingState(nr ) = abs(value) + 4
- End Sub
- Sub SetFlash(nr, stat)
- FlashState(nr) = ABS(stat)
- End Sub
- '
- Sub FlasherTimer_Timer()
- Flash 3, fire
- '
- Flash 277, f80
- Flash 119, f119
- Flash 120, f120 'right ramp flash
- 'Flash 129, f29 'left loop / spinner flash
- Flashm 331, f31 'vengeance flash
- Flashm 50, FPhaseLE
- Flash 50, FPhaseRE
- Flashm 51, FPhaseL1
- Flash 51, FPhaseR1
- Flashm 52, FPhaseL2
- Flash 52, FPhaseR2
- Flashm 53, FPhaseL3
- Flash 53, FPhaseR3
- Flashm 54, FPhaseL4
- Flash 54, FPhaseR4
- Flashm 55, FPhaseL5
- Flash 55, FPhaseR5
- Flashm 56, FPhaseL6
- Flash 56, FPhaseR6
- Flashm 57, FPhaseL7
- Flash 57, FPhaseR7
- Flashm 58, FPhaseL8
- Flash 58, FPhaseR8
- Flashm 59, FPhaseL9
- Flash 59, FPhaseR9
- Flashm 60, FPhaseL10
- Flash 60, FPhaseR10
- Flashm 61, FPhaseL11
- Flash 61, FPhaseR11
- Flashm 62, FPhaseL12
- Flash 62, FPhaseR12
- Flashm 63, FPhaseL13
- Flash 63, FPhaseR13
- Flashm 64, FPhaseL14
- Flash 64, FPhaseR14
- Flashm 65, FPhaseL15
- Flash 65, FPhaseR15
- Flashm 66, FPhaseL16
- Flash 66, FPhaseR16
- Flashm 67, FPhaseL17
- Flash 67, FPhaseR17
- Flashm 68, FPhaseL18
- Flash 68, FPhaseR18
- Flashm 69, FPhaseL19
- Flash 69, FPhaseR19
- Flashm 70, FPhaseL20
- Flash 70, FPhaseR20
- Flashm 71, FPhaseL21
- Flash 71, FPhaseR21
- Flashm 72, FPhaseL22
- Flash 72, FPhaseR22
- 'Flash 276, l50f
- Flash 332, f32f
- Flash 341, f41f
- Flash 325, f25f
- 'Flash 277, f80
- Flash 331, vengeancespotf
- End Sub
- Dim leftdrop:leftdrop = 0
- Sub leftdrop1_Hit:leftdrop = 1:End Sub
- Sub leftdrop2_Hit:
- If leftdrop = 1 then
- PlaySound "drop_left"
- End If
- 'StopSound "fx_metalrolling"
- leftdrop = 0
- End Sub
- Dim rightdrop:rightdrop = 0
- Sub rightdrop1_Hit:rightdrop = 1:End Sub
- Sub rightdrop2_Hit
- If rightdrop = 1 then
- PlaySound "drop_Right"
- End If
- 'StopSound "fx_metalrolling"
- rightdrop = 0
- End Sub
- Sub PrimT_Timer
- If sw11.isdropped = true then sw11f.rotatetoend
- if sw11.isdropped = false then sw11f.rotatetostart
- sw11p.transy = sw11f.currentangle
- End Sub
- Sub Table_exit()
- If B2SOnALT Then Controller.Stop
- End Sub
- 'VENGENANCE ANIMATION
- dim vengeanceBall,xx
- set vengeanceBall = kicker1.createball
- kicker1.kick 0,0
- Dim Mag1
- Set mag1= New cvpmMagnet
- With mag1
- .InitMagnet vengeanceTrigger, 5
- .GrabCenter = False
- .CreateEvents "mag1"
- .magnetOn = True
- End With
- Sub VengeanceHit (Vmove)
- dim yy
- 'debug.print vengeanceBall.x & ":" & vengeanceBall.y & ":" & vengeanceBall.z & ":"
- vengeanceBall.vely = Vmove
- yy = (rnd(1) - 0.5) * Vmove
- vengeanceBall.velx = yy
- VengeanceTimer.Enabled = 1:xx=0
- Playsound "solenoidon"
- End Sub
- Sub VengeanceTimer_Timer
- VengeancePrim.objrotX = (vengeanceBall.x - vengeanceTrigger.x) * 50
- VengeancePrim.transY = (vengeanceBall.y - vengeanceTrigger.y) * 2
- f31.RotX = VengeancePrim.objrotx
- vengEL.objrotx = VengeancePrim.objrotx
- xx = xx + 1
- 'debug.print xx & "," & vengeanceball.y
- if xx = 400 then VengeanceTimer.Enabled = 0
- 'if f31.opacity > 1 then gate1.collidable = 0 and gate2.collidable = 0
- 'if f31.opacity < 1 then gate1.collidable = 1 and gate2.collidable = 1
- End Sub
- Sub ShipTimer_Timer 'Test movement
- VengeanceHit .5
- End Sub
- ''***** GI routines
- '
- Dim ballsavelight
- Dim MultiballFlag
- Sub GI_AllOff (time) 'Turn GI Off
- PlayfieldGIOff
- If time > 0 Then
- GI_AllOnT.Interval = time
- GI_AllOnT.Enabled = 0
- GI_AllOnT.Enabled = 1
- End If
- Table.ColorGradeImage = "ColorGradeLUT256x16_1to1OFF"
- End Sub
- Sub GI_AllOn 'Turn GI On
- PlayfieldGIOn
- Table.ColorGradeImage = "ColorGradeLUT256x16_1to1usat"
- End Sub
- Sub GI_AllOnT_Timer 'Turn GI On timer
- PlayfieldGIOn
- GI_AllOnT.Enabled = 0
- Table.ColorGradeImage = "ColorGradeLUT256x16_1to1usat"
- End Sub
- Function GI_TroughCheck
- Dim Ballcount: Ballcount = 0
- If Controller.Switch(18) = TRUE then Ballcount = Ballcount + 1
- If Controller.Switch(19) = TRUE then Ballcount = Ballcount + 1
- If Controller.Switch(20) = TRUE then Ballcount = Ballcount + 1
- If Controller.Switch(21) = TRUE then Ballcount = Ballcount + 1
- If Ballcount < 3 Then 'Keep track of multiball mode
- MultiballFlag = 1
- Else
- MultiballFlag = 0
- End If
- GI_TroughCheck = Ballcount
- 'debug.print "Troughcheck " & ballcount & " Multiball " & MultiballFlag
- If ballcount = 4 then
- GameOverTimerCheck.Enabled = 1 'no ball in play
- 'debug.print timer & "Game Over?"
- Else
- GameOverTimerCheck.Enabled = 0 'ball in play
- 'debug.print timer & "Game Not Over"
- End If
- End Function
- GameOverTimerCheck.Interval = 30000
- Sub GameOverTimerCheck_Timer
- 'debug.print timer & "Game Over!"
- If GIOnDuringAttractMode = 1 Then GI_AllOn
- GameOverTimerCheck.Enabled = 0
- End Sub
- Sub PlayfieldGIOn
- pframp.image = "stpf_on"
- vengeanceprim.image = "vengeancefren"
- GI_Light.State = 1
- GI_LightOff.State = 0
- sw48p.image = "black-hole-t1"
- sw45p.image = "small-t1-on"
- sw46p.image = "small-t1-on"
- sw47p.image = "small-t1-on"
- sw49p.image = "small-t1-on"
- sw50p.image = "small-t1-on"
- sw11p.image = "droptarget-on"
- sw39p.image = "tri-t1-on"
- sw40p.image = "ship-t1-on"
- sw41p.image = "tri-t1-on"
- sw7p.image = "phaser-t1-on"
- sw8p.image = "biohazard-t1-on"
- sw9p.image = "thing-t1-on"
- sw42p.image = "enterprise-t1-on"
- sw43p.image = "enterprise-t1-on"
- dim bulb
- for each bulb in GILighting
- bulb.State = 1
- next
- End Sub
- Dim red:red = 0
- Dim green:green = 0
- Dim blue:blue = 255
- Sub ColorCheck_Timer 'Light.color=RGB(r,g,b)
- dim bulb
- for each bulb in GILighting
- bulb.color=RGB(red,green,blue)
- next
- GI_Light.state = newlighttest76.state
- f31.opacity = f31.opacity / 2
- End Sub
- Sub PlayfieldGIOff
- pframp.image = "stpf"
- vengeanceprim.image = "vengeancefrenoff"
- GI_Light.State = 0
- GI_LightOff.State = 1
- 'If GIColorMode = 1 then ColorCheck.Enabled = 0
- sw48p.image = "black-hole-t1off"
- sw45p.image = "small-t1"
- sw46p.image = "small-t1"
- sw47p.image = "small-t1"
- sw49p.image = "small-t1"
- sw50p.image = "small-t1"
- sw11p.image = "droptarget-off"
- sw39p.image = "tri-t1-off"
- sw40p.image = "ship-t1-off"
- sw41p.image = "tri-t1-off"
- sw7p.image = "phaser-t1-off"
- sw8p.image = "biohazard-t1-off"
- sw9p.image = "thing-t1-off"
- sw42p.image = "enterprise-t1-off"
- sw43p.image = "enterprise-t1-off"
- dim bulb
- for each bulb in GILighting
- bulb.State = 0
- next
- End Sub
- Sub OptoOnT_Timer
- If BallInPlay >= 1 then
- OptoOn
- End If
- If BallInPlay = 0 then
- OptoOff
- End If
- End Sub
- Sub OptoOn
- opto1.opacity = 1000
- opto2.opacity = 1000
- opto3.opacity = 1000
- opto4.opacity = 1000
- opto5.opacity = 1000
- opto6.opacity = 1000
- opto7.opacity = 1000
- opto8.opacity = 1000
- opto9.opacity = 1000
- opto10.opacity = 1000
- opto11.opacity = 1000
- opto12.opacity = 1000
- End Sub
- Sub OptoOff
- opto1.opacity = 0
- opto2.opacity = 0
- opto3.opacity = 0
- opto4.opacity = 0
- opto5.opacity = 0
- opto6.opacity = 0
- opto7.opacity = 0
- opto8.opacity = 0
- opto9.opacity = 0
- opto10.opacity = 0
- opto11.opacity = 0
- opto12.opacity = 0
- End Sub
- ' *********************************************************************
- ' Supporting Ball & Sound Functions
- ' *********************************************************************
- Sub Pins_Hit (idx)
- PlaySound "pinhit_low", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
- End Sub
- Sub Targets_Hit (idx)
- PlaySound "target", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0
- End Sub
- Sub Metals_Thin_Hit (idx)
- PlaySound "metalhit_thin", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- End Sub
- Sub Metals_Medium_Hit (idx)
- PlaySound "metalhit_medium", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- End Sub
- Sub Metals2_Hit (idx)
- PlaySound "metalhit2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- End Sub
- Sub Gates_Hit (idx)
- PlaySound "gate4", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- End Sub
- Sub Spinner_Spin
- PlaySound "fx_spinner",0,.25,0,0.25
- End Sub
- Sub Rubbers_Hit(idx)
- dim finalspeed
- finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
- If finalspeed > 20 then
- PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- End if
- If finalspeed >= 6 AND finalspeed <= 20 then
- RandomSoundRubber()
- End If
- End Sub
- Sub Posts_Hit(idx)
- dim finalspeed
- finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
- If finalspeed > 16 then
- PlaySound "fx_rubber2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- End if
- If finalspeed >= 6 AND finalspeed <= 16 then
- RandomSoundRubber()
- End If
- End Sub
- Sub RandomSoundRubber()
- Select Case Int(Rnd*3)+1
- Case 1 : PlaySound "rubber_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- Case 2 : PlaySound "rubber_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- Case 3 : PlaySound "rubber_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- End Select
- End Sub
- Sub LeftFlipper_Collide(parm)
- RandomSoundFlipper()
- End Sub
- Sub RightFlipper_Collide(parm)
- RandomSoundFlipper()
- End Sub
- Sub RandomSoundFlipper()
- Select Case Int(Rnd*3)+1
- Case 1 : PlaySound "flip_hit_1", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- Case 2 : PlaySound "flip_hit_2", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- Case 3 : PlaySound "flip_hit_3", 0, Vol(ActiveBall), Pan(ActiveBall), 0, Pitch(ActiveBall), 1, 0
- End Select
- End Sub
- Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
- Vol = Csng(BallVel(ball) ^2 / 100)
- End Function
- Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
- Dim tmp
- tmp = ball.x * 2 / table.width-1
- If tmp > 0 Then
- Pan = Csng(tmp ^10)
- Else
- Pan = Csng(-((- tmp) ^10) )
- End If
- End Function
- Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
- Pitch = BallVel(ball) * 20
- End Function
- Function BallVel(ball) 'Calculates the ball speed
- BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
- End Function
- '*****************************************
- ' JP's VP10 Rolling Sounds
- '*****************************************
- Const tnob = 10 ' total number of balls
- ReDim rolling(tnob)
- InitRolling
- Sub InitRolling
- Dim i
- For i = 0 to tnob
- rolling(i) = False
- Next
- End Sub
- Sub RollingTimer_Timer()
- Dim BOT, b
- BOT = GetBalls
- ' stop the sound of deleted balls
- For b = UBound(BOT) + 1 to tnob
- rolling(b) = False
- StopSound("fx_ballrolling" & b)
- Next
- ' exit the sub if no balls on the table
- If UBound(BOT) = -1 Then Exit Sub
- ' play the rolling sound for each ball
- For b = 0 to UBound(BOT)
- If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 AND BOT(b).z > 0 Then
- rolling(b) = True
- PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0
- Else
- If rolling(b) = True Then
- StopSound("fx_ballrolling" & b)
- rolling(b) = False
- End If
- End If
- Next
- End Sub
- '**********************
- ' Ball Collision Sound
- '**********************
- Sub OnBallBallCollision(ball1, ball2, velocity)
- PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
- End Sub
- 'LETS MOVE SOME FUCKIN LIGHTS LIKE A DISCO YEEEEEA!
- 'stolen from gtxjoe, with credit
- ' ***** EXAMPLE 1 *****
- 'Const length1offset = 350 'from pivot point
- 'Const height1offset = 25 'from pivot point
- 'Const length2offset = 305 'from pivot point
- 'Const height2offset = 25 'from pivot point
- Const angleXYStart = 0
- Const angleXYStop = 50
- Const angleZ = 45
- Const stepSize = .5
- 'dim angle, dir, angleXYoffset
- 'angleXYoffset = atn(height1offset/length1offset) * 180/3.14159265359
- 'angle = angleXYStart
- 'dir = stepSize
- 'timer1.interval = 30
- 'Sub timer1_timer
- ' 'Set new angle
- ' angle = angle + 1 * dir
- '
- ' 'Set direction
- ' if angle => angleXYStop then
- ' dir = -1 * dir
- ' elseif Angle =< angleXYStart then
- ' dir = -1 * dir
- ' end if
- '
- ' 'Move primitive
- ' 'Primitive1.Roty = angle
- ' 'Primitive1.ObjRotz = angleZ + 180
- '
- '' 'Move ball
- ' 'calcXYZ light1, light1Pos, length1offset, angle + angleXYOffset, angleZ
- ' 'calcXYZ ball2, ball2Pos, length2offset, angle + angleXYOffset, angleZ
- 'End sub
- ' ***** EXAMPLE 2 *****
- Const length1offset = 250
- Const length2offset = 120
- Const length3offset = 190
- Const length4offset = 160
- Const length5offset = 100
- Const length6offset = 250
- Const length7offset = 120
- Const length8offset = 165
- Const length9offset = 180
- Const length10offset = 111
- Const length11offset = 146
- Const length12offset = 216
- Const length13offset = 129
- Const length14offset = 172
- Const length15offset = 215
- Const length16offset = 236
- Const length17offset = 200
- Const length18offset = 167
- Const length19offset = 203
- Const length20offset = 240
- Const length21offset = 250
- Const length22offset = 120
- Const length23offset = 190
- Const length24offset = 160
- Const length25offset = 100
- Const length26offset = 250
- Const length27offset = 120
- Const length28offset = 165
- Const length29offset = 180
- Const length30offset = 111
- Const length31offset = 146
- Const length32offset = 216
- Const length33offset = 129
- Const length34offset = 172
- Const length35offset = 215
- Const length36offset = 236
- Const length37offset = 200
- Const length38offset = 167
- Const length39offset = 203
- Const length40offset = 240
- Const length41offset = 146
- Const length42offset = 180
- Const length43offset = 173
- Const length44offset = 133
- Const length45offset = 134
- Const length46offset = 199
- Const length47offset = 184
- Const length48offset = 201
- Const length49offset = 217
- Const length50offset = 175
- Const length51offset = 175
- Const length52offset = 197
- Const length53offset = 201
- Const length54offset = 130
- Const length55offset = 209
- Const length56offset = 123
- Const length57offset = 215
- Const length58offset = 149
- Const length59offset = 129
- Const length60offset = 201
- Const length61offset = 160
- Const length62offset = 219
- Const length63offset = 145
- Const length64offset = 159
- Const length65offset = 121
- Const length66offset = 179
- Const length67offset = 118
- Const length68offset = 149
- Const length69offset = 113
- Const length70offset = 208
- Const length71offset = 204
- Const length72offset = 200
- Const length73offset = 214
- Const length74offset = 136
- Const length75offset = 153
- Const length76offset = 119
- Const length77offset = 151
- Const length78offset = 116
- Const length79offset = 187
- Const length80offset = 118
- Const length81offset = 174
- Const length82offset = 145
- Const length83offset = 102
- Const length84offset = 217
- Const length85offset = 169
- Const length86offset = 136
- Const length87offset = 220
- Const length88offset = 181
- Const length89offset = 153
- Const length90offset = 138
- Const length91offset = 124
- Const length92offset = 134
- Const length93offset = 131
- Const length94offset = 156
- Const length95offset = 189
- Const length96offset = 144
- Const length97offset = 179
- Const length98offset = 178
- Const length99offset = 212
- Const length100offset = 124
- Const length101offset = 118
- Const length102offset = 198
- Const length103offset = 119
- Const length104offset = 122
- Const length105offset = 118
- Const length106offset = 175
- Const length107offset = 128
- Const length108offset = 206
- Const length109offset = 152
- Const length110offset = 174
- Const length111offset = 145
- Const length112offset = 179
- Const length113offset = 202
- Const length114offset = 177
- Const length115offset = 104
- Const length116offset = 189
- Const length117offset = 151
- Const length118offset = 106
- Const length119offset = 138
- Const length120offset = 116
- Const angleXYStart3 = 0
- Const angleXYStop3 = 0
- Const stepSize3 = .5
- dim angle3, dir3, anglez3, dirz3, angleXYoffset3
- 'angleXYoffset3 = atn(height1offset/length1offset) * 180/3.14159265359
- angle3 = angleXYStart3
- dir3 = stepSize3
- dirz3 = 1
- timer3.interval = 30
- Sub timer3_timer
- 'Set angle
- angle3 = angle3 + 1 * dir3
- 'Set direction
- ' if angle3 => angleXYStop3 then
- ' dir3 = -1 * dir3
- ' elseif Angle3 =< angleXYStart3 then
- ' dir3 = -1 * dir3
- ' end if
- dir3 = -1 * dir3
- 'Set zdirection
- anglez3 = anglez3 + 1 * dirz3
- if anglez3 => 360 then
- anglez3 = 0
- end if
- 'Move primitive
- 'Primitive2.Roty = angle3
- 'Primitive2.ObjRotz = angleZ3 + 180
- 'Move light
- calcXYZ laser1, light1Pos, length1offset, angle3, angleZ3
- calcXYZ Laser2, light2Pos, length2offset, angle3, angleZ3
- calcXYZ Laser3, light3Pos, length3offset, angle3, angleZ3
- calcXYZ Laser4, light4Pos, length4offset, angle3, angleZ3
- calcXYZ Laser5, light5Pos, length5offset, angle3, angleZ3
- calcXYZ Laser6, light6Pos, length6offset, angle3, angleZ3
- calcXYZ Laser7, light7Pos, length7offset, angle3, angleZ3
- calcXYZ Laser8, light8Pos, length8offset, angle3, angleZ3
- calcXYZ Laser9, light9Pos, length9offset, angle3, angleZ3
- calcXYZ Laser10, light10Pos, length10offset, angle3, angleZ3
- calcXYZ Laser11, light11Pos, length11offset, angle3, angleZ3
- calcXYZ Laser12, light12Pos, length12offset, angle3, angleZ3
- calcXYZ Laser13, light13Pos, length13offset, angle3, angleZ3
- calcXYZ Laser14, light14Pos, length14offset, angle3, angleZ3
- calcXYZ Laser15, light15Pos, length15offset, angle3, angleZ3
- calcXYZ Laser16, light16Pos, length16offset, angle3, angleZ3
- calcXYZ Laser17, light17Pos, length17offset, angle3, angleZ3
- calcXYZ Laser18, light18Pos, length18offset, angle3, angleZ3
- calcXYZ Laser19, light19Pos, length19offset, angle3, angleZ3
- calcXYZ Laser20, light20Pos, length20offset, angle3, angleZ3
- calcXYZ laser21, light21Pos, length21offset, angle3, angleZ3
- calcXYZ Laser22, light22Pos, length22offset, angle3, angleZ3
- calcXYZ Laser23, light23Pos, length23offset, angle3, angleZ3
- calcXYZ Laser24, light24Pos, length24offset, angle3, angleZ3
- calcXYZ Laser25, light25Pos, length25offset, angle3, angleZ3
- calcXYZ Laser26, light26Pos, length26offset, angle3, angleZ3
- calcXYZ Laser27, light27Pos, length27offset, angle3, angleZ3
- calcXYZ Laser28, light28Pos, length28offset, angle3, angleZ3
- calcXYZ Laser29, light29Pos, length29offset, angle3, angleZ3
- calcXYZ Laser30, light30Pos, length30offset, angle3, angleZ3
- calcXYZ Laser31, light31Pos, length31offset, angle3, angleZ3
- calcXYZ Laser32, light32Pos, length32offset, angle3, angleZ3
- calcXYZ Laser33, light33Pos, length33offset, angle3, angleZ3
- calcXYZ Laser34, light34Pos, length34offset, angle3, angleZ3
- calcXYZ Laser35, light35Pos, length35offset, angle3, angleZ3
- calcXYZ Laser36, light36Pos, length36offset, angle3, angleZ3
- calcXYZ Laser37, light37Pos, length37offset, angle3, angleZ3
- calcXYZ Laser38, light38Pos, length38offset, angle3, angleZ3
- calcXYZ Laser39, light39Pos, length39offset, angle3, angleZ3
- calcXYZ Laser40, light40Pos, length40offset, angle3, angleZ3
- calcXYZ2 Laser41, light41Pos, length41offset, angle3, angleZ3
- calcXYZ2 Laser42, light42Pos, length42offset, angle3, angleZ3
- calcXYZ2 Laser43, light43Pos, length43offset, angle3, angleZ3
- calcXYZ2 Laser44, light44Pos, length44offset, angle3, angleZ3
- calcXYZ2 Laser45, light45Pos, length45offset, angle3, angleZ3
- calcXYZ2 Laser46, light46Pos, length46offset, angle3, angleZ3
- calcXYZ2 Laser47, light47Pos, length47offset, angle3, angleZ3
- calcXYZ2 Laser48, light48Pos, length48offset, angle3, angleZ3
- calcXYZ2 Laser49, light49Pos, length49offset, angle3, angleZ3
- calcXYZ2 Laser50, light50Pos, length50offset, angle3, angleZ3
- calcXYZ2 Laser51, light51Pos, length51offset, angle3, angleZ3
- calcXYZ2 Laser52, light52Pos, length52offset, angle3, angleZ3
- calcXYZ2 Laser53, light53Pos, length53offset, angle3, angleZ3
- calcXYZ2 Laser54, light54Pos, length54offset, angle3, angleZ3
- calcXYZ2 Laser55, light55Pos, length55offset, angle3, angleZ3
- calcXYZ2 Laser56, light56Pos, length56offset, angle3, angleZ3
- calcXYZ2 Laser57, light57Pos, length57offset, angle3, angleZ3
- calcXYZ2 Laser58, light58Pos, length58offset, angle3, angleZ3
- calcXYZ2 Laser59, light59Pos, length59offset, angle3, angleZ3
- calcXYZ2 Laser60, light60Pos, length60offset, angle3, angleZ3
- calcXYZ2 Laser61, light61Pos, length61offset, angle3, angleZ3
- calcXYZ2 Laser62, light62Pos, length62offset, angle3, angleZ3
- calcXYZ2 Laser63, light63Pos, length63offset, angle3, angleZ3
- calcXYZ2 Laser64, light64Pos, length64offset, angle3, angleZ3
- calcXYZ2 Laser65, light65Pos, length65offset, angle3, angleZ3
- calcXYZ2 Laser66, light66Pos, length66offset, angle3, angleZ3
- calcXYZ2 Laser67, light67Pos, length67offset, angle3, angleZ3
- calcXYZ2 Laser68, light68Pos, length68offset, angle3, angleZ3
- calcXYZ2 Laser69, light69Pos, length69offset, angle3, angleZ3
- calcXYZ2 Laser70, light70Pos, length70offset, angle3, angleZ3
- calcXYZ2 Laser71, light71Pos, length71offset, angle3, angleZ3
- calcXYZ2 Laser72, light72Pos, length72offset, angle3, angleZ3
- calcXYZ2 Laser73, light73Pos, length73offset, angle3, angleZ3
- calcXYZ2 Laser74, light74Pos, length74offset, angle3, angleZ3
- calcXYZ2 Laser75, light75Pos, length75offset, angle3, angleZ3
- calcXYZ2 Laser76, light76Pos, length76offset, angle3, angleZ3
- calcXYZ2 Laser77, light77Pos, length77offset, angle3, angleZ3
- calcXYZ2 Laser78, light78Pos, length78offset, angle3, angleZ3
- calcXYZ2 Laser79, light79Pos, length79offset, angle3, angleZ3
- calcXYZ2 Laser80, light80Pos, length80offset, angle3, angleZ3
- calcXYZ3 Laser81, light81Pos, length81offset, angle3, angleZ3
- calcXYZ3 Laser82, light82Pos, length82offset, angle3, angleZ3
- calcXYZ3 Laser83, light83Pos, length83offset, angle3, angleZ3
- calcXYZ3 Laser84, light84Pos, length84offset, angle3, angleZ3
- calcXYZ3 Laser85, light85Pos, length85offset, angle3, angleZ3
- calcXYZ3 Laser86, light86Pos, length86offset, angle3, angleZ3
- calcXYZ3 Laser87, light87Pos, length87offset, angle3, angleZ3
- calcXYZ3 Laser88, light88Pos, length88offset, angle3, angleZ3
- calcXYZ3 Laser89, light89Pos, length89offset, angle3, angleZ3
- calcXYZ3 Laser90, light90Pos, length90offset, angle3, angleZ3
- calcXYZ3 Laser91, light91Pos, length91offset, angle3, angleZ3
- calcXYZ3 Laser92, light92Pos, length92offset, angle3, angleZ3
- calcXYZ3 Laser93, light93Pos, length93offset, angle3, angleZ3
- calcXYZ3 Laser94, light94Pos, length94offset, angle3, angleZ3
- calcXYZ3 Laser95, light95Pos, length95offset, angle3, angleZ3
- calcXYZ3 Laser96, light96Pos, length96offset, angle3, angleZ3
- calcXYZ3 Laser97, light97Pos, length97offset, angle3, angleZ3
- calcXYZ3 Laser98, light98Pos, length98offset, angle3, angleZ3
- calcXYZ3 Laser99, light99Pos, length99offset, angle3, angleZ3
- calcXYZ3 Laser100, light100Pos, length100offset, angle3, angleZ3
- calcXYZ3 Laser101, light101Pos, length101offset, angle3, angleZ3
- calcXYZ3 Laser102, light102Pos, length102offset, angle3, angleZ3
- calcXYZ3 Laser103, light103Pos, length103offset, angle3, angleZ3
- calcXYZ3 Laser104, light104Pos, length104offset, angle3, angleZ3
- calcXYZ3 Laser105, light105Pos, length105offset, angle3, angleZ3
- calcXYZ3 Laser106, light106Pos, length106offset, angle3, angleZ3
- calcXYZ3 Laser107, light107Pos, length107offset, angle3, angleZ3
- calcXYZ3 Laser108, light108Pos, length108offset, angle3, angleZ3
- calcXYZ3 Laser109, light109Pos, length109offset, angle3, angleZ3
- calcXYZ3 Laser110, light110Pos, length110offset, angle3, angleZ3
- calcXYZ3 Laser111, light111Pos, length111offset, angle3, angleZ3
- calcXYZ3 Laser112, light112Pos, length112offset, angle3, angleZ3
- calcXYZ3 Laser113, light113Pos, length113offset, angle3, angleZ3
- calcXYZ3 Laser114, light114Pos, length114offset, angle3, angleZ3
- calcXYZ3 Laser115, light115Pos, length115offset, angle3, angleZ3
- calcXYZ3 Laser116, light116Pos, length116offset, angle3, angleZ3
- calcXYZ3 Laser117, light117Pos, length117offset, angle3, angleZ3
- calcXYZ3 Laser118, light118Pos, length118offset, angle3, angleZ3
- calcXYZ3 Laser119, light119Pos, length119offset, angle3, angleZ3
- calcXYZ3 Laser120, light120Pos, length120offset, angle3, angleZ3
- 'calcXYZ ball4, ball4Pos, length4offset, angle3 + angleXYOffset3, angleZ3
- End sub
- ' *********************************************************
- ' Calculate X, Y and Z from latitude, longitude and radius
- ' *********************************************************
- Sub CalcXYZ (ballname, ballpos, length, angXY, angZ)
- Dim lat, lon
- lat = angXY * 3.14159265359/180
- lon = angZ * 3.14159265359/180
- ballname.x = ballpos(0) + length * cos(lat) * cos(lon)
- ballname.y = ballpos(1) + (length * 2.5) * cos(lat) * sin(lon)
- 'ballname.z = ballpos(2) + length *sin(lat)
- 'debug.print angXY & ":" & angZ & ":" & ballname.x & ":" & ballname.y' & ":" & ballname.z
- End Sub
- Sub CalcXYZ2 (ballname, ballpos, length, angXY, angZ)
- Dim lat, lon
- lat = angXY * 3.14159265359/180
- lon = angZ * 3.14159265359/180
- ballname.x = ballpos(0) + length * (cos(lat) * 2) * cos(lon)
- ballname.y = ballpos(1) + length * cos(lat) * sin(lon)
- 'ballname.z = ballpos(2) + length *sin(lat)
- debug.print angXY & ":" & angZ & ":" & ballname.x & ":" & ballname.y' & ":" & ballname.z
- End Sub
- Sub CalcXYZ3 (ballname, ballpos, length, angXY, angZ)
- Dim lat, lon
- lat = angXY * 3.14159265359/90
- lon = angZ * 3.14159265359/90
- ballname.x = ballpos(0) + (length * 1.5) * cos(lat) * cos(lon)
- ballname.y = ballpos(1) + (length / 2) * cos(lat) * sin(lon)
- 'ballname.z = ballpos(2) + length *sin(lat)
- 'debug.print angXY & ":" & angZ & ":" & ballname.x & ":" & ballname.y' & ":" & ballname.z
- End Sub
- star trek neo.txt
- Ouvrir avec Google Docs
- Affichage de star trek neo.txt
Advertisement
Add Comment
Please, Sign In to add comment