-
Notifications
You must be signed in to change notification settings - Fork 37
/
Beavis and Butt-head_Pinballed.vbs
2771 lines (2514 loc) · 86.7 KB
/
Beavis and Butt-head_Pinballed.vbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
'88888bab 8888888b .d888888 dP dP dP .d88888b dP
'88 `8b 88 d8' 88 88 88 88 88. "' 88
'88aaaa8P' 88aaaa 88aaaaa8a 88 .8P 88 `Y88888b. .d8888b. 88d888b. .d888b88
'88 `8b. 88 88 88 88 d8' 88 `8b 88' `88 88' `88 88' `88
'88 .88 88 88 88 88 .d8P 88 d8' .8P 88. .88 88 88 88. .88
'88888888P 88888888 88 88 888888' dP Y88888P `88888P8 dP dP `88888P8
'888888ba dP dP dd888888PP dd888888PP dP dP 88888888b .d888888 888888ba
'88 `8b 88 88 88 88 88 88 88 d8' 88 88 `8b
'88aaaa8P' 88 88 88 88 88aaaaa88 88aaaa 88aaaaa88 88 88
'88 `8b. 88 88 88 88 88 88 88 88 88 88 88
'88 .88 Y8. .8P 88 88 88 88 88 88 88 88 .8P
'88888888P `Y88888P' dP dP dP dP 88888888P 88 88 8888888P
' ItItIttIIIIIIIIIIIYIt+tIIIIIYIYIIIYIIIIYYYIIIYIIYYIIIIYIIIIIIIYYIIIYIYi=+RWMWW
' VIIItttItYItIIIIII;,....;IYYIIYIIIItIIIItIIIIIIIIi+ttiii+ttitIIItIIYYYi;+VWWBR
' +tItttiIIIIIYIYI=........,IiitItIIII BY IIIIIII+tRBBBBBBXMBRtIitIYYYYYt;=RWWMB
' iititttttIIIIYY,.............iII watacaractr +tVBBBMBBMBMMBBBBXV+tIIYYt=:RRXRB
' ttttitIIIYYIYI:..............,IItttIIIttIIIIt;RBBBBBBBBBBBBBBBBBYiYYYY+=;VXXXR
' ttItttIIIYYYIi.....,..........=tiii 2022 tII=tBBBBBBBBBBBBBMBBBBBtIYVYi;:++=i+
' ttttttIIIIIIt....;VR+....;i+,..+tttttttittIti+RBXBBMBMBBBMBMBBBBBIIYVYt:+ii+++
' ttttttttttttt,..=BBBBIi,YRBRV:.;ittttttttttIiiiVYIRIYYYiXRBBBBBBBX+IIIItItIIII
' tttttittttIIt,.;RBBBRBBBBBBBBV.=ttttttttttttittt=YVYIYYYIYRRBBBBBYiIIIIIIIItIt
' tttittttIIIII+.=RBBXXRBBBBXXBB+=ttttttttItIttii=RRBBBBBBBXtBBBBBBIttttIIIItIti
' ttttttIIIItIII:iRBBRtiRRX+IXRB:tttItttttIIItIti+RBBBRBBBBBtBBBBBB+tttItttIttIt
' IttttIYIIIItIti+RBBBRRBRYRBBBR=tttttIttIIIItItt=BBBBBXYXRRIBBBBBX=ttttttttittt
' tttttItIIIIIIt=+XRBRi+RBt=YRBt+tItIIItIIIIttItt;RRBVYYBBBVYBBBBB+ttItttttttItt
' ttiittttIIIIItItiBRBYXIYIRBBVitIIIIIItItIIttttt++VIIIXBBBR++iBRIitttttttitItit
' tiiittttttIIItIt=RRBBBBRBBRR+IIIIIYIItttttttttti=iiVVRBBBBBt+RR+tttIttitittttt
' ti++titittItIIIIttRIXYi+iYIViIIYYIYYYIIIItItttt+;YYVRBBRRRBYRttttttttIIttttttt
' ti++i++ttii+i++++=VBRBXVBBR+iiiiiiiti+ittIiii++=Yi=tVRBX+VRBBi=tt+tiitttItitII
' YitIt+++==++++=++++VRXVVYR+==++++++++++i=i+iii++i;YI++i+IRRRR+++++ii+=++++++iY
' Ytt;:=======+==++++;RBBBBX;=++++++++++++=:++++++:+tIVRRBBBBBRi+++++++====+=+iX
' YI+====+=======+=++=IBBBBi==+++++++++++==,++==++;IVIii++IRRRBt::++++++i=+=++tY
' YY+;=====++===;==+;,;RRRV=,:=++;+;++++++=,+++++++=+=++,:,=It=:,,,=++;++i+i=itI
' VV;;=;==+===:;,;;;===;;;====::+:+:+iii+i+:i++++++=:;:.:::::::::::.;::++++==++i
' IV;;;====+===+;:=++=======+==,;;;++++++i;:+++++=++;;;...,.,...,,+.;:=+=+ii;+=i
Option Explicit
Randomize
Const BallSize = 52
Const BallMass = 1.2
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
Dim DesktopMode:DesktopMode = Table1.ShowDT
Const cGameName= "beav_butt"
LoadVPM "02800000", "beav_butt.VBS", 3.50
'********************
'Standard definitions
'********************
Const UseSolenoids = 1
Const UseLamps = 1
Const UseSync = 1
Const UseGI = 0
' Standard Sounds
Const SSolenoidOn = "SolenoidOn"
Const SSolenoidOff = "SolenoidOff"
Const SCoin = "fx_Coin"
'******************************************************
' Initialize the table
'******************************************************
Dim bsSaucer,bsScoop, bsTK, dtBankL, dtBankR, xx
Sub Table1_Init
Controller.Games("beav_butt").Settings.Value("sound_mode") =1
With Controller
.GameName = cGameName
If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
.SplashInfoLine = "Beavis & Butt-head (Bally 1993)"
.HandleKeyboard = 0
.ShowTitle = 0
.ShowDMDOnly = 1
.ShowFrame = 0
.HandleMechanics = 0
.dip(0) = &H00 'Set DIP to USA
.Hidden = 0
On Error Resume Next
.Run 'GetPlayerHWnd
If Err Then MsgBox Err.Description
On Error Goto 0
End With
' Thalamus : Was missing 'vpminit me'
vpminit me
'** Main Timer init
' PinMAMETimer.Interval = PinMAMEInterval
' PinMAMETimer.Enabled = 1
Playsound "B&BWarning"
'** Nudging
vpmNudge.TiltSwitch = 151
vpmNudge.Sensitivity = 4
vpmNudge.TiltObj = Array(sw10, sw11, sw12, sw13, sw14)
Set bsScoop = New cvpmBallStack
With bsScoop
.InitSaucer Sw52, 52, 120, 0
.InitExitSnd SoundFX("CenterEject", DOFContactors), SoundFX("CenterEject", DOFContactors)
End With
Set bsTK = New cvpmBallStack
With bsTK
.InitSaucer Sw53k, 53, 20, 50
.InitExitSnd SoundFX("LeftEject", DOFContactors), SoundFX("LeftEject", DOFContactors)
.KickZ = 3.1415926/3
.CreateEvents "bsTK", sw53k
End With
'** DropTargets Bank (Left)
Set dtBankL = new cvpmDropTarget
With dtBankL
.InitDrop Array(sw16,sw26,sw36,sw46),Array(16,26,36,46)
.Initsnd SoundFX("fx_drop_target_down",DOFDropTargets), SoundFX("fx_drop_target_up",DOFDropTargets)
End With
'** DropTargets Bank (Right)
Set dtBankR = new cvpmDropTarget
With dtBankR
.InitDrop Array(sw17,sw27,sw37,sw47),Array(17,27,37,47)
.Initsnd SoundFX("fx_drop_target_down",DOFDropTargets), SoundFX("fx_drop_target_up",DOFDropTargets)
End With
'** Other Suff
InitRolling:InitLamps:InitTrough:DiverterOn.Collidable=0
SideRails.visible=DesktopMode
End Sub
Sub kicker1_Hit
PlaySound "fx_subwayramproll"
kicker1.Destroyball
sw53k.CreateBall
bsTK.AddBall 0
mtvlight.state = 0
beavisrampplasticlight.state = 0
buttheadrampplasticlight.state = 0
End Sub
Sub kicker2_Hit
PlaySound "fx_subwayramproll"
vpmtimer.addtimer 1500, "MyLightACounter = 0:Timer001.Enabled = 1:bsscoop.AddBall kicker2 '"
End Sub
'******************************************************
' Keys
'******************************************************
Sub Table1_KeyDown(ByVal keycode)
If keycode = LeftTiltKey Then Nudge 90, 5:PlaySoundAt SoundFX("fx_nudge",0), InstructionCard
If keycode = RightTiltKey Then Nudge 270, 5:PlaySoundAt SoundFX("fx_nudge",0), PriceCard
If keycode = CenterTiltKey Then Nudge 0, 6:PlaySoundAt SoundFX("fx_nudge",0), Drain
If keycode = PlungerKey Then Plunger.PullBack:PlaySoundAt "fx_plungerpull",Plunger
If vpmKeyDown(keycode) Then Exit Sub
End Sub
Sub Table1_KeyUp(ByVal keycode)
If keycode = PlungerKey Then Plunger.Fire:StopSound "plungerpull":PlaySoundAt "fx_plunger",Plunger
if vpmKeyUp(keycode) Then Exit Sub
End Sub
Sub Table1_Paused:Controller.Pause = True:End Sub
Sub Table1_unPaused:Controller.Pause = False:End Sub
Sub Table1_exit():Controller.Pause = False:Controller.Stop:Controller.Games("beav_butt").Settings.Value("sound_mode") =0
End Sub
'******************************************************
' Solenoids Map
'******************************************************
'(**) Used in backbox (translite)
'SolCallback(1) = "" '1 - Left Bumper
'SolCallback(2) = "" '2 - Right Bumper
'SolCallback(3) = "" '3 - Bottom Bumper
'SolCallback(4) = "" '4 - Left Slingshot
'SolCallback(5) = "" '5 - Right Slingshot
SolCallback(6) = "SolVUK" '6 - Bottom Scoop
SolCallback(7) = "bsTK.SolOut" '7 - Top Upkicker
SolCallback(8) = "dtBankL.SolDropUp" '8 - Left Bank Reset
SolCallback(9) = "dtBankR.SolDropUp" '9 - Right Bank Reset
SolCallback(10) = "SolDiv" '10 - Diverter
SolCallback(11) = "SolHeadbangersSpecial" '11 - Headbangers Special
SolCallback(12) = "SolHeadbangers" '12 - Headbangers
SolCallback(22) = "SetLamp 152," '22 - Flasher:Ramps #1 (2)
SolCallback(23) = "SetLamp 153," '23 - Flasher:Ramps #2 (2)
SolCallback(24) = "SetLamp 154," '24 - Flasher:Ramps #3 (2)
SolCallback(25) = "SetLamp 155," '25 - Flasher:Devil Horns
SolCallback(26) = "GIRelay" '26 - LightBox Relay
SolCallback(27) = "" '27 - Ticket/Coin Meter
SolCallback(28) = "ReleaseBall" '28 - Ball Release
SolCallback(29) = "SolOuthole" '29 - Outhole.
SolCallback(30) = "SolKnocker" '30 - Knocker
SolCallback(31) = "TiltRelay" '31 - Tilt Relay
SolCallback(32) = "SolRun" '32 - Game Over Relay
Sub SolRun(Enabled)
vpmNudge.SolGameOn Enabled
lightDMDborder.State = Enabled
Dim GOoffon
GOoffon = ABS(ABS(Enabled))
If B2SOn = True Then
Controller.B2SSetData 98, GOoffon
End If
End Sub
SolCallback(sLRFlipper) = "SolRFlipper"
SolCallback(sLLFlipper) = "SolLFlipper"
'******************************************************
' TROUGH BASED ON FOZZY'S
'******************************************************
'Init Trough
Sub InitTrough
Slot1.CreateSizedballWithMass Ballsize/2,Ballmass
Slot2.CreateSizedballWithMass Ballsize/2,Ballmass
Controller.Switch(44) = 1
Controller.Switch(54) = 0
End Sub
'Handle Trough
Sub Slot2_Hit():UpdateTrough:End Sub
Sub Slot1_Hit():Controller.Switch(44) = 1:UpdateTrough:End Sub
Sub Slot1_UnHit():Controller.Switch(44) = 0:UpdateTrough:End Sub
Sub UpdateTrough()
Slot1.TimerInterval = 300
Slot1.TimerEnabled = 1
End Sub
Sub Slot1_Timer()
Me.TimerEnabled = 0
If Slot1.BallCntOver = 0 Then Slot2.kick 60, 9
End Sub
'Drain & Release
Sub Drain_Hit()
PlaySoundAt "",Drain
UpdateTrough
Controller.Switch(54) = 1
End Sub
Sub swdrain_hit
if l50.state = 1 Then
Playsound "fx_drain"
Else
Playsound "fx_drain_laughs"
End If
End Sub
Sub Drain_UnHit()
Controller.Switch(54) = 0
End Sub
Sub SolOuthole(enabled)
If enabled Then
Drain.kick 60,20
PlaySoundAt SoundFX(SSolenoidOn, DOFContactors), Drain
Else
PlaySoundAt SSolenoidOff, Drain
End If
End Sub
Sub ReleaseBall(enabled)
If enabled Then
PlaySoundAt SoundFX("fx_ballrel",DOFContactors), Drain
Slot1.kick 60, 12
UpdateTrough
End If
End Sub
'******************************************************
' Solenoids Routines
'******************************************************
'*********** Knocker
Sub SolKnocker(enabled)
If Enabled Then
PlaySoundAt SoundFX("Knocker",DOFKnocker), l82
End If
End Sub
'*********** Flippers
Sub SolLFlipper(Enabled)
If Enabled Then
PlaySoundAt SoundFX("fx_flipperup", DOFFlippers), LeftFlipper
LeftFlipper.RotateToEnd
Else
PlaySoundAt SoundFX("fx_flipperdown", DOFFlippers), LeftFlipper
LeftFlipper.RotateToStart
End If
End Sub
Sub SolRFlipper(Enabled)
If Enabled Then
PlaySoundAt SoundFX("fx_flipperup", DOFFlippers), RightFlipper
RightFlipper.RotateToEnd
Else
PlaySoundAt SoundFX("fx_flipperdown", DOFFlippers), RightFlipper
RightFlipper.RotateToStart
End If
End Sub
'*********** Scoop
Sub SolVUK(enabled)
If Enabled Then
If bsScoop.Balls > 0 Then
sw52.timerinterval=500:sw52.timerEnabled=1
CenterHole.Enabled=0
bsScoop.ExitSol_On
If MyLightACounter > 25 Then
tvlightboobtubeA.duration 1, 2300, 0
tvlightboobtubeB.duration 1, 2300, 0
tablelamplightA.duration 0, 2300, 1
tablelamplightB.duration 0, 2300, 1
Playsound "fx_light_switch"
Timer001.Enabled = 0
Dim bpw
bpw = INT(3 * RND(1) )
Select Case bpw
Case 0:Playsound "fx_boobie_prize_win_boing"
Case 1:Playsound "fx_boobie_prize_win_hey_baby"
Case 2:Playsound "fx_boobie_prize_win_big_boobies"
End Select
Else
tvlightA.duration 1, 2300, 0
tvlightB.duration 1, 2300, 0
tablelamplightA.duration 0, 2300, 1
tablelamplightB.duration 0, 2300, 1
Playsound "fx_light_switch"
Timer001.Enabled = 0
Dim bpl
bpl = INT(4 * RND(1) )
Select Case bpl
Case 0:Playsound "fx_beavis_this_sucks"
Case 1:Playsound "fx_uhh_change_it"
Case 2:Playsound "fx_dammit_beavis_remote"
Case 3:Playsound "fx_whats_wrong_with_the_tv"
End Select
End If
End If
End If
End Sub
sub sw52_timer:me.timerEnabled=0:CenterHole.Enabled=1:end Sub
Dim MyLightACounter
MyLightACounter = 0
Sub Timer001_Timer
MyLightACounter = MyLightACounter +1
End Sub
'*********** Kickback
Dim kickbackenabled: kickbackenabled = True: kickbacklight.duration 2, 100, 2
Dim sw57Hits
Sub kickbackstartswitch_Hit
kickbackenabled = True
kickbacklight.duration 0, 1000, 1:l99.state=0
End Sub
Sub sw57_Hit
if Activeball.vely < 0 then
sw57Hits = sw57Hits + 1
If sw57Hits = 2 Then
kickbackenabled = True
kickbacklight.state=1:l99.state=0:
sw57Hits = 0
End If
End If
End Sub
Sub sw56_Hit
If kickbackenabled = True Then
kickbackplunger.Fire
PlaySoundAt SoundFX("CenterEject",DOFContactors), kickbackplunger
Playsound "fx_beavis_kick"
kickburstlight.duration 2, 450, 0
kickbackenabled = False
kickbacklight.state=0:l99.state=1
kickbackplunger.Pullback
End If
End Sub
'*********** Diverter
Dim DiverterDir
Sub SolDiv(Enabled)
If Enabled Then
DiverterOn.Collidable=1
DiverterDir = -1
Diverter.Interval = 5:Diverter.Enabled = 1
PlaySoundAt SoundFX("DiverterOn",DOFContactors),DiverterP
Else
DiverterOn.Collidable=0
DiverterDir = +1
Diverter.Interval = 5:Diverter.Enabled = 1
PlaySoundAt SoundFX("DiverterOn",DOFContactors),DiverterP
End If
End Sub
Sub Diverter_Timer()
DiverterP.RotZ=DiverterP.RotZ+DiverterDir
If DiverterP.RotZ>-45 AND DiverterDir=1 Then Me.Enabled=0:DiverterP.RotZ=+90
If DiverterP.RotZ<-0 AND DiverterDir=-1 Then Me.Enabled=0:DiverterP.RotZ=-0
End Sub
'********* B&B Headbangers Special
Sub SolHeadbangersSpecial(enabled)
If enabled Then
Buttheadarm.RotZ=20
Buttheadhead.RotZ=-18
Buttheadneck.RotZ=-18
BeavisArm.RotZ=20
Beavishead.RotZ=18
Beavisneck.RotZ=18
Else
Buttheadarm.RotZ=0
Buttheadhead.RotZ=0
Buttheadneck.RotZ=0
BeavisArm.RotZ=0
Beavishead.RotZ=0
Beavisneck.RotZ=0
End If
End Sub
'********* Beavis & Butt-head Prims
Sub SolHeadbangers(enabled)
If enabled Then
Buttheadhead.RotZ=-5
Buttheadneck.RotZ=-5
Beavishead.RotZ=-5
Beavisneck.RotZ=-5
Else
Buttheadhead.RotZ=0
Buttheadneck.RotZ=0
Beavishead.RotZ=0
Beavisneck.RotZ=0
End If
End Sub
'******************************************************
' Switches
'******************************************************
'Bumpers
Sub sw10_Hit() : vpmTimer.PulseSw 10 : PlaySoundAt SoundFX("LeftBumper_Hit",DOFContactors), ActiveBall:light14.duration 0, 200, 1: Playsound "bumper_1_hit":End Sub
Sub sw11_Hit() : vpmTimer.PulseSw 11 : PlaySoundAt SoundFX("RightBumper_Hit",DOFContactors), ActiveBall:light16.duration 0, 200, 1: Playsound "bumper_2_hit":End Sub
Sub sw12_Hit() : vpmTimer.PulseSw 12 : PlaySoundAt SoundFX("CenterBumper_Hit",DOFContactors), ActiveBall:light13.duration 0, 200, 1: Playsound "bumper_3_hit":End Sub
'Slings
Dim LStep,RStep
Sub sw13_Slingshot
PlaySoundAt SoundFX("LeftSlingShot",DOFContactors), ActiveBall: Playsound "fx_butthead_sling_grunt": Playsound "fx_richochet":
light1.duration 0, 100, 1
light2.duration 0, 100, 1
light3.duration 0, 100, 1
light4.duration 0, 100, 1
vpmTimer.PulseSw 13
LSling.Visible = 0
LSling1.Visible = 1
sling1.TransZ = -20:SlingHornsLeft.RotX = 15:hornsLEFTscrews.RotX = 15
LStep = 3
Me.TimerInterval = 75
Me.TimerEnabled = 1
End Sub
Sub sw13_Timer
Select Case LStep
Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling1.TransZ = -10:SlingHornsLeft.RotX = 15:hornsLEFTscrews.RotX = 15:hornsLEFTshaft.RotX = 15:hornsLEFTshaftSHADOW.RotX = 15
Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:sling1.TransZ = 0:SlingHornsLeft.RotX = -10:hornsLEFTscrews.RotX = -10:hornsLEFTshaft.RotX = -10:hornsLEFTshaftSHADOW.RotX = -10:Me.TimerEnabled = 0
End Select
LStep = LStep + 1
End Sub
Sub sw14_Slingshot
PlaySoundAt SoundFX("RightSlingShot",DOFContactors), ActiveBall: Playsound "fx_beavis_sling_grunt": Playsound "fx_richochet_2":
light19.duration 0, 100, 1
light20.duration 0, 100, 1
light21.duration 0, 100, 1
light22.duration 0, 100, 1
vpmTimer.PulseSw 14
RSling.Visible = 0
RSling1.Visible = 1
sling2.TransZ = -20:SlingHornsRight.RotX = 15:hornsRIGHTscrews.RotX = 15
RStep = 3
Me.TimerInterval = 75
Me.TimerEnabled = 1
End Sub
Sub sw14_Timer
Select Case RStep
Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling2.TransZ = -10:SlingHornsRight.RotX = 15:hornsRIGHTscrews.RotX = 15:hornsRIGHTshaft.RotX = 15:hornsRIGHTshaftSHADOW.RotX = 15
Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:sling2.TransZ = 0:SlingHornsRight.RotX = -10:hornsRIGHTscrews.RotX = -10:hornsRIGHTshaft.RotX = -10:hornsRIGHTshaftSHADOW.RotX = -10:Me.TimerEnabled = 0
End Select
RStep = RStep + 1
End Sub
'Frog Pinball Spinner
Sub sw15_Spin: vpmtimer.pulsesw 15:PlaySoundAt "fx_spinner", sw15: End Sub
Sub swbuttheadstare_hit
if Activeball.vely < 0 then
Playsound "frogspinnerlaughs"
if ButtheadHead.roty=0 then
me.uservalue = -1
me.timerinterval = 10
me.timerenabled = 1
end if
end if
if l59.state = 1 Then
Stopsound "frogspinnerlaughs"
if arrow2.visible = 1 Then
Stopsound "frogspinnerlaughs"
End If
End If
if l58.state = 1 Then
Stopsound "frogspinnerlaughs"
if arrow1.visible = 1 Then
Stopsound "frogspinnerlaughs"
End If
End If
End Sub
Sub swbuttheadstare_timer
ButtheadHead.roty = ButtheadHead.roty + (me.uservalue * 4.0)
ButtheadArm.roty = ButtheadHead.roty
ButtheadBody.roty = ButtheadHead.roty
ButtheadNeck.roty = ButtheadHead.roty
ButtheadPrimShadow.roty = ButtheadHead.roty
if ButtheadHead.roty < - 40 Then
me.uservalue = 1
swbuttheadstare.timerenabled = 0
vpmtimer.addtimer 3000, "swbuttheadstare.timerenabled = 1 '"
end If
if ButtheadHead.roty > 0 Then
ButtheadHead.roty = 0
me.timerenabled = 0
end if
end sub
Sub swbeavisstare_hit
if BeavisHead.roty=0 then
me.uservalue = 1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub swbeavisstare_timer
BeavisHead.roty = BeavisHead.roty + (me.uservalue * 4.0)
BeavisArm.roty = BeavisHead.roty
BeavisBody.roty = BeavisHead.roty
BeavisNeck.roty = BeavisHead.roty
BeavisPrimShadow.roty = BeavisHead.roty
if BeavisHead.roty > 45 Then
me.uservalue = -1
swbeavisstare.timerenabled = 0
vpmtimer.addtimer 3000, "swbeavisstare.timerenabled = 1 '"
end If
if BeavisHead.roty < 0 Then
BeavisHead.roty = 0
me.timerenabled = 0
end if
end sub
'StewartSpinner
Sub stewartspinner_Spin:if Activeball.vely > 0 then:PlaySound "fx_spinner": End If:End Sub
'Drop Targets
Sub sw16_dropped:dtBankL.Hit 1: Playsound "fx_butthead_drop_guitar_2":
if ButtheadHead.rotz=0 then
me.uservalue = 1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw16_timer
ButtheadHead.rotz = ButtheadHead.rotz + (me.uservalue * 3)
ButtheadNeck.rotz = ButtheadHead.rotz
ButtheadArm.rotz = ButtheadHead.rotz
if ButtheadHead.rotz > 10 Then
me.uservalue = -1
sw16.timerenabled = 0
vpmtimer.addtimer 350, "sw16.timerenabled = 1 '"
end If
if ButtheadHead.rotz < 0 Then
ButtheadHead.rotz = 0
me.timerenabled = 0
end if
End Sub
Sub sw26_dropped:dtBankL.Hit 2: Playsound "fx_butthead_drop_guitar_4":
if ButtheadHead.rotz=0 then
me.uservalue = 1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw26_timer
ButtheadHead.rotz = ButtheadHead.rotz + (me.uservalue * 3)
ButtheadNeck.rotz = ButtheadHead.rotz
ButtheadArm.rotz = ButtheadHead.rotz
if ButtheadHead.rotz > 10 Then
me.uservalue = -1
sw26.timerenabled = 0
vpmtimer.addtimer 350, "sw26.timerenabled = 1 '"
end If
if ButtheadHead.rotz < 0 Then
ButtheadHead.rotz = 0
me.timerenabled = 0
end if
End Sub
Sub sw36_dropped:dtBankL.Hit 3: Playsound "fx_butthead_drop_guitar_3":
if ButtheadHead.rotz=0 then
me.uservalue = 1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw36_timer
ButtheadHead.rotz = ButtheadHead.rotz + (me.uservalue * 3)
ButtheadNeck.rotz = ButtheadHead.rotz
ButtheadArm.rotz = ButtheadHead.rotz
if ButtheadHead.rotz > 10 Then
me.uservalue = -1
sw36.timerenabled = 0
vpmtimer.addtimer 350, "sw36.timerenabled = 1 '"
end If
if ButtheadHead.rotz < 0 Then
ButtheadHead.rotz = 0
me.timerenabled = 0
end if
End Sub
Sub sw46_dropped:dtBankL.Hit 4: Playsound "fx_butthead_drop_guitar_1":
if ButtheadHead.rotz=0 then
me.uservalue = 1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw46_timer
ButtheadHead.rotz = ButtheadHead.rotz + (me.uservalue * 3)
ButtheadNeck.rotz = ButtheadHead.rotz
ButtheadArm.rotz = ButtheadHead.rotz
if ButtheadHead.rotz > 10 Then
me.uservalue = -1
sw46.timerenabled = 0
vpmtimer.addtimer 350, "sw46.timerenabled = 1 '"
end If
if ButtheadHead.rotz < 0 Then
ButtheadHead.rotz = 0
me.timerenabled = 0
end if
End Sub
Sub sw17_dropped:dtBankR.Hit 1: Playsound "fx_beavis_drink_1":
if BeavisHead.rotz=0 then
me.uservalue = -1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw17_timer
BeavisHead.rotz = BeavisHead.rotz + (me.uservalue * 3)
BeavisNeck.rotz = BeavisHead.rotz
BeavisArm.rotz = BeavisHead.rotz
if BeavisHead.rotz < - 10 Then
me.uservalue = 1
sw17.timerenabled = 0
vpmtimer.addtimer 750, "sw17.timerenabled = 1 '"
end If
if BeavisHead.rotz > 0 Then
BeavisHead.rotz = 0
me.timerenabled = 0
end if
End Sub
Sub sw27_dropped:dtBankR.Hit 2: Playsound "fx_beavis_eat_1":
if BeavisHead.rotz=0 then
me.uservalue = 1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw27_timer
BeavisHead.rotz = BeavisHead.rotz + (me.uservalue * 3)
BeavisNeck.rotz = BeavisHead.rotz
BeavisArm.rotz = BeavisHead.rotz
if BeavisHead.rotz > 10 Then
me.uservalue = -1
sw27.timerenabled = 0
vpmtimer.addtimer 750, "sw27.timerenabled = 1 '"
end If
if BeavisHead.rotz < 0 Then
BeavisHead.rotz = 0
me.timerenabled = 0
end if
End Sub
Sub sw37_dropped:dtBankR.Hit 3: Playsound "fx_beavis_drink_2":
if BeavisHead.rotz=0 then
me.uservalue = -1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw37_timer
BeavisHead.rotz = BeavisHead.rotz + (me.uservalue * 3)
BeavisNeck.rotz = BeavisHead.rotz
BeavisArm.rotz = BeavisHead.rotz
if BeavisHead.rotz < - 10 Then
me.uservalue = 1
sw37.timerenabled = 0
vpmtimer.addtimer 750, "sw37.timerenabled = 1 '"
end If
if BeavisHead.rotz > 0 Then
BeavisHead.rotz = 0
me.timerenabled = 0
end if
End Sub
Sub sw47_dropped:dtBankR.Hit 4: Playsound "fx_beavis_eat_2":
if BeavisHead.rotz=0 then
me.uservalue = 1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw47_timer
BeavisHead.rotz = BeavisHead.rotz + (me.uservalue * 3)
BeavisNeck.rotz = BeavisHead.rotz
BeavisArm.rotz = BeavisHead.rotz
if BeavisHead.rotz > 10 Then
me.uservalue = -1
sw47.timerenabled = 0
vpmtimer.addtimer 750, "sw47.timerenabled = 1 '"
end If
if BeavisHead.rotz < 0 Then
BeavisHead.rotz = 0
me.timerenabled = 0
end if
End Sub
'Standup Targets
Sub Sw20_Hit():vpmTimer.PulseSw 20: PlaysoundAt SoundFX("fx_target",DOFTargets), ActiveBall: Playsound "fx_butthead_hit_3":
if ButtheadHead.roty=0 then
me.uservalue = 1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw20_timer
ButtheadHead.roty = ButtheadHead.roty + (me.uservalue * 3)
if ButtheadHead.roty > 40 Then
me.uservalue = -1
sw20.timerenabled = 0
vpmtimer.addtimer 400, "sw20.timerenabled = 1 '"
end If
if ButtheadHead.roty < 0 Then
ButtheadHead.roty = 0
me.timerenabled = 0
end if
End Sub
Sub Sw30_Hit():vpmTimer.PulseSw 30: PlaysoundAt SoundFX("fx_target",DOFTargets), ActiveBall: Playsound "fx_butthead_hit_2":
if ButtheadHead.rotz=0 then
me.uservalue = 1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw30_timer
ButtheadHead.rotz = ButtheadHead.rotz + (me.uservalue * 3)
ButtheadNeck.rotz = ButtheadHead.rotz
if ButtheadHead.rotz > 14 Then
me.uservalue = -1
sw30.timerenabled = 0
vpmtimer.addtimer 400, "sw30.timerenabled = 1 '"
end If
if ButtheadHead.rotz < 0 Then
ButtheadHead.rotz = 0
me.timerenabled = 0
end if
End Sub
Sub Sw40_Hit():vpmTimer.PulseSw 40: PlaysoundAt SoundFX("fx_target",DOFTargets), ActiveBall: Playsound "fx_butthead_hit_1":
if ButtheadHead.roty=0 then
me.uservalue = -1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw40_timer
ButtheadHead.roty = ButtheadHead.roty + (me.uservalue * 3)
if ButtheadHead.roty < - 40 Then
me.uservalue = 1
sw40.timerenabled = 0
vpmtimer.addtimer 400, "sw40.timerenabled = 1 '"
end If
if ButtheadHead.roty > 0 Then
ButtheadHead.roty = 0
me.timerenabled = 0
end if
End Sub
Sub Sw21_Hit():vpmTimer.PulseSw 21: PlaysoundAt SoundFX("fx_target",DOFTargets), ActiveBall:
Dim fft1
fft1 = INT(5 * RND(1) )
Select Case fft1
Case 0:Playsound "fx_fast_food_splotch_hit_1"
Case 1:Playsound "fx_fast_food_splotch_hit_2"
Case 2:Playsound "fx_fast_food_splotch_hit_3"
Case 3:Playsound "fx_burp"
Case 4:Playsound ""
End Select
End Sub
Sub Sw31_Hit():vpmTimer.PulseSw 31: PlaysoundAt SoundFX("fx_target",DOFTargets), ActiveBall:
Dim fft2
fft2 = INT(5 * RND(1) )
Select Case fft2
Case 0:Playsound "fx_fast_food_splotch_hit_1"
Case 1:Playsound "fx_fast_food_splotch_hit_2"
Case 2:Playsound "fx_fast_food_splotch_hit_3"
Case 3:Playsound "fx_burp"
Case 4:Playsound ""
End Select
End Sub
Sub Sw41_Hit():vpmTimer.PulseSw 41: PlaysoundAt SoundFX("fx_target",DOFTargets), ActiveBall:
Dim fft3
fft3 = INT(5 * RND(1) )
Select Case fft3
Case 0:Playsound "fx_fast_food_splotch_hit_1"
Case 1:Playsound "fx_fast_food_splotch_hit_2"
Case 2:Playsound "fx_fast_food_splotch_hit_3"
Case 3:Playsound "fx_burp"
Case 4:Playsound ""
End Select
End Sub
Sub Sw22_Hit():vpmTimer.PulseSw 22: PlaysoundAt SoundFX("fx_target",DOFTargets), ActiveBall: Playsound "fx_beavis_hit_3":
if BeavisHead.roty=0 then
me.uservalue = 1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw22_timer
BeavisHead.roty = BeavisHead.roty + (me.uservalue * 3)
if BeavisHead.roty > 40 Then
me.uservalue = -1
sw22.timerenabled = 0
vpmtimer.addtimer 400, "sw22.timerenabled = 1 '"
end If
if BeavisHead.roty < 0 Then
BeavisHead.roty = 0
me.timerenabled = 0
end if
End Sub
Sub Sw32_Hit():vpmTimer.PulseSw 32: PlaysoundAt SoundFX("fx_target",DOFTargets), ActiveBall: Playsound "fx_beavis_hit_2":
if BeavisHead.rotz=0 then
me.uservalue = -1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw32_timer
BeavisHead.rotz = BeavisHead.rotz + (me.uservalue * 3)
BeavisNeck.rotz = BeavisHead.rotz
if BeavisHead.rotz < - 14 Then
me.uservalue = 1
sw32.timerenabled = 0
vpmtimer.addtimer 400, "sw32.timerenabled = 1 '"
end If
if BeavisHead.rotz > 0 Then
BeavisHead.rotz = 0
me.timerenabled = 0
end if
End Sub
Sub Sw42_Hit():vpmTimer.PulseSw 42: PlaysoundAt SoundFX("fx_target",DOFTargets), ActiveBall: Playsound "fx_beavis_hit_1":
if BeavisHead.roty=0 then
me.uservalue = -1
me.timerinterval = 10
me.timerenabled = 1
end if
End Sub
Sub sw42_timer
BeavisHead.roty = BeavisHead.roty + (me.uservalue * 3)
if BeavisHead.roty < - 40 Then
me.uservalue = 1
sw42.timerenabled = 0
vpmtimer.addtimer 400, "sw42.timerenabled = 1 '"
end If
if BeavisHead.roty > 0 Then
BeavisHead.roty = 0
me.timerenabled = 0
end if
End Sub
'Rollovers
Sub Sw23_Hit:Controller.Switch(23)=1: PlaysoundAt "fx_sensor", ActiveBall:
if l66.state=1 then
Dim u
u = INT(5 * RND(1) )
Select Case u
Case 0:Playsound "fx_butthead_get_me_some_nachos"
Case 1:Playsound "fx_butthead_get_ready_for_nachos"
Case 2:Playsound "fx_beavis_we_want_nachos"
Case 3:Playsound ""
Case 4:Playsound ""
End Select
End If
End Sub
Sub Sw23_UnHit:Controller.Switch(23)=0: End Sub
Sub Sw24_Hit:Controller.Switch(24)=1: PlaysoundAt "fx_sensor", ActiveBall:
if l56.state=1 then
Dim i
i = INT(6 * RND(1) )
Select Case i
Case 0:Playsound "fx_butthead_go_to_burger_world":BWSignLight.duration 1,3500,0
Case 1:Playsound "fx_butthead_burger_world_open":BWSignLight.duration 1,2700,0
Case 2:Playsound "fx_beavis_back_to_burger_world":BWSignLight.duration 1,3500,0
Case 3:Playsound ""
Case 4:Playsound ""
Case 5:Playsound ""
End Select
End If
End Sub
Sub Sw24_UnHit:Controller.Switch(24)=0: End Sub
Sub Sw25_Hit:Controller.Switch(25)=1:PlaysoundAt "fx_sensor", ActiveBall:PlaysoundAt "fx_top_rollovers_sound", ActiveBall:End Sub
Sub Sw25_UnHit:Controller.Switch(25)=0:End Sub
Sub Sw33_Hit:if Activeball.vely > 0 then:Controller.Switch(33)=1: PlaysoundAt "fx_sensor", ActiveBall:End If
if Activeball.vely > 0 then
if kickbacklight.state = 1 Then
Dim kb
kb = INT(2 * RND(1) )
Select Case kb
Case 0:Playsound "fx_beavis_lets_kick_it"
Case 1:Playsound "fx_beavis_yeah_kick_it"
End Select
Stopsound "fx_butthead_whats_your_problem"
Stopsound "fx_butthead_you_lost_your_ball"
Stopsound "fx_butthead_you_monkeyspank"
end if
end if
End Sub
Sub Sw33_UnHit:Controller.Switch(33)=0:End Sub
Sub Sw34_Hit:Controller.Switch(34)=1: PlaysoundAt "fx_sensor", ActiveBall:End Sub
Sub Sw34_UnHit:Controller.Switch(34)=0: End Sub
Sub Sw35_Hit:Controller.Switch(35)=1: PlaysoundAt "fx_sensor", ActiveBall:PlaysoundAt "fx_top_rollovers_sound", ActiveBall:End Sub
Sub Sw35_UnHit:Controller.Switch(35)=0: End Sub
Sub Sw43_Hit:Controller.Switch(43)=1: PlaysoundAt "fx_sensor", ActiveBall: kickbackplunger.Pullback:beavisrampplasticlight.state = 0:buttheadrampplasticlight.state = 0: End Sub
Sub Sw43_UnHit:Controller.Switch(43)=0: End Sub
Sub Sw45_Hit:Controller.Switch(45)=1: PlaysoundAt "fx_sensor", ActiveBall:PlaysoundAt "fx_top_rollovers_sound", ActiveBall:End Sub
Sub Sw45_UnHit:Controller.Switch(45)=0: End Sub
Sub Sw55_Hit:Controller.Switch(55)=1: PlaysoundAt "fx_sensor", ActiveBall: End Sub
Sub Sw55_UnHit:Controller.Switch(55)=0: End Sub
Sub Sw55b_Hit:Controller.Switch(55)=1: PlaysoundAt "fx_sensor", ActiveBall: Playsound "fx_BallDropDelayed" End Sub
Sub Sw55b_UnHit:Controller.Switch(55)=0: End Sub
'Optos
Sub Sw50_Hit():vpmTimer.PulseSw 50: PlaysoundAt "", ActiveBall:
if l46.state=1 Then
Dim bb
bb = INT(3 * RND(1) )
Select Case bb
Case 0:Playsound "fx_beavis_nachos_rule":Stopsound "fx_stewart_hit_spin_scream":Stopsound "fx_stewart_hit_spin":Stopsound "mtvintro4b&b"
Case 1:Playsound "fx_beavis_nachos":Stopsound "fx_stewart_hit_spin_scream":Stopsound "fx_stewart_hit_spin":Stopsound "mtvintro4b&b"
Case 2:Playsound "fx_beavis_yeeah_nachos":Stopsound "fx_stewart_hit_spin_scream":Stopsound "fx_stewart_hit_spin":Stopsound "mtvintro4b&b"
End Select
End If
if l44.state=1 Then
Stopsound "fx_beavis_nachos_rule":Stopsound "fx_beavis_nachos":Stopsound "fx_stewart_hit_spin_scream":Stopsound "fx_stewart_hit_spin":Stopsound "mtvintro4b&b"
End if
End Sub
Sub Sw51_Hit():vpmTimer.PulseSw 51: PlaysoundAt "", ActiveBall:
Dim bwsfx
bwsfx = INT(8 * RND(1) )
Select Case bwsfx