-
Notifications
You must be signed in to change notification settings - Fork 37
/
Captain Fantastic_VPX_DOZER_1.2.vbs
2198 lines (1945 loc) · 52.7 KB
/
Captain Fantastic_VPX_DOZER_1.2.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
' **********************
' 2016: directb2s / DOF
' by STAT, stefanaustria
' by arngrim
' **********************
'---------------------
'- Script by ROSVE - Score System by STAT
'---------------------
'Additional Code by Dozer.
' Thalamus: added Chimes not included in table - see :
' https://www.vpforums.org/index.php?showtopic=40334&p=410744
' Thanks Carny
Randomize
Dim Ballsize,BallMass
BallSize = 50
BallMass = (Ballsize^3)/125000
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 = "captfantastic"
'//Game Options/////////////////
Const GI_Dim = 1 'Dim GI with flipper current draw.
Const Lamp_Flicker = 1 'Flicker lamp under right slingshot plastic.
Const Loose_Plastic = 1 'Simulate loose left hand slingshot plastic.
Const BallsToPlay = 3 'Set to 3 or 5
'///////////////////////////////
'Drop Target Special / Lane Adjustment plugs.
'See manual "Feature Operation & Scoring" for
'overview of these settings (Page 7) or reference
'included image in archive.
'1 = Conservative / 0 = Liberal
sadjust = 1 'Special Plug Adjust
ladjust = 1 'Lane Plug Adjust
'///////////////////////////////
Const NudgeOn = 1
Dim robject, sadjust, ladjust
Dim Renudge,RenudgeForce
Dim roll
Dim ball,ball1
Dim GameSeq
Dim MaxPlayers
Dim ActivePlayer
Dim Round
Dim BallInPlay
Dim Coins
Dim Tilt
Dim FreePlayNum
Dim DoubleBonusFlag
Dim CollectL
Dim HiScore
Dim TopLights,Targets,DoodleBug,InPlunger
Dim mhole
Dim Mem(30)
Dim Alt10p
Dim bump1,bump2,bump3,bump4
Dim NOB
Dim ft
Dim mhole1,mhole2
Dim PRpull,PRdir
Dim SReels(4)
Dim STATScores(4)
Sub captfant_Init()
LoadEM
HiScore=""
On Error Resume Next
HiScore=Cdbl(LoadValue("captfant","DBHiScore"))
If HiScore="" Then HiScore=0
Coins=0
GameSeq=0 'Game Over
If B2SOn Then Controller.B2SSetGameover 1
GameOverBG.State = 1
ResetBumperRings
For i=1 to 3
SetBumperOff i
Next
MaxPlayers=0
CloseGate
InPlunger=0
FLFlash 1, FLMaxLight, 0, 1, 1
ResetMemory 1
AltLights
NOB=0
Set SReels(1) = ScoreReel1
Set SReels(2) = ScoreReel2
Set SReels(3) = ScoreReel3
Set SReels(4) = ScoreReel4
DOF 165,1
anidown = 1
End Sub
Sub InitGame()
UpdateBIP
For i=1 to 3
SetBumperOff i
Next
DT1.IsDropped=False
DT2.IsDropped=False
DT3.IsDropped=False
DT4.IsDropped=False
DT5.IsDropped=False
PlaySoundat SoundFXDOF("TargetBankReset",135,DOFPulse,DOFContactors),BulbFil13
If B2SOn Then Controller.B2SSetGameover 0
GameOverBG.State = 0
CloseGate
FLSetOff 1,FLMaxLight
LDT15.State = 1
LDT16.State = 1
ResetMemory 0
'Turn on Shoot Again light if mem(2)=1
If mem(2)=1 Then FLSetOn 17,17
AltLights
AddBonus 1
FLSetOn 19,20
End Sub
Dim object
If ShowDT = True Then
For each object in DT_Stuff
Object.visible = 1
Next
For each object in Cab_Stuff
Object.visible = 0
Next
CabinetRailLeft.visible = 1:CabinetRailRight.visible = 1
Card1.Y = 1856:Card2.Y = 1856
End If
If ShowDt = False Then
For each object in DT_Stuff
Object.visible = 0
Next
For each object in Cab_Stuff
Object.visible = 1
Next
CabinetRailLeft.visible = 0:CabinetRailRight.visible = 0
'LDB.visible = 0
End If
If BallsToPlay = 3 Then
Card2.image = "ic3"
Else
Card2.image = "ic5"
End If
If Lamp_Flicker = 1 Then
GI_Flicker.enabled = 1
Else
GI_Flicker.enabled = 0
End If
Dim BOOT1,BOOT2,BOOT3,BOOT4, REPA(10), REPB(10), REPC(10)
Sub AddScoresToPlayer(s,p) ' * Score System by STAT
If s = 10 Then
PlaySound SoundFXDOF("10a",141,DOFPulse,DOFChimes)
ElseIf s = 100 Then
PlaySound SoundFXDOF("100a",142,DOFPulse,DOFChimes)
ElseIf s = 200 Then
PlaySound SoundFXDOF("200a",142,DOFPulse,DOFChimes)
ElseIf s = 300 Then
PlaySound SoundFXDOF("300a",142,DOFPulse,DOFChimes)
ElseIf s = 500 Then
PlaySound SoundFXDOF("500a",142,DOFPulse,DOFChimes)
ElseIf s = 1000 Then
PlaySound SoundFXDOF("1000a",143,DOFPulse,DOFChimes)
ElseIf s = 3000 Then
PlaySound SoundFXDOF("3000a",143,DOFPulse,DOFChimes)
End If
STATScores(p) = STATScores(p) + s
If B2SOn Then
Controller.B2SSetScorePlayer p, STATScores(p)
End If
'Handle Score based replays.
If STATScores(p) > 70000 AND repa(p) = 0 Then
ReplayAction
repa(p) = 1
End If
If STATScores(p) > 99000 AND repb(p) = 0 Then
ReplayAction
repb(p) = 1
End If
If STATScores(p) > 131000 AND repc(p) = 0 Then
ReplayAction
repc(p) = 1
End If
If STATScores(p) > 99999 Then
If B2SOn Then
Controller.B2SSetData 149+p,1
End If
If p=1 AND boot1 = 0 Then
PlaySound "Buzzer"
OTT1.State = 1
boot1 = 1
End If
If p = 2 AND boot2 = 0 Then
PlaySound "Buzzer"
OTT2.State = 1
boot2 = 1
End If
If p=3 AND boot3 = 0 Then
PlaySound "Buzzer"
OTT3.State = 1
boot3 = 1
End If
If p=4 AND boot4 = 0 Then
PlaySound "Buzzer"
OTT4.State = 1
boot4 = 1
End If
End if
If GameSeq = 1 Then
SReels(p).addvalue(s)
End If
End Sub
Sub captfant_KeyDown(ByVal keycode)
If keycode = AddCreditKey Then
If Coins < 9 Then
Coins=Coins+1
If B2SOn Then Controller.B2SSetCredits Coins
End If
PlaySound "Coin"
End If
If keycode = 5 Then
If Coins < 9 Then
Coins=Coins+1
If B2SOn Then Controller.B2SSetCredits Coins
End If
PlaySound "Coin"
End If
If keycode = StartGameKey Then
If MaxPlayers < 4 And Coins>0 Then
MaxPlayers=MaxPlayers+1
AddPlayer
End If
End If
If KeyCode = LeftMagnaSave Then
If anidown = 1 Then
anidir = 1:IC_Ani.enabled = 1:PlaySound "TargetDrop"
Else
anidir = 2:IC_Ani.enabled = 1:PlaySound "TargetDrop"
End If
End If
If keycode = PlungerKey Then
Plunger.PullBack
PlaySound "SSPlungePull"
PRdir=0
PRLight.TimerInterval=60
PRLight.TimerEnabled=true
End If
If keycode = LeftFlipperKey Then
If Tilt<3 And Round>0 Then
Flipper2.RotateToEnd
Flipper4.RotateToEnd
PlaySoundat SoundFXDOF("SSFlipper1",101,DOFOn,DOFFlippers), flipper2
End If
If Gi_Dim = 1 AND GameSeq=1 AND Tilt<3 Then
For Each gxx in GI_Lights
gxx.IntensityScale = 0.9
Next
DOF 166,1:DOF 165,0
gi_bright.enabled = 1
End If
End If
If keycode = RightFlipperKey Then
If Tilt<3 And Round>0 Then
Flipper3.RotateToEnd
Flipper5.RotateToEnd
PlaySoundat SoundFXDOF("SSFlipper1",102,DOFOn,DOFFlippers), flipper3
End If
If Gi_Dim = 1 AND GameSeq=1 AND Tilt<3 Then
For Each gxx in GI_Lights
gxx.IntensityScale = 0.9
Next
DOF 166,1:DOF 165,0
gi_bright.enabled = 1
End If
End If
If keycode = MechanicalTilt Then
Tilt = 3
TiltOn
PlaySound "buzzer"
End If
If keycode = LeftTiltKey Then
PlaySound SoundFX("nudge_left",0)
If BallInPlay=1 Then
If Tilt<3 Then
'If NudgeOn=1 Then
' Nudge 90, 1.2
' RenudgeForce=1.0
' Else
' Nudge 90,0.7
' RenudgeForce=0.4
'End If
'Renudge=-90
Nudge 90, 2
Tilt2Timer.Enabled=1
If Round>0 Then
Tilt=Tilt+0.6
If Tilt>2.9 Then
TiltOn
Else
TiltTimer.Enabled=1
End If
End If
End If
End If
End If
If keycode = RightTiltKey Then
PlaySound SoundFX("nudge_right",0)
If BallInPlay=1 Then
If Tilt<3 Then
'If NudgeOn=1 Then
' Nudge 270, 1.2
' RenudgeForce=1.0
'Else
' Nudge 270,0.7
' RenudgeForce=0.4
'End If
'Renudge=90
Nudge 270, 2
Tilt2Timer.Enabled=1
If Round>0 Then
Tilt=Tilt+0.6
If Tilt>2.9 Then
TiltOn
Else
TiltTimer.Enabled=1
End If
End If
End If
End If
End If
If keycode = CenterTiltKey Then
PlaySound SoundFX("nudge_forward",0)
If BallInPlay=1 Then
If Tilt<3 Then
'Renudge=160+(Rnd*40)
Tilt2Timer.Enabled=1
'If NudgeOn=1 Then
' Nudge -Renudge, 1.3
' RenudgeForce=1.0
'Else
' Nudge -Renudge,0.9
' RenudgeForce=0.4
'End If
Nudge 0, 2
If Round>0 Then
Tilt=Tilt+0.6
If Tilt>2.9 Then
TiltOn
Else
TiltTimer.Enabled=1
End If
End If
End If
End If
End If
End Sub
Sub captfant_KeyUp(ByVal keycode)
If keycode = PlungerKey Then
Plunger.Fire
PlaySound "SSPlungeRel"
PRLight.TimerInterval=10
PRdir=1
If InPlunger=1 Then
PlaySound "Shoot"
End If
End If
If keycode = LeftFlipperKey Then
Flipper2.RotateToStart
Flipper4.RotateToStart
If Tilt<3 And Round>0 Then
PlaySoundat SoundFXDOF("SSFlipper2",101,DOFOff,DOFFlippers), flipper2
End If
End If
If keycode = RightFlipperKey Then
Flipper3.RotateToStart
Flipper5.RotateToStart
If Tilt<3 And Round>0 Then
PlaySoundat SoundFXDOF("SSFlipper2",102,DOFOff,DOFFlippers), flipper3
End If
End If
End Sub
Sub Drain_Hit()
PlaySoundat "SSDrain", Drain
DOF 133, DOFPulse
BallInPlay=0
Drain.DestroyBall
If Tilt<3 Then
GameSeq=3 'Collect Bonus then start new ball
Else
GameSeq=2
End If
SeqTimer.Enabled=1
SeqTimer.Interval=250
End Sub
Sub ShooterLane_Hit()
DOF 134, DOFPulse
End Sub
'----------------------------------------------------------
' TILT
'-----------------------------------------------------------
Sub TiltTimer_Timer()
TiltTimer.Enabled=0
If Tilt<3 Then
Tilt=0
End If
End Sub
Sub Tilt2Timer_Timer()
Tilt2Timer.Enabled=0
Nudge renudge,RenudgeForce
End Sub
Sub TiltOn()
If B2SOn Then Controller.B2SSetTilt 1
PlaySound SoundFX("solon",0)
For i=1 to 3
SetBumperOff i
Next
CloseGate
Bumper1.force = 0:Bumper2.Force = 0:Bumper3.Force = 0
LeftSlingShot.SlingshotThreshold = 100:RightSlingShot.SlingshotThreshold = 100
For each Object in Bonus_Lights
object.state = 0
next
If B2Son Then
PlaySoundat SoundFXDOF("SSFlipper2",101,DOFOff,DOFFlippers), flipper2
PlaySoundat SoundFXDOF("SSFlipper2",102,DOFOff,DOFFlippers), flipper3
Flipper2.RotateToStart
Flipper4.RotateToStart
Flipper3.RotateToStart
Flipper5.RotateToStart
Else
PlaySoundat SoundFX("SSFlipper2",DOFFlippers), flipper2
PlaySoundat SoundFX("SSFlipper2",DOFFlippers), flipper3
Flipper2.RotateToStart
Flipper4.RotateToStart
Flipper3.RotateToStart
Flipper5.RotateToStart
'DOF 101,0
'DOF 102,0
End If
End Sub
'----------------------------------------
'Add Players and start game
'----------------------------------------
Sub AddPlayer()
Dim sr
If Round=0 Or Round=3 Or Round=5 Then
If Coins>0 Then
Coins=Coins-1
If B2SOn Then
Controller.B2SSetData 28,Coins
Controller.B2SSetCredits Coins
Controller.B2SSetCanPlay MaxPlayers
Controller.B2SSetMatch 0
Controller.B2SSetGameover 0
STATScores(1) = 0
STATScores(2) = 0
STATScores(3) = 0
STATScores(4) = 0
Controller.B2SSetScorePlayer1 0
Controller.B2SSetScorePlayer2 0
Controller.B2SSetScorePlayer3 0
Controller.B2SSetScorePlayer4 0
Controller.B2SSetData 150,0:BOOT1=0:OTT1.STATE = 0
Controller.B2SSetData 151,0:BOOT2=0:OTT2.STATE = 0
Controller.B2SSetData 152,0:BOOT3=0:OTT3.STATE = 0
Controller.B2SSetData 153,0:BOOT4=0:OTT4.STATE = 0
End If
BOOT1=0:OTT1.STATE = 0
BOOT2=0:OTT2.STATE = 0
BOOT3=0:OTT3.STATE = 0
BOOT4=0:OTT4.STATE = 0
SReels(1).setvalue(0)
SReels(2).setvalue(0)
SReels(3).setvalue(0)
SReels(4).setvalue(0)
STATScores(1) = 0
STATScores(2) = 0
STATScores(3) = 0
STATScores(4) = 0
GameOverBG.State = 0
MatchBG.State = 0
TextBox2.text = ""
if MaxPlayers = 1 Then
Round=BallsToPlay
ActivePlayer=0
GameSeq=2
SeqTimer.Interval=800
SeqTimer.Enabled=1
End If
PlaySound "bally-addplayer"
End If
End If
End Sub
'------------------------------------------------------------------
' Game Sequence
'------------------------------------------------------------------
Sub SeqTimer_Timer()
Select Case GameSeq
Case 0 'Game Over
' Attract Mode
Case 1 'New Ball
SeqTimer.Enabled=0
If LightShootAgain.State=0 Then InitGame
LightShootAgain.State=0
If B2SOn Then Controller.B2SSetShootAgain 0
Set ball = Kicker2.CreateBall
BallInPlay=1
Kicker2.Kick 45,14
PlaySoundat SoundFXDOF("ballrelease",109,DOFPulse,DOFContactors), kicker2
Case 2 'Drain
'Prepare for next ball
If B2SOn Then Controller.B2SSetTilt 0
Bumper1.force = 7:Bumper2.Force = 7:Bumper3.Force = 7
LeftSlingShot.SlingshotThreshold = 2:RightSlingShot.SlingshotThreshold = 2
Tilt=0
IF mem(2)=0 Then
If ActivePlayer=MaxPlayers Then
If Light1_X17.State = 1 Then
Round = Round
Else
Round=Round-1
End If
If Round<1 Then
ActivePlayer=0
Else
ActivePlayer=1
End If
Else
If Light1_X17.State = 1 Then
ActivePlayer = ActivePlayer
Else
ActivePlayer=ActivePlayer+1
End If
End If
If B2SOn Then
Controller.B2SSetScoreRolloverPlayer1 0
Controller.B2SSetScoreRolloverPlayer2 0
Controller.B2SSetScoreRolloverPlayer3 0
Controller.B2SSetScoreRolloverPlayer4 0
Controller.B2SSetScoreRollover 24+ActivePlayer, 2
End if
End If
IF Round <1 Then
'End of game
FreePlayNum = Int(rnd*9)
If B2SOn Then
Controller.B2SSetCanPlay 0
Controller.B2SSetMatch FreePlayNum+1
Controller.B2SSetGameover 1
Controller.B2SSetBallinPlay 0
Controller.B2SSetScoreRolloverPlayer1 0
Controller.B2SSetScoreRolloverPlayer2 0
Controller.B2SSetScoreRolloverPlayer3 0
Controller.B2SSetScoreRolloverPlayer4 0
End if
GameOverBG.State = 1
REPA(1) = 0:REPA(2) = 0:REPA(3) = 0:REPA(4) = 0
REPB(1) = 0:REPB(2) = 0:REPB(3) = 0:REPB(4) = 0
REPC(1) = 0:REPC(2) = 0:REPC(3) = 0:REPC(4) = 0
MatchBG.State = 1
TextBox2.text = FreePlayNum * 10
' Check Match Wheel ------
For i=1 to MaxPlayers
If FreePlayNum = (STATScores(i) mod 10) Then
ReplayAction
End If
Next
'--------------------------
PlaySound "MekSound"
SeqTimer.Enabled=0
For i=1 to 3
SetBumperOff i
Next
'Hiscore
For i=1 To MaxPlayers
HStemp=STATScores(i)
If HStemp>HiScore Then
HiScore=HStemp
SaveValue "captfant","DBHiScore",HiScore
End If
Next
MaxPlayers=0
If B2Son Then
PlaySoundat SoundFXDOF("SSFlipper2",101,DOFOff,DOFFlippers), flipper2
PlaySoundat SoundFXDOF("SSFlipper2",102,DOFOff,DOFFlippers), flipper3
Flipper2.RotateToStart
Flipper4.RotateToStart
Flipper3.RotateToStart
Flipper5.RotateToStart
Else
PlaySoundat SoundFX("SSFlipper2",DOFFlippers), flipper2
PlaySoundat SoundFX("SSFlipper2",DOFFlippers), flipper3
Flipper2.RotateToStart
Flipper4.RotateToStart
Flipper3.RotateToStart
Flipper5.RotateToStart
'DOF 101,0
'DOF 102,0
End If
Else
'Start new ball
GameSeq=1
SeqTimer.Enabled=1
SeqTimer.Interval=300
If ft=1 Then
ft=0
PlaySound "SSResetGame"
SeqTimer.Interval=1200
Else
PlaySound "SSNewBall"
End If
End If
Case 3 'Collect Bonus
BCC=0
SeqTimer.Enabled=False
CollectBonusTimer.Enabled = True
End Select
End Sub
'--------------------------------------------------------------------
'------- TARGETS
'--------------------------------------------------------------------
Sub T11_Hit()
If Tilt>2 Then Exit Sub
PlaySoundat SoundFXDOF("TargetSound",125,DOFPulse,DOFContactors),T11
AddScoresToPlayer 100,ActivePlayer
End Sub
Sub T11_Timer()
T11.TimerEnabled=False
T12.IsDropped=True
T11.IsDropped=False
End Sub
Sub T21_Hit()
If Tilt>2 Then Exit Sub
PlaySoundat SoundFXDOF("TargetSound",126,DOFPulse,DOFContactors),T21
AddScoresToPlayer 100,ActivePlayer
End Sub
Sub T21_Timer()
T21.TimerEnabled=False
T22.IsDropped=True
T21.IsDropped=False
End Sub
Sub DT1_Hit()
If Tilt>2 Then Exit Sub
DTL1.state = 0:DTGI.Intensity = DTGI.Intensity - 2
PlaySoundat SoundFXDOF("TargetDrop",127,DOFPulse,DOFContactors),DT1
DT1.IsDropped=True
mem(15)=mem(15)+1
AddScoresToPlayer 500,ActivePlayer
DTargs.enabled = 1
End Sub
Sub DT2_Hit()
If Tilt>2 Then Exit Sub
DTL2.state = 0:DTGI.Intensity = DTGI.Intensity - 2
PlaySoundat SoundFXDOF("TargetDrop",127,DOFPulse,DOFContactors),DT2
DT2.IsDropped=True
mem(15)=mem(15)+1
AddScoresToPlayer 500,ActivePlayer
DTargs.enabled = 1
End Sub
Sub DT3_Hit()
If Tilt>2 Then Exit Sub
DTL3.state = 0:DTGI.Intensity = DTGI.Intensity - 2
PlaySoundat SoundFXDOF("TargetDrop",127,DOFPulse,DOFContactors),DT3
DT3.IsDropped=True
mem(15)=mem(15)+1
AddScoresToPlayer 500,ActivePlayer
DTargs.enabled = 1
End Sub
Sub DT4_Hit()
If Tilt>2 Then Exit Sub
DTL4.state = 0:DTGI.Intensity = DTGI.Intensity - 2
PlaySoundat SoundFXDOF("TargetDrop",127,DOFPulse,DOFContactors),DT4
DT4.IsDropped=True
mem(15)=mem(15)+1
AddScoresToPlayer 500,ActivePlayer
DTargs.enabled = 1
End Sub
Sub DT5_Hit()
If Tilt>2 Then Exit Sub
DTL5.state = 0:DTGI.Intensity = DTGI.Intensity - 2
PlaySoundat SoundFXDOF("TargetDrop",127,DOFPulse,DOFContactors),DT5
DT5.IsDropped=True
mem(15)=mem(15)+1
AddScoresToPlayer 500,ActivePlayer
DTargs.enabled = 1
End Sub
Dim gxx
Sub GI_Bright_Timer()
For Each gxx in GI_Lights
gxx.Intensityscale = 1.1
Next
DOF 166,0:DOF 165,1
me.enabled = 0
End Sub
'----------------------------------------------------------------------
' BUMPER
'----------------------------------------------------------------------
Sub Bumper1_Hit()
If Tilt>2 Then Exit Sub
If mem(10)=0 Then
AddScoresToPlayer 10,ActivePlayer
AltLights
Else
AddScoresToPlayer 100,ActivePlayer
End If
PlaySoundAtVol SoundFXDOF("Bumper",103,DOFPulse,DOFContactors), Primitive3, 0.05
End Sub
Sub Bumper2_Hit()
If Tilt>2 Then Exit Sub
If mem(10)=0 Then
AddScoresToPlayer 10,ActivePlayer
AltLights
Else
AddScoresToPlayer 100,ActivePlayer
End If
PlaySoundAtVol SoundFXDOF("Bumper",104,DOFPulse,DOFContactors), Primitive1, 0.05
End Sub
Sub Bumper3_Hit()
If Tilt>2 Then Exit Sub
If mem(11)=0 Then
AddScoresToPlayer 10,ActivePlayer
AltLights
Else
AddScoresToPlayer 100,ActivePlayer
End If
PlaySoundAtVol SoundFXDOF("Bumper",105,DOFPulse,DOFContactors), Primitive2, 0.05
End Sub
Sub SetBumperOn(ByVal bnr)
Dim a,i
a=(bnr-1)*3
For i=a To a+2
Next
a=(bnr-1)*2
For i=a To a+1
Bumpers(i).State=1
Next
End Sub
Sub SetBumperOff(ByVal bnr)
Dim a,i
a=(bnr-1)*3
For i=a To a+2
Next
a=(bnr-1)*2
For i=a To a+1
Bumpers(i).State=0
Next
End Sub
Sub ResetBumperRings()
End Sub
'------------------------------------------------------------------------
' TRIGGERS
'------------------------------------------------------------------------
Sub Trigger1_Hit()
PlaySoundAtBall "sensor"
DOF 111, DOFPulse
Trigger1.TimerEnabled=True
If Tilt>2 Then Exit Sub
AddScoresToPlayer 100,ActivePlayer
If mem(16)>1 And mem(18)=0 AND Light1_X14.state = 1 Then
FLSetOff 14,14
mem(18)=1
ReplayAction
End If
If mem(16)>0 And mem(18)=0 AND Light1_X14.state = 1 AND sadjust = 0 Then
FLSetOff 14,14
mem(18)=1
ReplayAction
End If
End Sub
Sub Trigger1_Timer()
Trigger1.TimerEnabled=False
End Sub
Sub Trigger2_Hit()
PlaySoundAtBall "sensor"
DOF 112, DOFPulse
Trigger2.TimerEnabled=True
If Tilt>2 Then Exit Sub
AddScoresToPlayer 300,ActivePlayer
AddBonus 3
If mem(16)>0 And mem(17)=0 AND Light1_X15.State = 1 Then
FLSetOff 15,15
FLSetOn 17,17
mem(17)=1
If B2SOn Then Controller.B2SSetShootAgain 1
End If
End Sub
Sub Trigger2_Timer()
Trigger2.TimerEnabled=False
End Sub
Sub Trigger3_Hit()
PlaySoundAtBall "sensor"
DOF 113, DOFPulse
Trigger3.TimerEnabled=True
If Tilt>2 Then Exit Sub
AddScoresToPlayer 100,ActivePlayer
If mem(6) =1 Then
AddBonus 3
AddScoresToPlayer 200,ActivePlayer
Flipper1.TimerEnabled = True
End If
End Sub
Sub Trigger3_Timer()
Trigger3.TimerEnabled=False
End Sub
Sub Flipper1_Timer()
Flipper1.TimerEnabled = False
CloseGate
End Sub
Sub Trigger4_Hit()
PlaySoundAtBall "sensor"
DOF 114, DOFPulse
Trigger4.TimerEnabled=True
If Tilt>2 Then Exit Sub
If mem(13)=0 Then
mem(13)=1
FLSetOff 19,19
FLSetOn 12,12
If mem(14)=1 Then
FLSetOn 11,11
mem(12)=1
End If
End If
If mem(1)=1 Then
AddBonus 3
AddScoresToPlayer 300,ActivePlayer
Else
AddScoresToPlayer 100,ActivePlayer
End If
End Sub
Sub Trigger4_Timer()
Trigger4.TimerEnabled=False
End Sub
Sub Trigger5_Hit()
PlaySoundAtBall "sensor"
DOF 115, DOFPulse
Trigger5.TimerEnabled=True
If Tilt>2 Then Exit Sub
AddScoresToPlayer 100,ActivePlayer
If mem(1)=0 Then
OpenGate
End If
End Sub
Sub Trigger5_Timer()
Trigger5.TimerEnabled=False
End Sub
Sub Trigger6_Hit()
PlaySoundAtBall "sensor"
DOF 116, DOFPulse
Trigger6.TimerEnabled=True
If Tilt>2 Then Exit Sub
If mem(14)=0 Then
mem(14)=1
FLSetOff 20,20
FLSetOn 13,13
If mem(13)=1 Then
FLSetOn 11,11
mem(12)=1
End If
End If
If mem(1)=1 Then
AddBonus 3
AddScoresToPlayer 300,ActivePlayer
Else
AddScoresToPlayer 100,ActivePlayer
End If
End Sub
Sub Trigger6_Timer()
Trigger6.TimerEnabled=False
End Sub
Sub Btriggs_Hit(idx)
PlaySoundatBall "sensor"
If Tilt>2 Then Exit Sub
If mem(1)=1 Then
AddBonus 1
End If
If mem(1)=1 Then
AddBonus 1
End If
If BallsToPlay=3 Then
AddScoresToPlayer 1000,ActivePlayer
Else
AddScoresToPlayer 100,ActivePlayer
End If
End Sub
Sub Trigger13_Hit()
PlaySoundAtBall "sensor"
'ROlights 7,1
Trigger13.TimerEnabled=True
If Tilt>2 Then Exit Sub
AltLights
AddScoresToPlayer 10, ActivePlayer
End Sub
Sub Trigger13_Timer()
Trigger13.TimerEnabled=False
End Sub
Sub Trigger14_Hit()
PlaySoundAtBall "sensor"
Trigger14.TimerEnabled=True
If Tilt>2 Then Exit Sub
AltLights
AddScoresToPlayer 10, ActivePlayer
End Sub
Sub Trigger14_Timer()
Trigger14.TimerEnabled=False
ROlights 8,0
End Sub
Sub ROlights(Byval nr, Byval st)
Select Case nr
Case 1,2,3,4,5,6
If mem(1)=0 Then
Else