Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '@@@@@@@@@@@@@@@@@@: M@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '@@@@@@@@@@@@@@@@@@W@#@ B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '@@@@@@@@@@@@@@@@@@8@#S 4@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '@@@@@@@@@@@@@@@@@@8@#@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '@@@@@@@@@@@@@@@@@@8@#@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '@@@@@@@@@@@@@@@@@@W@*@ :+8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '@@@###M#@M##M@M##M@MM#*#B@@####@@@@###MBMM##@##M#@###8BMM#M@@MS¤¤S@B@@@
- '@@@: :::W+: +B+ :M@+:: 4@@+ :B@@@::::B: ::B::::W+: :B+::4B+ :::+B@@
- '@@@:::: 9::::@: :@8 :::::@@::::@@@@ :::@::::@ ::@ : @:: K4 :: ::::@@@
- '@@@9+:: ¤ :: B ::@S ::: @@::::@@@@ :: 4 :: @ ::@ :::@:: K : :::::8B@
- '@@@@::: :: 9 ::@: :::: @@::::@@@@::: : ::#@::::@ :: *:: K : #: ::#@@
- '@@@@::: ::: ¤ :@ ::: : @@::::@@@@::: + @@::: @ ::: +K :+# :::*@@
- '@@@@::: ::::: ::@ :: :::@@::::@@@@::::::::@@::: @ :: : K :: # :::*@@
- '@@@@::::: ::::::+@:::¤:::@@::::@@@@::::::::@@::: @ :::::: K :::W@@@@@@@
- '@@@@::::::::::: 4@:::K+::@@::::@@@@::::::: @@::: @ :::::: K :: M: KB@
- '@@@@: :::::::: @@:::8:::8@::::@@@@::::::::@@::: @ :::::: K :: #: ::K@@
- '@@@@ :::::::::::@@:::@ ::£@::::@@@@::::::::@@::: @ :::::: K :: #: ::K@@
- '@@@@ ::::¤ ::::@# : @: ::@::::@@@@ :: :::@@::: @ ::: :: K :: #: :K@@
- '@@@@S:::::*:::::@¤ : ::: @::::@@@@ : ::::@@::: @ :: :: K :::M :::K@@
- '@@@@W+::: B:::::@ :::::::@::::@@@B: : :8@::: @ ::K::: K :: # ::K@@
- '@@@@@:::::@:::: @ ::::::::@::: : 8: :: :::¤@::: @ ::@::: K :: 4 +::K@@
- '@@@@@:::: @ :::¤@:::: :::@ ::::::@::: +:: @ :: @ ::@::: 9 : :: :::M@@
- '@@@@@:::: @::::#@:: #@: ::B :::: :@::: *::::@ :: @ ::@ : K8++ :: : @@@
- '@@@@@ :: £@::: @@ @@::: 4 :: : @ : @ : +: @ B#: :K@9+:::: B@@@
- '@@@@@B@@@@B@@@B@@@@@@@@@@@@@@@@@@@B@@@@@B@@@@@@@@B@@@@@@B@@@@@@@@@@@@@@
- '@@@K44KK44449#@B@@@@KK444KK4KKKK4@@@@@KKKKK4444W@@@@K44444444K#@@@@@@@@
- '@@@:::::::::::: +@@@ ::::::::::::@@@@@:::::::::S@@@@ :::::::::: :@@@@@
- '@@@:::::::::::::: @@ ::::::::::::@@@@@::::::::: @@@@ :::::::::::::+@@@@
- '@@@:::::::::::::::@@ ::::::::::::@@@BW::::::::: @@@@ ::::::::::::::W@@@
- '@@@::::::::::::::::B ::::::::::::@@@@S :::::::::@@@@ ::::::::::::: +B@@
- '@@@::::::: ::::::::@ ::::::: :: @@@@ :::::::: @@@@ ::::: +::::::@@@
- '@@@:::::::#£+:::: :@ :::::: @@@@ ::::::::: @@@@ ::::::£4:::::::@@@
- '@@@:::::::@B+ :::::@ ::::: @@@@B@@@@ ::::::::: B@@@ ::::::£B+::::::@@@
- '@@@:::::::@@:::::::@ ::::: @@@@@@@@@ ::::::::: 4B@@ :::::4@: :::::@@@
- '@@@:::::::@@:::::::@ ::::: @@@@@@@@@ ::::+::::::@@@ ::::: 4@ ::::::@@@
- '@@@:::::::@@ :::::@ ::::: @@@@@@@@W :::K:: :: @@@ ::::: 4@ ::::::@@@
- '@@@:::::::@@ ::::::@ ::::: @@@@@@@@£:::::#:::: @@@ ::::: 4@ ::::::@@@
- '@@@:::::::@@ ::::::@ :::::::::: @@@ ::::@::::::@@@ ::::: 4@ ::::::@@@
- '@@@:::::::@@ ::::::@ :::::::::::@@@ :::::@::::::@@@ :::: 4@ ::::::@@@
- '@@@:::::::@@ ::::::@ :::::::::::@@@::::: @:::: :@@@ :::: 4@ ::::::@@@
- '@@@:::::::@@ ::::::@ :::::::::::@@@:::: @ :::::*@@ :::: 4@ ::::::@@@
- '@@@:::::::@@ ::::::@ :::::::: ::@@@ ::++@:::::: @@ ::::: 4@ ::::::@@@
- '@@@:::::::@@ ::::::@ :::::: ::@@B: :::£@:::::: @@ ::::: 4@ ::::::@@@
- '@@@:::::::@@ ::::::@ ::::: KKKKK@@4: :::M@:::::: @@ ::::: 4@ ::::::@@@
- '@@@:::::::@@ ::::::@ ::::: @@@@@@@::::: B@:::::::@@ ::::: 4@ ::::::@@@
- '@@@:::::::@@ ::::::@ ::::: @@@@@@@ :::::@@ ::::: @@ ::::: 4@ ::::::@@@
- '@@@:::::::@@ ::::::@ ::::: @@@@@@@::::: +: ::::: @@ ::::: 4@ ::::::@@@
- '@@@:::::::@@:::::::@ :::::: @@@@@@@ ::::::::::::::@@ :::: 4@ ::::::@@@
- '@@@:::::::@@:::::::@ :::::: @@@@@@@:::::::::::::: 8@ :::: 4@ ::::::@@@
- '@@@:::::::#S :::: :@ :::::: 8@:::::::::::::: KB ::::: £4 ::::::@@@
- '@@@:::::::+ :::::::@ ::::::::::: @@::::::::::::::: B ::::: +: ::::::@@@
- '@@@:::::::::::::: :@ ::::::::::: @M+:::: ::::::: @ :::: ::::::: :@@@
- '@@@:::::::::::::: @@ ::::::::::::@S ::::¤@@@+::::: @ ::::::::::::+M@@@
- '@@@:::::::::::::: @@ ::::::::::::@ ::::9@@@:::::::@ ::::::::::::::@@@@
- '@@@:::::::::::: +@@@:::::::::::::@ :::::8@@@::::: B :::::::::::::@@@@@
- '@@@4KKKKKKKK9#BB@@@@KKKKKKKKKKKKK@4KKKKK@@@@4KKKKKKBKKKKKKKKKK#@@@@@@@@
- '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '@@@@@@@@@@@@@@@ TABLE BY ICPJUGGLA AND FRENETICAMNESIC @@@@@@@@@@@@@@@@
- '@@@@@@@@@@@@@@@@ SCRIPT BY FRENETICAMNESIC AND GTXJOE @@@@@@@@@@@@@@@@@
- '@@@@@@ MODELS BY FRENETICAMNESIC, RANDR, FLUPPER, DARK, AND ZANY @@@@@@
- '@@@@@ RESOURCES PROVIDED BY NORTHVIBE, URIELL, PAULO, AND PINBILL @@@@@
- '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- '
- '
- '@ LE Conversion By Dozer - 3D Models / Ramps / Tex by DARK / Flupper @
- '@@@@@@ Crossbow Technical Support provided by PinBill @@@@@@@@
- 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 UseVPMModSol = 1 ' Don't touch this.
- Const Dozer_Cab = 0 ' Don't touch this either.
- 'You can change these :)
- '@@@@@ GFX OPTIONS START @@@@@@
- Const Flasher_Halo = 1 ' Render flasher halos on the table.
- Const Laser_Mod = 1 ' Draw a laser beam when the crossbow swings out.
- Const Crossbow_Model = 1 ' Render a model of a crossbow on the end of the crossbow mech.
- Const GiPulse = 1 'Dark GI transition - Leave at 0 for normal brightness playfield.
- Const BGAnimate = 1 'Animate Bicyle Girl when lift ramp is up.
- Const PWAnimate = 1 'Animate Prison Walker when doors are open.
- Const FullLengthWellWalkerShadow = 1 'Render a large WellWalker shadow almost full playfield length.
- Const RampAmbient = 1 'Render lights on the plastic ramps (Upper lights near backwall will always be active).
- '@@@@@ GFX OPTIONS END @@@@@@
- If RampAmbient = 1 Then
- RL1.Intensity = 5
- RL2.Intensity = 5
- RL3.Intensity = 5
- RL4.Intensity = 5
- RL5.Intensity = 5
- RL6.Intensity = 5
- RL7.Intensity = 5
- RL8.Intensity = 5
- else
- RL1.Intensity = 0
- RL2.Intensity = 0
- RL3.Intensity = 0
- RL4.Intensity = 0
- RL5.Intensity = 0
- RL6.Intensity = 0
- RL7.Intensity = 0
- RL8.Intensity = 0
- End If
- If FullLengthWellWalkerShadow = 1 Then
- Flasher2.visible = 1
- else
- Flasher2.visible = 0
- End If
- 'If DarkWellWalker = 1 Then
- 'WellZombie.visible = 1
- 'WellZombie1.visible = 0
- 'else
- 'WellZombie.visible = 0
- 'WellZombie1.visible = 1
- 'End If
- Dim xxf
- If Flasher_Halo = 1 Then
- for each xxf In Halos:xxf.visible = 1:next
- else
- for each xxf In Halos:xxf.visible = 0:next
- End If
- 'If Puppy_Mod = 1 Then
- 'Puppy.Visible = 1
- 'Primitive_bicycleGirlHAIR.visible = 0
- 'BGirl.visible = 0
- 'else
- 'Puppy.Visible = 0
- 'Primitive_bicycleGirlHAIR.visible = 1
- 'BGirl.visible = 1
- 'End If
- If Crossbow_Model = 1 Then
- Cannon_Locater.visible = 1
- else
- Cannon_Locater.visible = 0
- End If
- Dim VarHidden, UseVPMDMD
- If table.ShowDT = true then
- UseVPMDMD = true
- VarHidden = 1
- Ramp19.visible = 1
- Ramp18.visible = 1
- TextBox.visible = true
- else
- Ramp19.visible = 0
- Ramp18.visible = 0
- UseVPMDMD = false
- VarHidden = 0
- TextBox.visible = false
- end if
- LoadVPM "01560000", "sam.VBS", 3.10
- '********************
- 'Standard definitions
- '********************
- Const cGameName = "twd_156h" 'change the romname here
- 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 xx
- Dim Bump1,Bump2,Bump3,Mech3bank,bsTrough,bsVUK,visibleLock,bsTEject,bsceject
- Dim dtUDrop,dtLDrop,dtRDrop
- Dim PlungerIM
- Dim PMag, DMag, WMag
- Sub Table_Init
- With Controller
- vpmInit Me
- .GameName = cGameName
- If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
- .SplashInfoLine = "The Walking Dead"
- .HandleKeyboard = 0
- .ShowTitle = 0
- .ShowDMDOnly = 1
- .ShowFrame = 0
- .HandleMechanics = 1
- .Hidden = 0
- .Games(cGameName).Settings.Value("sound") = 1
- On Error Resume Next
- .Run GetPlayerHWnd
- If Err Then MsgBox Err.Description
- End With
- On Error Goto 0
- '**Trough
- Set bsTrough = New cvpmBallStack
- bsTrough.InitSw 0, 21, 20, 19, 18, 0, 0, 0
- bsTrough.InitKick BallRelease, 90, 8
- bsTrough.InitExitSnd SoundFX("ballrel",DOFContactors), SoundFX("fxSolenoid",DOFContactors)
- bsTrough.Balls = 4
- Set PMag=New cvpmMagnet
- PMag.InitMagnet PrisonMag,42
- PMag.GrabCenter=False
- Set WMag=New cvpmMagnet
- WMag.InitMagnet WWMag,42
- WMag.GrabCenter=False
- Set DMag=New cvpmMagnet
- DMag.InitMagnet Divmagnet,100
- DMag.GrabCenter=True
- '**Nudging
- vpmNudge.TiltSwitch=-7
- vpmNudge.Sensitivity=1
- vpmNudge.TiltObj=Array(LeftSlingshot,RightSlingshot)
- Set dtLDrop = new cvpmDropTarget
- With dtLDrop
- .Initdrop Array(sw9, sw10, sw11), Array(9, 10, 11)
- .InitSnd SoundFX("droptarget_l",DOFDropTargets),SoundFX("resetdrop",DOFContactors)
- End With
- '**Main Timer init
- PinMAMETimer.Interval = PinMAMEInterval
- PinMAMETimer.Enabled = 1
- bgwall1.isdropped = 1
- bgwall2.isdropped = 1
- End Sub
- '*****Keys
- Sub Table_KeyDown(ByVal Keycode)
- 'If Keycode = 3 Then lpos=1:Laser.enabled = 1:cbdir=1:Darryl.enabled = 1
- If Keycode = LeftFlipperKey then
- 'SolLFlipper true
- End If
- If Keycode = RightFlipperKey then
- 'SolRFlipper true
- End If
- If keycode = PlungerKey Then
- Plunger.Pullback
- If NOT Controller.Switch(23) = True Then
- Controller.Switch(71) = 1
- End If
- End If
- If keycode = LeftTiltKey Then nudgebobble(keycode):End If
- If keycode = RightTiltKey Then nudgebobble(keycode):End If
- If Keycode = StartGameKey Then Controller.Switch(16) = 1
- ' If keycode = CenterTiltKey Then CenterNudge 0, 1, 25 End If
- If keycode = RightMagnaSave Then Controller.Switch(71) = 1
- If vpmKeyDown(keycode) Then Exit Sub
- End Sub
- Sub Table_KeyUp(ByVal keycode)
- If vpmKeyUp(keycode) Then Exit Sub
- If keycode = PlungerKey Then dmag.MagnetOn = False
- If Keycode = LeftFlipperKey then
- SolLFlipper false
- End If
- If Keycode = RightFlipperKey then
- SolRFlipper False
- End If
- If Keycode = StartGameKey Then Controller.Switch(16) = 0
- If keycode = RightMagnaSave Then Controller.Switch(71) = 0
- If keycode = PlungerKey Then
- Plunger.Fire
- PlaySound "plunger"
- Controller.Switch(71) = 0
- End If
- End Sub
- 'Solenoids
- SolCallback(1) = "solTrough"
- SolCallback(2) = "solAutofire"
- SolCallback(3) = "PrisonDoorsPower"
- SolCallback(4) = "PrisonDoorsHold"
- SolCallback(6) = "WMag.MagnetOn="
- SolCallback(5) = "DMag.MagnetOn="
- SolCallback(7) = "PMag.MagnetOn="
- SolCallback(9) = "SolLeftPop" 'left pop bumper
- SolCallback(10) = "SolRightPop" 'right pop bumper
- SolCallback(11) = "SolTopPop" 'top pop bumper
- SolCallback(12) = "SolLeftBank"
- SolCallback(15) = "SolLFlipper"
- SolCallback(16) = "SolRFlipper"
- SolModCallback(17) = "Sol17"
- SolModCallback(18) = "Sol18"
- SolModCallback(19) = "WellWalkerFlash" 'wellwalker flasher
- SolCallback(21) = "Dazz_Motor" 'horde flasher
- SolModCallback(22) = "Sol22"
- SolModCallback(23) = "Sol23"
- SolCallback(24) = "vpmSolSound SoundFX(""knocker"",DOFKnocker),"
- SolModCallback(25) = "FlashPops" 'flash pops
- SolModCallback(26) = "Prison_Top" 'prison top flasher
- SolModCallback(27) = "Prison_Front" 'prison l/r flasher x2
- SolModCallback(28) = "LeftDome" 'left dome flasher
- SolModCallback(29) = "RightDome" 'right dome flasher
- SolModCallback(32) = "Sol32" 'center lane flasher
- SolModCallback(20) = "Sol20"
- SolModCallback(31) = "Sol31"
- SolCallback(51) = "Shoot_Cannon"
- SolCallback(52) = "DT_Down"
- SolCallback(53) = "DT_UP"
- SolCallback(56) = "Corpse_Ramp"
- Sub DT_Down(Enabled)
- If enabled Then
- WDDT.isdropped = 1
- Controller.Switch(48) = 1
- PlaySound SoundFX("DTR",DOFTargets)
- End If
- End Sub
- Sub DT_Up(Enabled)
- If enabled Then
- WDDT.isdropped = 0
- Controller.Switch(48) = 0
- PlaySound SoundFX("DTR",DOFTargets)
- End If
- End Sub
- Sub WDDT_Hit()
- vpmTimer.PulseSw 48
- End Sub
- Sub Prison_Top(Enabled)
- F26a.Intensity = Enabled / 5
- F26b.Intensity = Enabled / 5
- End Sub
- Sub Prison_Front(Enabled)
- F27a.Intensity = Enabled / 5
- F27b.Intensity = Enabled / 5
- Flasher3.Opacity = Enabled / 5
- f28a2.Intensity = Enabled / 5
- If enabled < 200 Then
- Flasher5.opacity = Enabled / 5
- End If
- If enabled > 20 Then
- Barn.image = "prisonmap_s"
- else
- Barn.image = "prisonmap"
- End If
- If LampState(106) AND LampState(107) AND LampState(108) < 100 Then
- Flasher2.Opacity = Enabled / 5
- else
- Flasher2.Opacity = 0
- End If
- End Sub
- Sub Sol31(Enabled)
- F31a.Intensity = Enabled / 5
- F31b.Intensity = Enabled / 5
- End Sub
- Sub Sol32(Enabled)
- F32.Intensity = Enabled / 5
- End Sub
- Sub Sol20(Enabled)
- F20a.Intensity = Enabled / 5
- F20b.Intensity = Enabled / 5
- End Sub
- Sub Sol23(Enabled)
- F23c.Intensity = Enabled / 5
- 'F20b.Intensity = Enabled / 5
- End Sub
- Sub Sol17(Enabled)
- F17.Intensity = Enabled / 5
- F17F.opacity = Enabled
- F17s.opacity = Enabled / 5
- 'F20b.Intensity = Enabled / 5
- End Sub
- Sub Sol18(Enabled)
- F18.Intensity = Enabled / 5
- F18F.opacity = Enabled
- 'F20b.Intensity = Enabled / 5
- End Sub
- Sub Sol22(Enabled)
- F22.Intensity = Enabled / 5
- F22F.opacity = Enabled
- F22S.opacity = Enabled / 5
- 'F20b.Intensity = Enabled / 5
- End Sub
- Sub PrisonDoorsPower(Enabled)
- 'debug.print "Door Power " & enabled & ", " & timer
- If Enabled Then 'Open Door
- prisonstate = false
- 'WWRL1.visible = 0
- PlaySound SoundFX("fx_solenoid",DOFContactors)
- PrisonT.enabled = true
- gspos = 1:gateshadow.enabled = 1
- If PWAnimate = 1 Then
- pwpos = 1
- pwt.enabled = 1
- End If
- End If
- End Sub
- Sub PrisonDoorsHold(Enabled)
- 'debug.print "Door Hold " & enabled & ", " & timer
- If Enabled Then
- Else 'Close Door
- prisonstate = true
- 'WWRL1.visible = 1
- PlaySound SoundFX("fx_solenoid",DOFContactors)
- PrisonT.enabled = true
- gspos1 = 1:gateshadowc.enabled = 1
- pwt.enabled = 0
- Primitive271.RotY = 0
- Primitive271.RotX = 114
- End If
- End Sub
- Sub SolLeftBank(Enabled)
- If Enabled Then
- dtLDrop.DropSol_On
- End If
- End Sub
- Sub WellWalkerFlash(Enabled)
- F19a.Intensity = Enabled
- F28a1.Intensity = Enabled
- If Enabled > 0 Then
- WellZombie.image = "wellzombie4_u"
- else
- WellZombie.image = "WellWalkerCompleteMap"
- End If
- End Sub
- Sub FlashPops(Enabled)
- F25a.Intensity = Enabled / 5
- F25b.Intensity = Enabled / 30
- End Sub
- Sub LeftDome(Enabled)
- F28_Flash.opacity = Enabled * 10
- F28a.Intensity = Enabled / 20
- F28b.Intensity = Enabled
- F28d.opacity = Enabled * 4
- If Enabled > 20 AND LampState(106) AND LampState(107) AND LampState(108) < 100 Then
- WellZombie.image = "wellzombie4_l"
- 'WellZombie1.image = "wellzombie4_l_F"
- else
- WellZombie.image = "wellwalkercompletemap"
- 'WellZombie1.image = "wellzombie4"
- End If
- Flasher4.opacity = Enabled / 5
- End Sub
- Sub RightDome(Enabled)
- F29_Flash.opacity = Enabled * 10
- F29a.Intensity = Enabled / 20
- F29b.Intensity = Enabled
- F29d.opacity = Enabled * 4
- If Enabled > 20 AND LampState(106) AND LampState(107) AND LampState(108) < 100 Then
- WellZombie.image = "wellzombie4_r"
- 'WellZombie1.image = "wellzombie4_r_F"
- else
- WellZombie.image = "wellwalkercompletemap"
- 'WellZombie1.image = "wellzombie4"
- End If
- Flasher1.opacity = Enabled / 5
- End Sub
- Sub SolTopPop(Enabled)
- If Enabled Then
- SetLamp 60, 1
- Primitive5.Image = "bulb red on"
- Else
- SetLamp 60, 0
- Primitive5.Image = "bulb red off"
- End If
- End Sub
- Sub SolRightPop(Enabled)
- If Enabled Then
- SetLamp 61, 1
- Primitive4.Image = "bulb red on"
- Else
- SetLamp 61, 0
- Primitive4.Image = "bulb red off"
- End If
- End Sub
- Sub SolLeftPop(Enabled)
- If Enabled Then
- SetLamp 62, 1
- Primitive3.Image = "bulb red on"
- Else
- SetLamp 62, 0
- Primitive3.Image = "bulb red off"
- 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
- 'primitive flippers!
- dim MotorCallback
- Set MotorCallback = GetRef("GameTimer")
- Sub GameTimer
- UpdateFlipperLogos
- End Sub
- Sub UpdateFlipperLogos
- LFLogo.RotY = LeftFlipper.CurrentAngle
- RFlogo.RotY = RightFlipper.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 SolRFlipper(Enabled)
- If Enabled Then
- PlaySound SoundFX("FlipperUpRight",DOFFlippers)
- RightFlipper.RotateToEnd
- Else
- PlaySound SoundFX("FlipperDown",DOFFlippers)
- RightFlipper.RotateToStart
- End If
- End Sub
- Sub Drain_Hit
- PlaySound "Drain"
- bsTrough.AddBall Me
- End Sub
- Sub RLS_Timer()
- sw34p.RotX = -(sw34.currentangle)
- sw35p.RotX = -(sw35.currentangle)
- sw42p.RotX = -(sw42.currentangle)
- sw43p.RotX = -(sw43.currentangle)
- End Sub
- Sub WZ_Init
- Controller.Switch (2) = 1
- End Sub
- Dim WZOpen:WZOpen = False
- Sub WZT_Timer()
- If WZOpen = True then wzf.rotatetoend 'WellZombie.ObjRotX = WellZombie.ObjRotX + 4
- If WZOpen = False then wzf.rotatetostart 'WellZombie.ObjRotX = WellZombie.ObjRotX - 4
- If WellZombie.ObjRotX >= 30 then WZOpen = False: Controller.Switch (2) = 1
- WellZombie.ObjRotX = wzf.CurrentAngle
- 'WellZombie1.ObjRotX = wzf.CurrentAngle
- If WellZombie.ObjRotX >= 30 Then
- 'WW1.visible = 0
- wwst=1:ww_shadow.enabled = 1
- else
- 'WW1.visible = 1
- End if
- End Sub
- Dim wwst
- wwst = 1
- Sub WW_Shadow_Timer()
- Select Case wwst
- Case 1:WW1.visible = 0:WW2.visible = 1:wwst = 2
- Case 2:WW2.visible = 0:WW3.visible = 1:wwst = 3
- Case 3:WW3.visible = 0:WW4.visible = 1:wwst = 4
- Case 4:WW4.visible = 0:WW5.visible = 1:wwst = 5
- Case 5:WW5.visible = 0:WW6.visible = 1:wwst = 6
- Case 6:WW6.visible = 0:WW7.visible = 1:wwst = 7
- Case 7:WW7.visible = 0:WW8.visible = 1:wwst = 8
- Case 8:WW8.visible = 0:WW7.visible = 1:wwst = 9
- Case 9:WW7.visible = 0:WW6.visible = 1:wwst = 10
- Case 10:WW6.visible = 0:WW5.visible = 1:wwst = 11
- Case 11:WW5.visible = 0:WW4.visible = 1:wwst = 12
- Case 12:WW4.visible = 0:WW3.visible = 1:wwst = 13
- Case 13:WW3.visible = 0:WW2.visible = 1:wwst = 14
- Case 14:WW2.visible = 0:WW1.visible = 1:me.enabled = 0
- End Select
- End Sub
- Sub WZ_Hit:Controller.Switch(2) = 0:WZOpen = True: Playsound "metalhit_thin":End Sub
- Dim prisonstate
- prisonstate = False
- Sub PrisonT_Timer()
- If prisonstate = False then 'Opening
- If ld.ObjRotZ < 96 then
- ld.ObjRotZ = ld.ObjRotZ + 3
- rd.ObjRotZ = rd.ObjRotZ - 3
- Else
- PrisonT.Enabled = False
- Controller.Switch(4) = 1
- 'debug.print "Door Switch set"
- 'prisonstate = True
- End If
- sw4.isdropped = true
- Else 'Closing
- If ld.ObjRotZ > 0 then
- ld.ObjRotZ = ld.ObjRotZ - 3
- rd.ObjRotZ = rd.ObjRotZ + 3
- Else
- PrisonT.Enabled = False
- Controller.Switch(4) = 0
- 'debug.print "Door Switch open"
- 'prisonstate = False
- End If
- sw4.isdropped = false
- End If
- ld1.ObjRotZ = ld.ObjRotZ
- rd1.ObjRotZ = rd.ObjRotZ
- 'if ld.ObjRotZ > 15 then sw4.isdropped = true else sw4.isdropped = false
- End Sub
- Dim xlss
- Sub Dazz_Motor(enabled)
- If enabled Then
- cbdir = 1
- Darryl.enabled = 1
- If Laser_Mod = 1 Then
- lpos = 1
- laser.enabled = 1
- End If
- prim_ball.enabled = 1
- else
- laser.enabled = 0
- Darryl.enabled = 0
- for each xlss In PewPew:xlss.state = 0:next
- Crossbow.RotY = 119.9
- Ball.ObjRotZ = 299
- Cannon_Locater.RotZ = 0
- End If
- End Sub
- Dim cbdir, ckdir, ccount
- cbdir = 1
- Sub Darryl_Timer()
- PlaySound SoundFX("bridge2",DOFGear), , 0.001
- ckdir = Crossbow.RotY - 180
- Select Case cbdir
- Case 1:
- If Crossbow.RotY => 122 Then
- Controller.Switch(50) = 0
- Controller.Switch(52) = 0
- End If
- If Crossbow.RotY => 160 Then
- Controller.Switch(51) = 1
- End If
- If Crossbow.RotY => 198 Then
- cbdir = 3
- End If
- Crossbow.RotY = Crossbow.RotY + 0.4
- Ball.ObjRotZ = Ball.ObjRotZ + 0.4
- Cannon_Locater.RotZ = Cannon_Locater.RotZ + 0.4
- Case 2:
- If Crossbow.RotY <= 122 Then
- Controller.Switch(50) = 1
- End If
- If Crossbow.RotY <= 160 Then
- Controller.Switch(51) = 0
- End If
- If Crossbow.RotY <= 119.7 Then
- me.enabled = 0 'cbdir = 1
- End If
- Crossbow.RotY = Crossbow.RotY - 0.4
- Ball.ObjRotZ = Ball.ObjRotZ - 0.4
- Cannon_Locater.RotZ = Cannon_Locater.RotZ - 0.4
- Case 3:
- laser.enabled = 0
- If ccount = 20 Then
- cbdir = 2
- ccount = 0
- If laser_mod = 1 Then
- laser.enabled = 1
- End If
- End If
- ccount = ccount + 1
- End Select
- End Sub
- Sub prim_ball_Timer()
- If bic = 1 AND darryl.enabled = True Then
- If Ball.Transz => -350 Then
- me.enabled = 0
- End If
- Ball.TransZ = Ball.TransZ + 1
- End If
- End Sub
- Dim Lpos
- lpos = 1
- Sub Laser_Timer()
- Select Case lpos
- Case 1:LZ1.State = 1:lpos=2
- Case 2:LZ1.State = 0:LZ2.State = 1:lpos=3
- Case 3:LZ2.State = 0:LZ3.State = 1:lpos=4
- Case 4:LZ3.State = 0:LZ4.State = 1:lpos=5
- Case 5:LZ4.State = 0:LZ5.State = 1:lpos=6
- Case 6:LZ5.State = 0:LZ6.State = 1:lpos=7
- Case 7:LZ6.State = 0:LZ7.State = 1:lpos=8
- Case 8:LZ7.State = 0:LZ8.State = 1:lpos=9
- Case 9:LZ8.State = 0:LZ9.State = 1:lpos=10
- Case 10:LZ9.State = 0:LZ10.State = 1:lpos=11
- Case 11:LZ10.State = 0:LZ11.State = 1:lpos=12
- Case 12:LZ11.State = 0:LZ12.State = 1:lpos=13
- Case 13:LZ12.State = 0:LZ13.State = 1:lpos=14
- Case 14:LZ13.State = 0:LZ14.State = 1:lpos=15
- Case 15:LZ14.State = 0:LZ15.State = 1:lpos=16
- Case 16:LZ15.State = 0:LZ16.State = 1:lpos=17
- Case 17:LZ16.State = 0:LZ17.State = 1:lpos=18
- Case 18:LZ17.State = 0:LZ18.State = 1:lpos=19
- Case 19:LZ18.State = 0:LZ19.State = 1:lpos=20
- Case 20:LZ19.State = 0:LZ20.State = 1:lpos=21
- Case 21:LZ20.State = 0:LZ21.State = 1:lpos=22
- Case 22:LZ21.State = 0:LZ22.State = 1:lpos=23
- Case 23:LZ22.State = 0:LZ23.State = 1:lpos=24
- Case 24:LZ23.State = 0:LZ24.State = 1:lpos=25
- Case 25:LZ24.State = 0:LZ25.State = 1:lpos=26
- Case 26:LZ25.State = 0:LZ26.State = 1:lpos=27
- Case 27:LZ26.State = 0:LZ27.State = 1:lpos=28
- Case 28:LZ27.State = 0:LZ28.State = 1:lpos=29
- Case 29:LZ28.State = 0:LZ29.State = 1:lpos=30
- Case 30:LZ29.State = 0:LZ30.State = 1:lpos=31
- Case 31:LZ30.State = 0:LZ31.State = 1:lpos=32
- Case 32:LZ31.State = 0:LZ32.State = 1:lpos=33
- Case 33:LZ32.State = 0:LZ33.State = 1:lpos=34
- Case 34:LZ33.State = 0:LZ34.State = 1:lpos=35
- Case 35:LZ34.State = 0:LZ35.State = 1:lpos=36
- Case 36:LZ35.State = 0:LZ36.State = 1:lpos=37
- Case 37:LZ36.State = 0:LZ37.State = 1:lpos=38
- Case 38:LZ37.State = 0:LZ38.State = 1:lpos=39
- Case 39:LZ38.State = 0:LZ39.State = 1:lpos=40
- Case 40:LZ39.State = 0:LZ40.State = 1:lpos=41
- Case 41:LZ40.State = 0:LZ41.State = 1:lpos=42
- Case 42:LZ41.State = 0:LZ42.State = 1:LZF42.visible = 1:lpos=43
- Case 43:LZ42.State = 0:LZ43.State = 1:lpos=44
- Case 44:LZ43.State = 0:LZ44.State = 1:lpos=45
- Case 45:LZ44.State = 0:LZ45.State = 1:LZF42.visible = 0:lpos=46
- Case 46:LZ45.State = 0:LZ46.State = 1:lpos=47
- Case 47:LZ46.State = 0:LZ47.State = 1:lpos=48
- Case 48:LZ47.State = 0:LZ48.State = 1:lpos=49
- Case 49:LZ48.State = 0:LZ49.State = 1:LZF50.visible = 1:lpos=50
- Case 50:LZ49.State = 0:LZ50.State = 1:lpos=51
- Case 51:LZ50.State = 0:LZ51.State = 1:lpos=52
- Case 52:LZ51.State = 0:LZ52.State = 1:lpos=53
- Case 53:LZ52.State = 0:LZ53.State = 1:lpos=54
- Case 54:LZ53.State = 0:LZ54.State = 1:lpos=55
- Case 55:LZ54.State = 0:LZ55.State = 1:LZF50.visible = 0:lpos=56
- Case 56:LZ55.State = 0:LZ56.State = 1:lpos=57
- Case 57:LZ56.State = 0:LZ57.State = 1:lpos=58
- Case 58:LZ57.State = 0:LZ58.State = 1:lpos=59
- Case 59:LZ58.State = 0:LZ59.State = 1:lpos=60
- Case 60:LZ59.State = 0:LZ60.State = 1:lpos=61
- Case 61:LZ60.State = 0:LZ61.State = 1:lpos=62
- Case 62:LZ61.State = 0:LZ62.State = 1:lpos=63
- Case 63:LZ62.State = 0:LZ63.State = 1:lpos=64
- Case 64:LZ63.State = 0:LZ64.State = 1:lpos=65
- Case 65:LZ64.State = 0:LZ65.State = 1:lpos=66
- Case 66:LZ65.State = 0:LZ66.State = 1:lpos=67
- Case 67:LZ66.State = 0:LZ67.State = 1:lpos=68
- Case 68:LZ67.State = 0:LZ68.State = 1:lpos=69
- Case 69:LZ68.State = 0:LZ69.State = 1:lpos=70
- Case 70:LZ69.State = 0:LZ70.State = 1:LZF70.visible = 1:lpos=71
- Case 71:LZ70.State = 0:LZ71.State = 1:lpos=72
- Case 72:LZ71.State = 0:LZ72.State = 1:lpos=73
- Case 73:LZ72.State = 0:LZ73.State = 1:lpos=74
- Case 74:LZ73.State = 0:LZ74.State = 1:lpos=75
- Case 75:LZ74.State = 0:LZ75.State = 1:LZF70.visible = 0:lpos=76
- Case 76:LZ75.State = 0:LZ76.State = 1:lpos=77
- Case 77:LZ76.State = 0:LZ77.State = 1:lpos=78
- Case 78:LZ77.State = 0:LZ78.State = 1:lpos=79
- Case 79:LZ78.State = 0:LZ79.State = 1:lpos=200
- Case 200:lpos = 201
- Case 201:lpos = 80
- Case 80:LZ79.State = 0:LZ78.State = 1:lpos=81
- Case 81:LZ78.State = 0:LZ77.State = 1:lpos=82
- Case 82:LZ77.State = 0:LZ76.State = 1:lpos=83
- Case 83:LZ76.State = 0:LZ75.State = 1:lpos=84
- Case 84:LZ75.State = 0:LZ74.State = 1:lpos=85
- Case 85:LZ74.State = 0:LZ73.State = 1:lpos=86
- Case 86:LZ73.State = 0:LZ72.State = 1:lpos=87
- Case 87:LZ72.State = 0:LZ71.State = 1:lpos=88
- Case 88:LZ71.State = 0:LZ70.State = 1:lpos=89
- Case 89:LZ70.State = 0:LZ69.State = 1:LZF70.visible = 1:lpos=90
- Case 90:LZ69.State = 0:LZ68.State = 1:lpos=91
- Case 91:LZ68.State = 0:LZ67.State = 1:lpos=92
- Case 92:LZ67.State = 0:LZ66.State = 1:lpos=93
- Case 93:LZ66.State = 0:LZ65.State = 1:LZF70.visible = 0:lpos=94
- Case 94:LZ65.State = 0:LZ64.State = 1:lpos=95
- Case 95:LZ64.State = 0:LZ63.State = 1:lpos=96
- Case 96:LZ63.State = 0:LZ62.State = 1:lpos=97
- Case 97:LZ62.State = 0:LZ61.State = 1:lpos=98
- Case 98:LZ61.State = 0:LZ60.State = 1:lpos=99
- Case 99:LZ60.State = 0:LZ59.State = 1:lpos=100
- Case 100:LZ59.State = 0:LZ58.State = 1:lpos=101
- Case 101:LZ58.State = 0:LZ57.State = 1:lpos=102
- Case 102:LZ57.State = 0:LZ56.State = 1:lpos=103
- Case 103:LZ56.State = 0:LZ55.State = 1:lpos=104
- Case 104:LZ55.State = 0:LZ54.State = 1:lpos=105
- Case 105:LZ54.State = 0:LZ53.State = 1:lpos=106
- Case 106:LZ53.State = 0:LZ52.State = 1:lpos=107
- Case 107:LZ52.State = 0:LZ51.State = 1:lpos=108
- Case 108:LZ51.State = 0:LZ50.State = 1:LZF50.visible = 1:lpos=109
- Case 109:LZ50.State = 0:LZ49.State = 1:lpos=110
- Case 110:LZ49.State = 0:LZ48.State = 1:lpos=111
- Case 111:LZ48.State = 0:LZ47.State = 1:lpos=112
- Case 112:LZ47.State = 0:LZ46.State = 1:lpos=113
- Case 113:LZ46.State = 0:LZ45.State = 1:LZF50.visible = 0:lpos=114
- Case 114:LZ45.State = 0:LZ44.State = 1:lpos=115
- Case 115:LZ44.State = 0:LZ43.State = 1:lpos=116
- Case 116:LZ43.State = 0:LZ42.State = 1:lpos=117
- Case 117:LZ42.State = 0:LZ41.State = 1:LZF42.visible = 1:lpos=118
- Case 118:LZ41.State = 0:LZ40.State = 1:lpos=119
- Case 119:LZ40.State = 0:LZ39.State = 1:lpos=120
- Case 120:LZ39.State = 0:LZ38.State = 1:lpos=121
- Case 121:LZ38.State = 0:LZ37.State = 1:LZF42.visible = 0:lpos=122
- Case 122:LZ37.State = 0:LZ36.State = 1:lpos=123
- Case 123:LZ36.State = 0:LZ35.State = 1:lpos=124
- Case 124:LZ35.State = 0:LZ34.State = 1:lpos=125
- Case 125:LZ34.State = 0:LZ33.State = 1:lpos=126
- Case 126:LZ33.State = 0:LZ32.State = 1:lpos=127
- Case 127:LZ32.State = 0:LZ31.State = 1:lpos=128
- Case 128:LZ31.State = 0:LZ30.State = 1:lpos=129
- Case 129:LZ30.State = 0:LZ29.State = 1:lpos=130
- Case 130:LZ29.State = 0:LZ28.State = 1:lpos=131
- Case 131:LZ28.State = 0:LZ27.State = 1:lpos=132
- Case 132:LZ27.State = 0:LZ26.State = 1:lpos=133
- Case 133:LZ26.State = 0:LZ25.State = 1:lpos=134
- Case 134:LZ25.State = 0:LZ24.State = 1:lpos=135
- Case 135:LZ24.State = 0:LZ23.State = 1:lpos=136
- Case 136:LZ23.State = 0:LZ22.State = 1:lpos=137
- Case 137:LZ22.State = 0:LZ21.State = 1:lpos=138
- Case 138:LZ21.State = 0:LZ20.State = 1:lpos=139
- Case 139:LZ20.State = 0:LZ19.State = 1:lpos=140
- Case 140:LZ19.State = 0:LZ18.State = 1:lpos=141
- Case 141:LZ18.State = 0:LZ17.State = 1:lpos=142
- Case 142:LZ17.State = 0:LZ16.State = 1:lpos=143
- Case 143:LZ16.State = 0:LZ15.State = 1:lpos=144
- Case 144:LZ15.State = 0:LZ14.State = 1:lpos=145
- Case 145:LZ14.State = 0:LZ13.State = 1:lpos=146
- Case 146:LZ13.State = 0:LZ12.State = 1:lpos=147
- Case 147:LZ12.State = 0:LZ11.State = 1:lpos=148
- Case 148:LZ11.State = 0:LZ10.State = 1:lpos=149
- Case 149:LZ10.State = 0:LZ9.State = 1:lpos=150
- Case 150:LZ9.State = 0:LZ8.State = 1:lpos=151
- Case 151:LZ8.State = 0:LZ7.State = 1:lpos=152
- Case 152:LZ7.State = 0:LZ6.State = 1:lpos=153
- Case 153:LZ6.State = 0:LZ5.State = 1:lpos=154
- Case 154:LZ5.State = 0:LZ4.State = 1:lpos=155
- Case 155:LZ4.State = 0:LZ3.State = 1:lpos=156
- Case 156:LZ3.State = 0:LZ2.State = 1:lpos=157
- Case 157:LZ2.State = 0:LZ1.State = 1:lpos=162
- Case 162:LZ1.State = 0:me.enabled = 0
- End Select
- End Sub
- Dim bic
- Sub Cannon_Load_Hit()
- bic = 1
- PlaySound "kicker_enter_center"
- me.destroyball
- Ball.visible = 1
- Cannon_Fire.createball
- Controller.Switch(52) = 1
- End Sub
- Sub Shoot_Cannon(Enabled)
- If enabled Then
- bic = 0
- Cannon_Fire.kick ckdir, 50
- 'Controller.Switch(52) = 0
- Ball.visible = 0
- Ball.Transz = -405
- playsound SoundFX("popper_ball",DOFContactors)
- End If
- End Sub
- Sub Left_Spinner_Spin()
- vpmTimer.PulseSw 40
- PlaySound "fx_spinner"
- End Sub
- Sub Right_Spinner_Spin()
- vpmTimer.PulseSw 1
- PlaySound "fx_spinner"
- End Sub
- Sub sw49_Hit()
- vpmTimer.PulseSw 49
- BGirl.TransY = Bgirl.TransY + 5
- Primitive_bicycleGirlHAIR.TransY = Primitive_bicycleGirlHAIR.TransY + 5
- 'Puppy.TransY = Puppy.TransY + 5
- Playsound SoundFX("target",DOFShaker)
- me.timerenabled = 1
- End Sub
- Sub sw49_Timer()
- BGirl.TransY = Bgirl.TransY - 5
- Primitive_bicycleGirlHAIR.TransY = Primitive_bicycleGirlHAIR.TransY - 5
- 'Puppy.TransY = Puppy.TransY - 5
- me.timerenabled = 0
- End Sub
- Sub Corpse_Ramp(Enabled)
- If enabled Then
- brpos = 1
- Bottom_Ramp.enabled = 1
- If bganimate = 1 Then
- bgstep = 1
- Bicycle_Girl.enabled = 1
- End If
- else
- brpos = 2
- Bottom_Ramp.enabled = 1
- Bicycle_Girl.enabled = 0
- 'BGirl.RotY = -13
- 'BGirl.RotX = 105
- Home_BG
- End If
- End Sub
- Dim bgx, bgy
- Sub Home_BG()
- bgx = BGirl.RotY
- bgy = BGirl.RotX
- If BGirl.RotY = -13 Then
- Exit Sub
- End If
- If BGirl.RotY < -13 Then
- homeYAdd.enabled = 1
- End If
- If BGirl.RotY > -13 Then
- homeYMinus.enabled = 1
- End If
- If BGirl.RotX = 105 Then
- Exit Sub
- End If
- If BGirl.RotX > 105 Then
- homeXMinus.enabled = 1
- End If
- End Sub
- Sub homeYAdd_Timer()
- If BGirl.RotY => -13 Then
- BGirl.RotY = -13
- me.enabled = 0
- End If
- BGirl.RotY = BGirl.RotY + 1
- End Sub
- Sub homeYMinus_Timer()
- If BGirl.RotY <= -13 Then
- BGirl.RotY = -13
- me.enabled = 0
- End If
- BGirl.RotY = BGirl.RotY - 1
- End Sub
- Sub homeXMinus_Timer()
- If BGirl.RotX <= 105 Then
- BGirl.RotX = 105
- me.enabled = 0
- End If
- BGirl.RotX = BGirl.RotX - 1
- End Sub
- Dim brpos
- Sub Bottom_Ramp_Timer()
- Select Case brpos
- Case 1:
- If RotXfrom74to90.RotX = 90 Then
- RotXfrom74to90.RotX = 90
- BotRamp1.collidable = 0
- Botramp.visible = 0
- BG_Lamp.state = 1
- bg_lamp2.state = 1
- bg_lamp3.state = 1
- PlaySound SoundFX("fx_solenoid",DOFContactors)
- bgwall1.isdropped = 0
- bgwall2.isdropped = 0
- me.enabled = 0
- End If
- RotXfrom74to90.RotX = RotXfrom74to90.RotX + 1
- Case 2:
- If RotXfrom74to90.RotX = 74 Then
- RotXfrom74to90.RotX = 74
- BotRamp1.collidable = 1
- Botramp.visible = 1
- BG_Lamp.state = 0
- bg_lamp2.state = 0
- bg_lamp3.state = 0
- PlaySound SoundFX("fx_solenoid",DOFContactors)
- bgwall1.isdropped = 1
- bgwall2.isdropped = 1
- me.enabled = 0
- End If
- RotXfrom74to90.RotX = RotXfrom74to90.RotX - 1
- End Select
- End Sub
- Dim cgdown, cgdownon
- Sub Cgrade_down_Timer()
- cgdownon = 1
- Select Case cgdown
- Case 1:Table.ColorGradeImage = "ColorGrade_on":cgdown = 2
- Case 2:Table.ColorGradeImage = "ColorGrade_7":cgdown = 3
- Case 3:Table.ColorGradeImage = "ColorGrade_6":cgdown = 4
- Case 4:Table.ColorGradeImage = "ColorGrade_5":cgdown = 5
- Case 5:Table.ColorGradeImage = "ColorGrade_4":cgdown = 6
- Case 6:Table.ColorGradeImage = "ColorGrade_4":cgdown = 7
- Case 7:Table.ColorGradeImage = "ColorGrade_4":cgdown = 8
- Case 8:Table.ColorGradeImage = "ColorGrade_4":cgdown = 9
- Case 9:Table.ColorGradeImage = "ColorGrade_4_blue":cgupon = 0:me.enabled = 0
- End Select
- End Sub
- Dim cgup, cgupon
- Sub Cgrade_up_Timer()
- cgupon = 1
- Select Case cgup
- Case 1:Table.ColorGradeImage = "ColorGrade_0":cgup = 2
- Case 2:Table.ColorGradeImage = "ColorGrade_1":cgup = 3
- Case 3:Table.ColorGradeImage = "ColorGrade_2":cgup = 4
- Case 4:Table.ColorGradeImage = "ColorGrade_3":cgup = 5
- Case 5:Table.ColorGradeImage = "ColorGrade_4":cgup = 6
- Case 6:Table.ColorGradeImage = "ColorGrade_5":cgup = 7
- Case 7:Table.ColorGradeImage = "ColorGrade_6":cgup = 8
- Case 8:Table.ColorGradeImage = "ColorGrade_7":cgup = 9
- Case 9:Table.ColorGradeImage = "ColorGrade_On":cgdownon = 0:me.enabled = 0
- End Select
- End Sub
- Dim bgstep
- bgstep = 1
- Sub Bicycle_Girl_Timer
- Select case bgstep
- Case 1:
- If BGirl.RotY <= -25 Then
- bgstep = 2
- End If
- BGirl.RotY = BGirl.RotY - 1
- 'Primitive_bicycleGirlHAIR.RotY = Primitive_bicycleGirlHAIR.RotY - 1
- Case 2:
- If BGirl.RotY => -13 Then
- bgstep = 3
- End If
- BGirl.RotY = BGirl.RotY + 1
- 'Primitive_bicycleGirlHAIR.RotY = Primitive_bicycleGirlHAIR.RotY + 1
- Case 3:
- If BGirl.RotY => 0 Then
- bgstep = 4
- End If
- BGirl.RotY = BGirl.RotY + 1
- 'Primitive_bicycleGirlHAIR.RotY = Primitive_bicycleGirlHAIR.RotY + 1
- Case 4:
- If BGirl.RotY <= -13 Then
- bgstep = 5
- End If
- BGirl.RotY = BGirl.RotY - 1
- 'Primitive_bicycleGirlHAIR.RotY = Primitive_bicycleGirlHAIR.RotY - 1
- Case 5:
- If BGirl.RotY <= -13 Then
- bgstep = 6
- End If
- BGirl.RotY = BGirl.RotY - 1
- 'Primitive_bicycleGirlHAIR.RotY = Primitive_bicycleGirlHAIR.RotY - 1
- Case 6:
- If BGirl.RotX => 115 Then
- bgstep = 7
- 'me.enabled = 0
- End If
- BGirl.RotX = BGirl.RotX + 1
- 'Primitive_bicycleGirlHAIR.RotX = Primitive_bicycleGirlHAIR.RotX + 1
- Case 7:
- If BGirl.RotX <= 105 Then
- bgstep = 1
- 'me.enabled = 0
- End If
- BGirl.RotX = BGirl.RotX - 1
- 'Primitive_bicycleGirlHAIR.RotX = Primitive_bicycleGirlHAIR.RotX - 1
- End Select
- End Sub
- Sub Trigger1_Hit()
- If Activeball.velY < 11 Then
- PlaySound "plastic_ramp"
- End If
- End Sub
- Sub Trigger2_Hit()
- If Activeball.velY < 20 Then
- PlaySound "plastic_ramp"
- End If
- End Sub
- Dim gspos
- gspos = 1
- Sub gateshadow_timer()
- Select Case gspos
- Case 1:
- f28a2.state = 0
- L1.visible = 1:L1R.visible = 1
- gspos = 2
- Case 2:
- L1.visible = 0:L1R.visible = 0
- L2.visible = 1:L2R.visible = 1
- gspos = 3
- Case 3:
- L2.visible = 0:L2R.visible = 0
- L3.visible = 1:L3R.visible = 1
- gspos = 4
- Case 4:
- L3.visible = 0:L3R.visible = 0
- L4.visible = 1:L4R.visible = 1
- 'gspos = 1
- f28a2.state = 1
- me.enabled = 0
- End Select
- End Sub
- Dim gspos1
- gspos1 = 1
- Sub gateshadowc_timer()
- Select Case gspos1
- Case 1:
- f28a2.state = 0
- L4.visible = 1:L4R.visible = 1
- gspos1 = 2
- Case 2:
- L4.visible = 0:L4R.visible = 0
- L3.visible = 1:L3R.visible = 1
- gspos1 = 3
- Case 3:
- L3.visible = 0:L3R.visible = 0
- L2.visible = 1:L2R.visible = 1
- gspos1 = 4
- Case 4:
- L2.visible = 0:L2R.visible = 0
- L1.visible = 1:L1R.visible = 1
- gspos1 = 5
- Case 5:
- L1.visible = 0:L1R.visible = 0
- f28a2.state = 1
- me.enabled = 0
- End Select
- End Sub
- Dim pwpos
- pwpos = 1
- Sub pwt_Timer()
- Select Case pwpos
- Case 1:
- If Primitive271.RotY => 10 Then
- pwpos = 2
- End If
- Primitive271.RotY = Primitive271.RotY + 0.1
- Case 2:
- If Primitive271.RotY <= 0 Then
- pwpos = 3
- End If
- Primitive271.RotY = Primitive271.RotY - 0.1
- Case 3:
- If Primitive271.RotY <= - 10 Then
- pwpos = 4
- End If
- Primitive271.RotY = Primitive271.RotY - 0.1
- Case 4:
- If Primitive271.RotY => 0 Then
- pwpos = 5
- End If
- Primitive271.RotY = Primitive271.RotY + 0.1
- Case 5:
- If Primitive271.RotX => 120 Then
- pwpos = 6
- End If
- Primitive271.RotX = Primitive271.RotX + 0.5
- Case 6:
- If Primitive271.RotX <= 114 Then
- pwpos = 7
- End If
- Primitive271.RotX = Primitive271.RotX - 0.5
- Case 7:
- If Primitive271.RotX <= 108 Then
- pwpos = 8
- End If
- Primitive271.RotX = Primitive271.RotX - 0.1
- Case 8:
- If Primitive271.RotX => 114 Then
- pwpos = 1
- End If
- Primitive271.RotX = Primitive271.RotX + 0.1
- End Select
- 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 bgcharctr:bgcharctr = 2
- Dim centerlocation:centerlocation = 90
- Dim bgdegree:bgdegree = 4 'move +/- 4 degrees
- Dim bgdurationctr:bgdurationctr = 0
- Dim bgcharctr2:bgcharctr2 = 2
- Dim centerlocation2:centerlocation2 = 0
- Dim bgdegree2:bgdegree2 = 4 'move +/- 6 degrees
- Dim bgdurationctr2:bgdurationctr2 = 0
- Sub LevelT_Timer()
- Level.RotAndTra7 = Level.RotAndTra7 + bgcharctr 'change rotation value by bgcharctr
- 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 = 4 'if amount of movement is 0, turn off LevelT timer and reset movement back to max 7 degrees
- End Sub
- Sub LevelT2_Timer()
- 'Dim loopctr
- 'Level.RotAndTra7 = Level.RotAndTra7 + bgcharctr 'change rotation value by bgcharctr
- leftzombie.ObjRotY = leftzombie.ObjRotY + bgcharctr2
- middlezombie.ObjRotY = middlezombie.ObjRotY + bgcharctr2
- rightzombie.ObjRotY = rightzombie.ObjRotY + bgcharctr2
- 'debug.print "Degrees: " & Level.RotAndTra7 & " Max degree offset: " & bgdegree & " Cycle count: " & bgdurationctr ''debug print
- If leftzombie.ObjRotY >= bgdegree2 + centerlocation2 then bgcharctr2 = -1:bgdurationctr2 = bgdurationctr2 + 1 'if level moves past max degrees, change direction and increate durationctr
- If leftzombie.ObjRotY <= -bgdegree2 + centerlocation2 then bgcharctr2 = 1 'if level moves past min location, change direction
- If bgdurationctr2 = 4 then bgdegree2 = bgdegree2 - 2:bgdurationctr2 = 0 'if level has moved back and forth 5 times, decrease amount of movement by -2 and repeat by resetting durationctr
- If bgdegree2 <= 0 then LevelT2.Enabled = False:bgdegree2 = 4 '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:bgcharctr2 = -1 'if nudge left, move in - direction
- If keycode = RightTiltKey then bgcharctr = 1:bgcharctr2 = 1 'if nudge left, 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 = 4
- LevelT2.Enabled = True:bgdurationctr2 = 0:bgdegree2 = 4
- End Sub
- '''walking dead pro switches
- Sub sw3_Hit()
- vpmTimer.PulseSw 3
- playsound SoundFX("fx_chapa",DOFTargets)
- Primitive271.TransY = Primitive271.TransY + 2
- me.timerenabled = 1
- End Sub
- Sub sw3_timer()
- Primitive271.TransY = Primitive271.TransY - 2
- sw3.timerenabled = 0
- End Sub
- 'Sub sw3_UnHit: Controller.Switch(3) = 0: End Sub
- 'Sub sw4_Hit : vpmTimer.PulseSw 4: playsound SoundFX("fx_chapa"): End Sub ' prison door closed
- Sub sw4_Hit : playsound SoundFX("fx_chapa",DOFShaker): End Sub ' prison door closed
- 'Sub sw4_UnHit: Controller.Switch(4) = 0: End Sub
- Sub sw9_Hit:Me.TimerEnabled = 1:dtLDrop.Hit 1:End Sub
- Sub sw9_Timer:Me.TimerEnabled = 0:End Sub
- Sub sw10_Hit:Me.TimerEnabled = 1:dtLDrop.Hit 2:End Sub
- Sub sw10_Timer:Me.TimerEnabled = 0:End Sub
- Sub sw11_Hit:Me.TimerEnabled = 1:dtLDrop.Hit 3:End Sub
- Sub sw11_Timer:Me.TimerEnabled = 0:End Sub
- Sub sw72_Hit : Controller.Switch(72) = 1: End Sub ' star top
- Sub sw72_UnHit: Controller.Switch(72) = 0: End Sub
- Sub sw70_Hit : Controller.Switch(70) = 1: End Sub ' star bottom
- Sub sw70_UnHit: Controller.Switch(70) = 0: End Sub
- Sub sw23_Hit : Controller.Switch(23) = 1: Playsound "rollover": GI_TroughCheck: End Sub ' shooter lane
- Sub sw23_UnHit: Controller.Switch(23) = 0: End Sub
- Sub sw24_Hit : Controller.Switch(24) = 1: Playsound "rollover": End Sub ' left outlane
- Sub sw24_UnHit: Controller.Switch(24) = 0: End Sub
- Sub sw25_Hit : Controller.Switch(25) = 1: Playsound "rollover": End Sub ' left inlane
- Sub sw25_UnHit: Controller.Switch(25) = 0: End Sub
- Sub sw28_Hit : Controller.Switch(28) = 1: Playsound "rollover": End Sub ' right inlane
- Sub sw28_UnHit: Controller.Switch(28) = 0: End Sub
- Sub sw29_Hit : Controller.Switch(29) = 1: Playsound "rollover": End Sub ' right outlane
- Sub sw29_UnHit: Controller.Switch(29) = 0: End Sub
- Sub sw33_Hit : Controller.Switch(33) = 1: Playsound "rollover": End Sub ' upper shooter lane
- Sub sw33_UnHit: Controller.Switch(33) = 0: End Sub
- Sub sw34_Hit : Controller.Switch(34) = 1: Playsound "Gate": End Sub ' upper shooter lane
- Sub sw34_UnHit: Controller.Switch(34) = 0: End Sub
- Sub sw35_Hit : vpmTimer.PulseSw 35: Playsound "Gate": End Sub ' l ramp exit
- Sub sw36_Hit : Controller.Switch(36) = 1: Playsound "rollover": End Sub 'left top lane
- Sub sw36_UnHit: Controller.Switch(36) = 0: End Sub
- Sub sw37_Hit : Controller.Switch(37) = 1: Playsound "rollover": End Sub 'right top lane
- Sub sw37_UnHit: Controller.Switch(37) = 0: End Sub
- Sub sw38_Hit : vpmTimer.PulseSw 38: Playsound SoundFX("Target",DOFTargets): End Sub 'tower standup
- Sub sw39_Hit : Controller.Switch(39) = 1: Playsound "rollover": End Sub 'right loop
- Sub sw39_UnHit: Controller.Switch(39) = 0: End Sub
- Sub sw41_Hit : Controller.Switch(41) = 1: Playsound "rollover": End Sub 'left loop
- Sub sw41_UnHit: Controller.Switch(41) = 0: End Sub
- Sub sw42_Hit : vpmTimer.PulseSw 42: Playsound "Gate": End Sub ' R ramp exit
- Sub sw43_Hit : vpmTimer.PulseSw 43: Playsound "Gate": End Sub ' L ramp entrance
- Sub sw44_Hit : Me.TimerEnabled = 1:SU1.TransX = -4:vpmTimer.PulseSw 44: Playsound SoundFX("Target",DOFTargets): End Sub 'l prison standup
- Sub sw44_Timer:Me.TimerEnabled = 0:SU1.TransX = 0:End Sub
- Sub sw45_Hit : Me.TimerEnabled = 1:SU2.TransX = -4:vpmTimer.PulseSw 45: Playsound SoundFX("Target",DOFTargets): End Sub 'r prison standup
- Sub sw45_Timer:Me.TimerEnabled = 0:SU2.TransX = 0:End Sub
- Sub door_hit_hit()
- Controller.Switch(46) = 1
- If ld.ObjRotZ = 0 Then
- PlaySound "metalhit2"
- ld.ObjRotZ = ld.ObjRotZ -2
- rd.ObjRotZ = rd.ObjRotZ +2
- me.timerenabled = 1
- End If
- End Sub
- Sub door_hit_timer()
- ld.ObjRotZ = ld.ObjRotZ +2
- rd.ObjRotZ = rd.ObjRotZ -2
- me.timerenabled = 0
- End Sub
- Sub door_hit_Unhit()
- Controller.Switch(46) = 0
- End Sub
- Sub LHD_Hit()
- PlaySound "ball_bounce"
- StopSound "plastic_ramp"
- End Sub
- Sub RHD_Hit()
- PlaySound "ball_bounce"
- StopSound "plastic_ramp"
- End Sub
- Sub sw47_Hit : Controller.Switch(47) = 1: Playsound "rollover":End Sub 'center lane
- Sub sw47_UnHit: Controller.Switch(47) = 0: End Sub
- Sub PrisonMag_Hit:PMag.AddBall ActiveBall:End Sub
- Sub PrisonMag_UnHit:PMag.RemoveBall ActiveBall:End Sub
- Sub DivMagnet_Hit:DMag.AddBall ActiveBall:End Sub
- Sub DivMagnet_UnHit:DMag.RemoveBall ActiveBall:End Sub
- Sub WWMag_Hit:WMag.AddBall ActiveBall:End Sub
- Sub WWMag_UnHit:WMag.RemoveBall ActiveBall:End Sub
- '***********************************************
- '***********************************************
- 'Slings
- '***********************************************
- '***********************************************
- Sub LeftSlingShot_Slingshot
- Leftsling = True
- Controller.Switch(26) = 1
- PlaySound Soundfx("left_slingshot",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 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("right_slingshot",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 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
- ' Impulse Plunger
- Const IMPowerSetting = 50
- Const IMTime = 0.6
- Set plungerIM = New cvpmImpulseP
- With plungerIM
- .InitImpulseP sw23, IMPowerSetting, IMTime
- .Switch 23
- .Random 1.5
- .InitExitSnd SoundFX("plunger",0), SoundFX("plunger",0)
- .CreateEvents "plungerIM"
- End With
- 'Bumpers
- Sub Bumper1_Hit:vpmTimer.PulseSw 30:PlaySound SoundFX("BumperRight",DOFContactors):BS1.visible = 0:me.timerenabled = 1:End Sub
- Sub Bumper2_Hit:vpmTimer.PulseSw 31:PlaySound SoundFX("BumperRight",DOFContactors):BS2.visible = 0:me.timerenabled = 1:End Sub
- Sub Bumper3_Hit:vpmTimer.PulseSw 32:PlaySound SoundFX("BumperRight",DOFContactors):BS3.visible = 0:me.timerenabled = 1:End Sub
- Sub Bumper3_Timer:BS3.visible = 1:End Sub
- Sub Bumper2_Timer:BS2.visible = 1:End Sub
- Sub Bumper1_Timer:BS1.visible = 1:End Sub
- '***********************************************
- '***********************************************
- ' Lamps
- '***********************************************
- '***********************************************
- Dim LampState(300), FadingLevel(300), FadingState(300)
- Dim FlashState(200), FlashLevel(200)
- Dim FlashSpeedUp, FlashSpeedDown
- Dim x
- AllLampsOff()
- LampTimer.Interval = 40 'lamp fading speed
- LampTimer.Enabled = 1
- '
- FlashInit()
- FlasherTimer.Interval = 10 'flash fading speed
- FlasherTimer.Enabled = 1
- 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)
- Next
- End If
- UpdateLamps
- End Sub
- Sub FlashInit
- Dim i
- For i = 0 to 200
- FlashState(i) = 0
- FlashLevel(i) = 0
- Next
- FlashSpeedUp = 500 ' fast speed when turning on the flasher
- FlashSpeedDown = 100 ' slow speed when turning off the flasher, gives a smooth fading
- AllFlashOff()
- End Sub
- Sub AllFlashOff
- Dim i
- For i = 0 to 200
- FlashState(i) = 0
- Next
- End Sub
- Sub UpdateLamps()
- nFadeL 3, l3
- nFadeL 4, l4
- nFadeL 5, l5
- nFadeL 6, l6
- 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 25, l25
- nFadeL 26, l26
- nFadeL 27, l27
- nFadeL 28, l28
- nFadeL 29, l29
- nFadeL 30, l30
- nFadeL 31, l31
- nFadeL 32, l32
- 'nFadeL 33, l33
- nFadeL 34, l34
- nFadeL 35, l35
- 'nFadeL 36, l36
- nFadeL 37, l37
- nFadeL 38, l38
- nFadeL 39, l39
- nFadeL 40, l40
- 'nFadeL 41, l41
- nFadeL 42, l42
- nFadeL 43, l43
- nFadeL 44, l44
- nFadeL 45, l45
- nFadeL 46, l46
- nFadeL 47, l47
- 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 58, l58
- 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
- nFadeLm 72, l72r
- nFadeL 72, l72
- nFadeLm 73, l73
- nFadeLm 73, l73b
- nFadeL 73, l73a
- nFadeLm 74, l74
- nFadeL 74, l74a
- nFadeLm 75, l75
- nFadeLm 75, l75b
- nFadeL 75, l75a
- nFadeL 76, l76
- nFadeL 77, l77
- nFadeL 78, l78
- 'nFadeL 132, f32
- Light10.Intensity = LampState(98) / 10
- l33.ColorFull = RGB(Lampstate(195),Lampstate(196),Lampstate(197))
- l57.ColorFull = RGB(Lampstate(187),Lampstate(188),Lampstate(189))
- l36.ColorFull = RGB(Lampstate(203),Lampstate(204),Lampstate(205))
- l24.ColorFull = RGB(Lampstate(168),Lampstate(169),Lampstate(170))
- l41.ColorFull = RGB(Lampstate(152),Lampstate(153),Lampstate(154))
- l80.ColorFull = RGB(Lampstate(133),Lampstate(134),Lampstate(135))
- l79.ColorFull = RGB(Lampstate(136),Lampstate(137),Lampstate(138))
- L106.ColorFull = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
- L107.ColorFull = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
- dim bulb
- for each bulb In GI
- bulb.color = RGB(0,0,0)
- bulb.colorfull = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
- next
- Back_Flash.color = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
- Back_Flash1.color = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
- F22F1.color = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
- F22F2.color = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
- F22F3.color = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
- F22F6.color = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
- F22F4.color = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
- F22F5.color = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
- Back_Flash2.color = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
- Back_Flash3.color = RGB(Lampstate(106),Lampstate(107),Lampstate(108))
- If LampState(106) AND LampState(107) AND LampState(108) > 100 Then
- If Dozer_Cab = 1 Then
- Controller.B2SSetData 133,1
- Controller.B2SSetData 134,0
- End If
- If NOT cgupon = 1 AND GiPulse = 1 Then
- cgup = 1:cgrade_up.enabled = 1
- End If
- Else
- If Dozer_Cab = 1 Then
- Controller.B2SSetData 133,0
- Controller.B2SSetData 134,1
- End If
- If NOT cgdownon = 1 AND GiPulse = 1 Then
- cgdown = 1:cgrade_down.enabled = 1
- End If
- End If
- dim bulb2
- for each bulb2 In GI2
- bulb2.color = RGB(0,0,0)
- bulb2.colorfull = RGB(Lampstate(109),Lampstate(114),Lampstate(149))
- next
- L184.State = Lampstate(184)
- L219.State = Lampstate(219)
- 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 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
- 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():For x = 1 to 200:LampState(x) = 4:FadingLevel(x) = 4:Next:UpdateLamps:UpdateLamps: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 = 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()
- End Sub
- Sub BallstopL_Hit: PlaySound "drop_left":End Sub
- Sub BallstopR_Hit: PlaySound "drop_Right": End Sub
- Sub Gate3_Hit: PlaySound "Gate": 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 / 20000)
- 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 = 8 ' total number of balls in this table is 4, but always use a higher number here bacuse of the timing
- 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 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
- Sub Table_exit()
- Controller.Pause = False
- Controller.Stop
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement