-
Notifications
You must be signed in to change notification settings - Fork 37
/
Cactus Canyon (Bally 1998) TTNZ v2.0.vbs
1837 lines (1591 loc) · 62.9 KB
/
Cactus Canyon (Bally 1998) TTNZ v2.0.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
':.:.:.:.:.:.:.:.:., : ,.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.,.:.:.:.:.:.:.:.:.: , :.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:., ;;,.:.:.:.:.:.:.:.:.:.:.:.
'.:.:.: , , . . , , , : , , , , ,.:.:., , , , . . , , , . , , , , , , , , . . . ,.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.: , , : , , .XS :.:.:.:.:.:.:.:.:.:.:.:
':.:., . ..i:;,i .,a7272.i:i.::; : , , ,.;,, XrX;i,i :,i;aX; i,i:;.:,i:rii,;XS78.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.;2;.:., ,.ii7r, :.:.:.:.:.:.:.:.:.:.:.
'.:., .;Mrr7a0MZSir:07i7:XaXXX7X: . ,;7i2XX;rXi7S7SXX7SX2X:rSXSXaXX7S7Zi2SSXXXXX; :.:.:.:.:.:.:.,.:.:.:.:.:.:.:.: 7S7ir;ri8ai,2:, : ,.:.:.:.:.:.:.:.:.:
': . :@M,;aM@[email protected];irM@MriX. SZXiZ@SrM@B,X@MZM@MWM@2,8@[email protected]:.:0WM@Mra.,.:.:.:.: , , . . ,.:.:.:.:.:.:., Za2rX;XSZ;;i7,i.: , ,.:.:.:.:.:.:.:.
'.. r@B r@M;i788;,M@Mi.@M.:WM@@[email protected]@;;0,0WirM i@M0X SZ:SM@Z .;@@M7.:[email protected]: :.:., . ... . ::i :.:.:.:.:.: , .;Mr7i7i;i7;7i7irrSZZ.:.:.:.:.:.:.:.:
', r@r S@M;:X:.a@X a@X [email protected] [email protected]@r:M@8 a ii..M0Mr..S.8BMX: 70W@2 X@Z,:r7rZ;. : . . irBZWZM@MX:.:.:.:.:., . :;XrX7X;7;i,;,7;222ir:,.:.:.:.:.:.:.:.
' .@M X@Mr:Z: . i@i Si.@;.M778MZ::i,@@2,X 0@8@M@W :8M07 ;:.rM22.,[email protected]@Sr222;Z . . :aM@MXr @@M7. :.:.:.:., ;rZW07XaZaXS2rXiriXX; . , :.:.:.:.:.:.:.:
'.2M :8MB:77 , . M@XX;rM X7r r8Mr, 70Mr:X, ..i:M@; 8@Wi.@M X@Mr: 72MBr r77iS@ar7X. . S@M@Z . M@M:. . . , : , :2ZSB@M@MX772XaSaXX;: . . . ,.:.:.:.:.:.:.
' M@.;[email protected] ,.: .,2XXSM;[email protected]@0.X..:, .,Mi:7MZ7 [email protected].,iSWW;::7i.;a0SiS ,@M@MBr .iM@M,. , ::, . . , . . . .@MS7;X7X7XrX:i7Z:;:i.:.:.:.:.:.:.:
'7@Z SWX;;S. : , . . M@.;Mr77rr@@2.;XMZr,M@XrS;X@S,X7S;.@M ;7X7r r7S77;2XX XrS7i,2@M@a . . :i7;2@M0::M@; ,:0@7 ..XZ. :@M.,iXar@X ;@M@M@M7i : : : : : :.
':MB.XMXX,8 , ..;.. r@X aSX;7;XXZXS.SXXr:2a.XrX r7:7X;X M@M iiX;r;7;Xri7XrXrXi; M@M@; . . :iX7S,M@i 2@M,S@M@M,.,M@2 X@M7i0S,,iMiX@M2M@Z . . . . . , i.:
',@M XWM7,a, .aMiaXXXS XX7,M@M 7rX77 7XXri,XrX i@r:7r7;:iM@Mr;:i:;:;:;::i;i7ii 8@M@, . . :[email protected]@i 7@M@M@X@M.:;M@0ZM@M B@M ;@M:M@S M@:.iiX;SXaXZS0BZ7X.
' [email protected];rX. Ma,X27S ;7S,ai:@M Xi7r; ;;7;7i;:S@,.;:r;XS7:X0M@M@M@M@M@M@M@B.;i8@M7. . . i@Mr. ;@X r@[email protected]@M iiS@M@M@X ,;M@M@X:MZi M@M@M@M@M802Z77ir., ,
'. M@.:Xr2;r;M@,;S7Si:XXi77. :@.i;:i;Si2S8aZZB@M@M@M@02Z;: . ..ri7;r;r.:.7rr@M@Mi. . .:2@M@,7@@S :@MW. r@M,:,X:i B@7:8SSXX;7:r:i;;::,i,:.. . . . , , :.
' .;[email protected];ii:X;Si,;X;ri2,iZ:i@BM@MB,.irSr; ..: , . . . , . . . . . . . :@M@M.. . . ,;M@M;;;Xir;X7riXrr:Z8aZX.i@M 7;;,: . . . . . . . . , , : ,.:.:.:
': .;M@i i;Xrr;X;X,.ir:rXaSZ@MWZSS;;.. , . . , . . . , :.:.:.:.: : : , ,.7@M@M.. ,,i:X;X;r;27ZBMSX,:,7rSX2;:.:;X@M.. . , , : ,.,.,., : ,.:.:.:.:.:.:.:.
'., . M@M;:.r;7ii 7;SWM@0X, . . . . . :.:.,.:.:.:.:.:.:.:.:.:.:.:.:.:.: :0M@M@M@M@MW@@M@M@MWZXr :iXXZSaaZr, ..2@M.. :.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:
':., . ,ZM@B:i.;XM@M0S:. . , , , : ,.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.: i7B@M@M@MZM@2BS;;,i . . ;i;., , , : :;ZX. ,.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
'.:.: . . :WM@00X . . . , ,.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:., i:. . . ,:, . . . , : : , , , :.:., . . :.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:
' Cactus Canyon - IPDB No. 4445
' © Bally/Midway 1998
' © Eric Priepke 2012 (P-ROC Project)
' VPX recreation by ninuzzu/Tom Tower
' Thalamus 2018-07-23
' This table already has its own 7.1 "Positional Sound Playback Functions" routine
' Changed UseSolenoids=1 to 2 for no-proc
' No special SSF tweaks yet.
' Support CCC, please see P-Roc updates in cactuscanyoncontinued_PROC folder
' FastFlips 2.0 required for CCC drunk flips.
Option Explicit
Randomize
'optReset = 1 'Uncomment to reset to default options in case of error or keep all changes temporary. When done recomment again!
Const PROC = 0
Const BallSize = 50
Const BallMass = 1.7
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
Dim UseVPMDMD:UseVPMDMD = DesktopMode
Dim UseSolenoids
Const cGameName = "cc_13"
Const B2ScGameName = "Proc_CC"
Const UseVPMModSol = True
' Needed or the bad guy's hat and dof shaker will be triggered.
Const cSingleLFlip = 0
Const cSingleRFlip = 0
' LoadVBSFiles "02800000", "WPC.VBS", 3.52
' Mentioned by Toxie here : https://www.vpforums.org/index.php?showtopic=44135&p=456910
If PROC = 1 Then
UseSolenoids = 39
'LoadController("PROC")
LoadProc "02000000", "WPC.VBS", 3.50
Else
UseSolenoids = 2
'LoadController("VPM")
LoadVPM "02000000", "WPC.VBS", 3.50
End If
' Standard Options
Const UseLamps = 1
Const UseSync = 0
Const HandleMech = 0
Const UseGI = 0
' Standard Sounds
Const SSolenoidOn = "fx_solon"
Const SSolenoidOff = ""
Const SCoin = "fx_coin"
'**************************************************************
'************ Table Init **********************************
'**************************************************************
Dim TrainMech, MineMech
Sub Table1_Init
vpmInit Me
On Error Resume Next
With Controller
.GameName = cGameName
If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description : Exit Sub
.SplashInfoLine = "Cactus Canyon - Midway/Williams 1998"
.HandleKeyboard = 0
.HandleMechanics = 0
.ShowDMDOnly = 1
.ShowFrame = 0
.ShowTitle = 0
If PROC = 0 Then .Hidden = Desktopmode
On Error Resume Next
.Run
If Err Then MsgBox Err.Description
.Switch(22) = 1 'close coin door
.Switch(24) = 0 'always closed
On Error Goto 0
End With
'************ Main Timer init ********************
PinMAMETimer.Interval = PinMAMEInterval
PinMAMETimer.Enabled = 1
'************ Nudging **************************
vpmNudge.TiltSwitch = 14
vpmNudge.Sensitivity = 5
vpmNudge.TiltObj = Array(Bumper1, Bumper2, sw51, sw52, sw55)
'************** Mine Mech ********************
If PROC = 0 Then
Set MineMech = New cvpmMech
With MineMech
.Sol1 = 17
.Length = 100
.Steps = 49
.MType = vpmMechOneSol + vpmMechReverse + vpmMechLinear
.AddSw 77, 0, 1 'Home 'Shoopity - Changed the last variable from 48 to 0, it helps with moving the primitive
.AddPulseSw 78, 8, 2
.Start
End With
End If
'************** Train Mech ********************
If PROC = 0 Then
Set TrainMech = New cvpmMech
With TrainMech
.Sol1 = 38 'Forward
.Sol2 = 37 'Reverse
.Length = 570
.Steps = 613
.MType = vpmMechTwoDirSol + vpmMechStopEnd + vpmMechLinear
.AddSw 72, 0, 0 ' Home
.AddPulseSw 71, 14, 3
.Start
End With
End If
'************ Misc Stuff init ********************
block.isdropped=1
Sw61.IsDropped = 1: Sw62.IsDropped = 1 :Sw63.IsDropped = 1 :Sw64.IsDropped = 1
Sw61a.IsDropped = 1: Sw62a.IsDropped = 1 :Sw63a.IsDropped = 1 :Sw64a.IsDropped = 1
LPin.IsDropped = 1: RPin.IsDropped = 1
UpdateGI 0,0: UpdateGI 1,0: UpdateGI 2,0
InitToys:InitLamps:InitTrough
'************ P-ROC Stuff init ********************
If PROC = 1 then
Enc_Stop.enabled = 1
UpdateGI 0,1: UpdateGI 1,1: UpdateGI 2,1
Card1.image = "card1_CCC"
Card2.image = "card2_CCC"
Guns.material = "Guns"
End If
End Sub
'********************************************
'********** Keys ************************
'********************************************
Sub Table1_KeyDown(ByVal keycode)
If keycode = LeftTiltKey Then Nudge 90, 3:PlaySoundAt SoundFX("fx_nudge", 0), Card1
If keycode = RightTiltKey Then Nudge 270, 3:PlaySoundAt SoundFX("fx_nudge", 0), Card2
If keycode = CenterTiltKey Then Nudge 0, 4:PlaySoundAt SoundFX("fx_nudge", 0), OutHole
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 : PlaysoundAt "fx_plunger", Plunger
If vpmKeyUp(KeyCode) Then Exit Sub
End Sub
Sub Table1_Paused:Controller.Pause = 1:End Sub
Sub Table1_unPaused:Controller.Pause = 0:End Sub
Sub Table1_exit()
Controller.Stop
If B2SOn = True and PROC = 1 Then B2SController.Stop
SaveValue TableName,"TrainPos",Train.TransX
End sub
'******************
' Solenoids
'******************
SolCallback(1) = "AutoPlunger" ' Autoplunger
SolCallback(2) = "Drop1" ' Left Drop Target
SolCallback(3) = "Drop2" ' Left Center Drop Target
SolCallback(4) = "Drop3" ' Right Center Drop Target
SolCallback(5) = "Drop4" ' Right Drop Target
SolCallback(6) = "SolMinePopper" ' Mine Popper
SolCallback(7) = "Knocker" ' Knocker
SolCallback(8) = "SolSaloonPopper" ' Saloon Popper
SolCallback(9) = "ReleaseBall" ' Ball Release
'SolCallback(10) = "" ' Left Slingshot
'SolCallback(11) = "" ' Right Slingshot
'SolCallback(12) = "" ' Left Jet Bumper
'SolCallback(13) = "" ' Right Jet Bumper
SolCallback(14) = "GunPostLeft" ' Left Gunfight Post
SolCallback(15) = "GunPostRight" ' Right Gunfight Post
'SolCallback(16) = "" ' Bottom Jet Bumper
SolCallback(21) = "LGate" ' Left Loop Gate
SolCallback(22) = "RGate" ' Right Loop Gate
SolCallback(sLRFlipper) = "SolRFlipper" ' Left Flipper
SolCallback(sLLFlipper) = "SolLFlipper" ' Right Flipper
SolCallback(33) = "MoveBart" ' Move Bart Toy
SolCallback(36) = "MoveHat" ' Bart Toy Hat
If PROC = 1 then
SolCallBack(17) = "MoveMine_PROC" ' Mine Motor-PROC
SolCallback(18) = "Sol18" ' Mine Flasher-PROC
SolCallBack(19) = "Sol19" ' Front Left Flasher-PROC
SolCallBack(20) = "Sol20" ' Front Right Flasher-PROC
SolCallback(24) = "Sol24" ' Beacon Flasher-PROC
SolCallBack(25) = "Sol25" ' Middle Right Flasher-PROC
SolCallBack(26) = "Sol26" ' Saloon Flasher-PROC
SolCallback(27) = "Sol27" ' Back Right Flasher-PROC
SolCallback(28) = "Sol28" ' Back Left Flasher-PROC
SolCallback(37) = "TrainB_PROC" ' Train Reverse-PROC
SolCallback(38) = "TrainF_PROC" ' Train forward-PROC
Else
SolCallBack(17) = "MoveMine" ' Mine Motor-VPM
SolModCallback(18) = "Sol18" ' Mine Flasher-VPM
SolModCallBack(19) = "Sol19" ' Front Left Flasher-VPM
SolModCallBack(20) = "Sol20" ' Front Right Flasher-VPM
SolModCallback(24) = "Sol24" ' Beacon Flasher-VPM
SolModCallBack(25) = "Sol25" ' Middle Right Flasher-VPM
SolModCallBack(26) = "Sol26" ' Saloon Flasher-VPM
SolModCallback(27) = "Sol27" ' Back Right Flasher-VPM
SolModCallback(28) = "Sol28" ' Back Left Flasher-VPM
SolCallback(37) = "TrainB" ' Train Reverse-VPM
SolCallback(38) = "TrainF" ' Train forward-VPM
End If
'**************************************************
'*************** Autoplunger *********************
'**************************************************
Dim plungerIM
Const IMPowerSetting = 65
Const IMTime = 0.25
Set plungerIM = New cvpmImpulseP
With plungerIM
.InitImpulseP swPlunger, IMPowerSetting, IMTime
.InitExitSnd SoundFX("fx_Autoplunger",DOFContactors), SoundFX("fx_solon",DOFContactors)
.CreateEvents "plungerIM"
End With
Sub AutoPlunger(Enabled)
If Enabled Then
PlungerIM.AutoFire
DOFALT 120, DOFPulse
End If
End Sub
'**************************************************
'*************** Targets Bad Guys ***********
'**************************************************
Dim sw61Dir, sw62Dir, sw63Dir, sw64Dir
' Left Drop Target
Sub Drop1(enabled)
If enabled Then
DOFALT 125, DOFPulse
Sw61.IsDropped = 0 : Sw61a.IsDropped = 0 : Controller.Switch(61) = 0 : PlaySoundAt SoundFX("fx_DropTargetUp",DOFDropTargets),sw61p: sw61Dir = 1: sw61.TimerEnabled = 1 : light42.state=2 : light43.state = 2
Else
DOFALT 125, DOFPulse
Sw61.IsDropped = 1 : Sw61a.IsDropped = 1 : Controller.Switch(61) = 1 : PlaySoundAt SoundFX("fx_DropTargetDown",DOFDropTargets),sw61p: sw61Dir = -1: sw61.TimerEnabled = 1: light42.state=0 : light43.state = 0
End If
End Sub
' Left Center Drop Target
Sub Drop2(enabled)
If enabled Then
DOFALT 126, DOFPulse
Sw62.IsDropped = 0 : Sw62a.IsDropped = 0 : Controller.Switch(62) = 0 : PlaySoundAt SoundFX("fx_DropTargetUp",DOFDropTargets),sw62p: sw62Dir = 1: sw62.TimerEnabled = 1: light25.state=2 : light26.state = 2
Else
DOFALT 126, DOFPulse
Sw62.IsDropped = 1 : Sw62a.IsDropped = 1 : Controller.Switch(62) = 1 : PlaySoundAt SoundFX("fx_DropTargetDown",DOFDropTargets),sw62p: sw62Dir = -1: sw62.TimerEnabled = 1: light25.state=0 : light26.state = 0
End If
End Sub
' Right Center Drop Target
Sub Drop3(enabled)
If enabled Then
DOFALT 127, DOFPulse
Sw63.IsDropped = 0 : Sw63a.IsDropped = 0 : Controller.Switch(63) = 0 : PlaySoundAt SoundFX("fx_DropTargetUp",DOFDropTargets),sw63p: sw63Dir = 1: sw63.TimerEnabled = 1: light44.state=2 : light45.state = 2
Else
DOFALT 127, DOFPulse
Sw63.IsDropped = 1 : Sw63a.IsDropped = 1 : Controller.Switch(63) = 1 : PlaySoundAt SoundFX("fx_DropTargetDown",DOFDropTargets),sw63p: sw63Dir = -1: sw63.TimerEnabled = 1: light44.state=0 : light45.state = 0
End If
End Sub
' Right Drop Target
Sub Drop4(enabled)
If enabled Then
DOFALT 128, DOFPulse
Sw64.IsDropped = 0 : Sw64a.IsDropped = 0 : Controller.Switch(64) = 0 : PlaySoundAt SoundFX("fx_DropTargetUp",DOFDropTargets),sw64p: sw64Dir = 1: sw64.TimerEnabled = 1: light50.state=2 : light51.state = 2
Else
DOFALT 128, DOFPulse
Sw64.IsDropped = 1 : Sw64a.IsDropped = 1 : Controller.Switch(64) = 1 : PlaySoundAt SoundFX("fx_DropTargetDown",DOFDropTargets),sw64p: sw64Dir = -1: sw64.TimerEnabled = 1: light50.state=0 : light51.state = 0
End If
End Sub
Sub sw61_timer()
sw61p.Z = sw61p.Z + (2 * sw61Dir)
If sw61p.Z <= -39 Then Me.TimerEnabled = 0 : sw61p.Z = -39
If sw61p.Z >= 39 Then Me.TimerEnabled = 0 : sw61p.Z = 39
End Sub
Sub sw62_timer()
sw62p.Z = sw62p.Z + (2 * sw62Dir)
If sw62p.Z <= -39 Then Me.TimerEnabled = 0 : sw62p.Z = -39
If sw62p.Z >= 39 Then Me.TimerEnabled = 0 : sw62p.Z = 39
End Sub
Sub sw63_timer()
sw63p.Z = sw63p.Z + (2 * sw63Dir)
If sw63p.Z <= -39 Then Me.TimerEnabled = 0 : sw63p.Z = -39
If sw63p.Z >= 39 Then Me.TimerEnabled = 0 : sw63p.Z = 39
End Sub
Sub sw64_timer()
sw64p.Z = sw64p.Z + (2 * sw64Dir)
If sw64p.Z <= -39 Then Me.TimerEnabled = 0 : sw64p.Z = -39
If sw64p.Z >= 39 Then Me.TimerEnabled = 0 : sw64p.Z = 39
End Sub
'**************************************************
'*************** Mine Popper ******************
'**************************************************
Sub SolMinePopper(enabled)
If enabled Then
DOFALT 132, DOFPulse
MinePopper.kick 0, 45, 1.56
If BIK = 0 Then
PlaysoundAt SoundFX(SSolenoidOn,DOFContactors),MinePopper
Else
PlaysoundAt SoundFX("fx_mine_popper",DOFContactors),MinePopper
End If
End If
End Sub
'**************************************************
'*************** Knocker ******************
'**************************************************
Sub Knocker(enabled)
If enabled Then
PlaySoundAt SoundFX("fx_knocker",DOFKnocker),l84
DOFALT 151,DOFPulse
End If
End Sub
'************************************************
'*************** Saloon Popper ****************
'************************************************
Sub SolSaloonPopper(enabled)
If enabled Then
DOFALT 133, DOFPulse
BartPopper.kick 0, 45, 1.56
SecretEntrance.enabled = 0
vpmtimer.addtimer 1000 ,"SecretEntrance.enabled = 1'"
If BIK = 0 Then
PlaysoundAt SoundFX(SSolenoidOn,DOFContactors),BartPopper
Else
PlaysoundAt SoundFX("fx_saloon_popper",DOFContactors),BartPopper
End If
End If
End Sub
'******************************************************************
'******* Trough based on nFozzy's ***************************
'******************************************************************
'Load The Trough on Game Launch (order 35, 34, 33, 32)
Sub InitTrough()
' If PROC = 0 then
' Controller.Switch(35) = 1
' Else
' Controller.Switch(35) = 0
' End If
sw32.CreateSizedBallWithMass Ballsize/2, BallMass
sw33.CreateSizedBallWithMass Ballsize/2, BallMass
sw34.CreateSizedBallWithMass Ballsize/2, BallMass
sw35.CreateSizedBallWithMass Ballsize/2, BallMass
Controller.Switch(35) = 1
Controller.Switch(34) = 1
Controller.Switch(33) = 1
Controller.Switch(32) = 1
End Sub
'Sub sw35_Hit():UpdateTrough: If PROC = 0 then Controller.Switch(35) = 1: End If: End Sub
Sub sw35_Hit():Controller.Switch(35) = 1:UpdateTrough:End Sub
Sub sw35_UnHit():Controller.Switch(35) = 0:UpdateTrough:End Sub
Sub sw34_Hit():Controller.Switch(34) = 1:End Sub
Sub sw34_UnHit():Controller.Switch(34) = 0:UpdateTrough:End Sub
Sub sw33_Hit():Controller.Switch(33) = 1:End Sub
Sub sw33_UnHit():Controller.Switch(33) = 0:UpdateTrough:End Sub
Sub sw32_Hit():Controller.Switch(32) = 1:End Sub
Sub sw32_UnHit():Controller.Switch(32) = 0:UpdateTrough:End Sub
Sub sw31_Hit():vpmTimer.PulseSw 31 : End Sub
Sub UpdateTrough()
OutHole.TimerInterval = 300
OutHole.TimerEnabled = 1
End Sub
Sub OutHole_Timer()
If sw32.BallCntOver = 0 Then sw33.kick 58, 8
If sw33.BallCntOver = 0 Then sw34.kick 58, 8
If sw34.BallCntOver = 0 Then sw35.Kick 58, 8
If sw35.BallCntOver = 0 Then OutHole.kick 58,8
Me.TimerEnabled = 0
End Sub
'************************************************
'*************** Drain and Release *************
'************************************************
Dim BIP : BIP = 0
Sub OutHole_Hit()
PlaySoundAtBall "fx_drain"
UpdateTrough
BIP = BIP - 1
If PROC = 1 Then block.isdropped=0 : sw35.TimerEnabled = 1 : sw35.TimerInterval = 2000 ': Controller.Switch(35) = 1 :
End Sub
Sub sw35_Timer() 'let's enable trough switch 35 for 2 seconds and add a dropping wall to prevent bugs
'Controller.Switch(35)=0
block.isdropped=1
Me.TimerEnabled = 0
End Sub
Sub ReleaseBall(enabled)
If enabled Then
DOFALT 121, DOFPulse
If sw35.BallCntOver = 0 Then
PlaySoundAt SoundFX(SSolenoidOn,DOFContactors),sw32
Else
PlaySoundAt SoundFX("fx_ballrel",DOFContactors),sw32
End If
sw32.kick 58, 10
UpdateTrough
BIP = BIP + 1
End If
End Sub
'************************************************
'************** Slingshots *****************
'************************************************
Dim LStep, RStep, TStep
Sub sw51_Slingshot
DOFALT 122, DOFPulse
DOFALT 124, DOFPulse
PlaySoundAtBall SoundFX("fx_slingshotL",DOFContactors)
vpmTimer.PulseSw 51
LSling.Visible = 0
LSling1.Visible = 1
sling2.TransZ = -20
LStep = 0
Me.TimerInterval=20:Me.TimerEnabled=1
End Sub
Sub sw51_Timer
Select Case LStep
Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.TransZ = -10
Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:sling2.TransZ = 0:Me.TimerEnabled = 0
End Select
LStep = LStep + 1
End Sub
Sub sw52_Slingshot
DOFALT 123, DOFPulse
DOFALT 126, DOFPulse
PlaySoundAtBall SoundFX("fx_slingshotR",DOFContactors)
vpmTimer.PulseSw 52
RSling.Visible = 0
RSling1.Visible = 1
sling1.TransZ = -20
RStep = 0
Me.TimerInterval=20:Me.TimerEnabled=1
End Sub
Sub sw52_Timer
Select Case RStep
Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.TransZ = -10
Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:sling1.TransZ = 0:Me.TimerEnabled = 0
End Select
RStep = RStep + 1
End Sub
Sub sw55_Slingshot
DOFALT 134, DOFPulse
PlaySoundAtBall SoundFX("fx_slingshotL",DOFContactors)
vpmTimer.PulseSw 55
TSling.Visible = 0
TSling1.Visible = 1
sling3.TransZ = -20
TStep = 0
Me.TimerInterval=20:Me.TimerEnabled=1
End Sub
Sub sw55_Timer
Select Case TStep
Case 3:TSLing1.Visible = 0:TSLing2.Visible = 1:sling3.TransZ = -10
Case 4:TSLing2.Visible = 0:TSLing.Visible = 1:sling3.TransZ = 0:Me.TimerEnabled = 0
End Select
TStep = TStep + 1
End Sub
'************************************************
'************** Bumpers *****************
'************************************************
Dim dirRing1 : dirRing1 = -1
Dim dirRing2 : dirRing2 = -1
Sub Bumper1_Hit
vpmTimer.PulseSw 53
PlaySoundAtBall SoundFX("fx_BumperLeft",DOFContactors)
Me.TimerInterval=10:Me.TimerEnabled=1
DOFALT 130, DOFPulse
DOFALT 135, DOFPulse
End Sub
Sub Bumper2_Hit
vpmTimer.PulseSw 54
PlaySoundAtBall SoundFX("fx_BumperRight",DOFContactors)
Me.TimerInterval=10:Me.TimerEnabled=1
DOFALT 131, DOFPulse
DOFALT 136, DOFPulse
End Sub
Sub Bumper1_timer()
BR1.Z = BR1.Z + (5 * dirRing1)
If BR1.Z <= 0 Then dirRing1 = 1
If BR1.Z >= 30 Then
dirRing1 = -1
BR1.Z = 30
Me.TimerEnabled = 0
End If
End Sub
Sub Bumper2_timer()
BR2.Z = BR2.Z + (5 * dirRing2)
If BR2.Z <= 0 Then dirRing2 = 1
If BR2.Z >= 30 Then
dirRing2 = -1
BR2.Z = 30
Me.TimerEnabled = 0
End If
End Sub
'************************************************
'************** Gun Posts *****************
'************************************************
Sub GunPostLeft(enabled)
DOFALT 145, DOFPUlse
If Enabled Then
LPin.IsDropped = 0
PlaySoundAt SoundFX("fx_PostUp",DOFContactors),LeftFlipper
DOFALT 152, DOFOn
Else
LPin.IsDropped = 1
PlaySoundAt SoundFX("fx_PostDown",0),LeftFlipper
DOFALT 152, DOFOff
End If
End Sub
Sub GunPostRight(enabled)
DOFALT 146, DOFPulse
If Enabled Then
RPin.IsDropped = 0
PlaySoundAt SoundFX("fx_PostUp",DOFContactors),RightFlipper
DOFALT 152, DOFOn
Else
RPin.IsDropped = 1
PlaySoundAt SoundFX("fx_PostDown",0),RightFlipper
DOFALT 152, DOFOff
End If
End Sub
'************************************************
'*************** Loop Gates ****************
'************************************************
Sub LGate(enabled)
If enabled Then
PlaySoundAt "fx_gate",LLoopGate
LLoopGate.Open = 1
DOFALT 147,DOFPulse
Else
DOFALT 147,DOFPulse
LLoopGate.Open = 0
End If
End Sub
Sub RGate(enabled)
If enabled Then
PlaySoundAt "fx_gate",RLoopGate
RLoopGate.Open = 1
DOFALT 148,DOFPulse
Else
DOFALT 148,DOFPulse
RLoopGate.Open = 0
End If
End Sub
'*************************************************
'****** Shoopity's Train Animation ******
'*************************************************
Dim TrainOn,TrainDir, TrainSpeed
TrainSpeed = 1
Sub TrainF(enabled)
Train.TransX = -TrainMech.Position
Train1.TransX = -TrainMech.Position
TrainTimer.Enabled = 1
TrainOn = enabled
End Sub
Sub TrainB(enabled)
Train.TransX = -TrainMech.Position
Train1.TransX = -TrainMech.Position
TrainTimer.Enabled = 1
TrainOn = enabled
End Sub
Sub TrainTimer_Timer()
PlayLoopSoundAt SoundFX("fx_train_motor", DOFGear), Train
If Train.TransX >= -TrainMech.Position Then
TrainDir = -1
Pgear1.RotY = Pgear1.RotY + 1
Pgear2.RotY = Pgear2.RotY - 1
Pgear3.RotY = Pgear3.RotY - 1
Else
TrainDir = 1
Pgear1.RotY = Pgear1.RotY - 1
Pgear2.RotY = Pgear2.RotY + 1
Pgear3.RotY = Pgear3.RotY + 1
End If
Train.TransX = Train.TransX + TrainSpeed * TrainDir
Train1.TransX = Train.TransX
If ((Train.TransX >= -TrainMech.Position AND TrainDir = 1) OR (Train.TransX <= -TrainMech.Position AND TrainDir = -1)) Then Train.TransX = -TrainMech.Position
If ((Train.TransX >= -TrainMech.Position AND TrainDir = 1) OR (Train.TransX <= -TrainMech.Position AND TrainDir = -1)) AND TrainOn = 0 Then
Me.Enabled = 0
StopSound "fx_train_motor"
End If
If Train.TransX = -611 Then StopSound "fx_train_motor"
End Sub
'***********************************************
'** New Train Mech to work with P-ROC (Dozer) **
'***********************************************
Dim TrainDirPROC
Sub TrainF_PROC(Enabled)
If Enabled Then
PlayLoopSoundAt SoundFX("fx_train_motor", DOFGear), Train
DOFALT 140, DOFOn
Polly.Enabled = 1
sw71.enabled = 1
TrainDirPROC = 1
Else
StopSound "fx_train_motor"
DOFALT 140, DOFOff
Polly.enabled = 0
sw71.enabled = 0
End If
End Sub
Sub TrainB_PROC(Enabled)
If Enabled Then
PlayLoopSoundAt SoundFX("fx_train_motor", DOFGear), Train
DOFALT 140, DOFOn
Polly.Enabled = 1
sw71.enabled = 1
TrainDirPROC = 2
Else
StopSound "fx_train_motor"
DOFALT 140, DOFOff
Polly.enabled = 0
sw71.enabled = 0
End If
End Sub
Sub Polly_Timer()
Select Case TrainDirPROC
Case 1: Train.TransX = Train.TransX - 2
Train1.TransX = Train.TransX
Pgear1.RotY = Pgear1.RotY + 1
Pgear2.RotY = Pgear2.RotY - 1
Pgear3.RotY = Pgear3.RotY - 1
If Train.TransX <= -5 Then Controller.Switch(72) = 0
If Train.TransX <= -611 Then Controller.Switch(71) = 1
Case 2: Train.TransX = Train.TransX + 4
Train1.TransX = Train.TransX
Pgear1.RotY = Pgear1.RotY - 1
Pgear2.RotY = Pgear2.RotY + 1
Pgear3.RotY = Pgear3.RotY + 1
If Train.TransX => 0 Then Controller.Switch(72) = 1 : Controller.Switch(71) = 1
End Select
End Sub
Sub sw71_Timer() 'Dozer - Encoder Pulse which runs with Train Mech.
vpmTimer.PulseSw 71
End Sub
Sub Enc_Stop_Timer() 'Dozer - will disable the pulse the first 5 seconds the table is run
sw71.enabled = 0
me.enabled = 0
End Sub
'*********************************************
'****** Shoopity's Mine Animation ******
'*********************************************
Dim MineOn, Minespeed, MineDir
MineSpeed = 0.25
Sub MoveMine(enabled)
MineTimer.enabled = 1
MineOn = enabled
End Sub
Sub MineTimer_Timer()
If MineSign.Z > MineMech.Position Then
MineDir = -1
Else
MineDir = 1
End If
PlayLoopSoundAt SoundFX("fx_mine_motor", DOFGear), Mine
MineSign.Z = MineSign.Z + Minespeed * MineDir
If ((MineSign.Z >= MineMech.Position AND MineDir = 1) OR (MineSign.Z <= MineMech.Position AND MineDir = -1)) AND Not(MineOn) Then 'Shoopity- If the primitive catches the mech AND the solenoid is off, then turn off the timer
Me.Enabled = 0
StopSound "fx_mine_motor"
End If
Mine.RotX = (MineSign.Z * 0.375) - 10
If MineSign.Z < 24 Then 'Shoopity- I will drop the wall in the function that moves the sign
sw15.IsDropped = 0
else
sw15.IsDropped = 1
End If
End sub
'**********************************************
'** New Mine Mech to work with P-ROC (Dozer) **
'**********************************************
Dim MineDirPROC:MineDirPROC = 1
Sub MoveMine_PROC(Enabled)
If Enabled then
PlayLoopSoundAt SoundFX("fx_mine_motor", DOFGear), Mine
DOFALT 141, DOFOn
MineDirPROC=MineDirPROC
sw15.Timerenabled = 1
sw15b.Timerenabled = 1
Else
sw15.Timerenabled = 0
sw15b.Timerenabled = 0
StopSound "fx_mine_motor"
DOFALT 141, DOFOff
End If
End Sub
Sub Sw15_Timer()
Select Case MineDirPROC
Case 1: MineSign.Z = MineSign.Z + Minespeed
Mine.RotX = (MineSign.Z * 0.375) - 10
If MineSign.Z => 0 Then Controller.Switch(77) = 0
If MineSign.Z => 24 Then sw15.IsDropped = 1
If MineSign.Z => 45 Then MineDirPROC = 2
Case 2: MineSign.Z = MineSign.Z - Minespeed
Mine.RotX = (MineSign.Z * 0.375) - 10
If MineSign.Z <= 0 Then Controller.Switch(77) = 1
If MineSign.Z <= 24 Then sw15.IsDropped = 0
If MineSign.Z <= 0 Then MineDirPROC = 1
End Select
End sub
Sub sw15b_Timer() 'Dozer - Encoder Pulse which runs with Mine Mech.
vpmTimer.PulseSw 78
End Sub
'*********************************************
'****** Shoopity 's Bart Animation ******
'*********************************************
Dim bsmash : bsmash = 1
Dim blrnh:blrnh = 1
Dim blrnhud:blrnhud = 1
Dim BartSpeed:Bartspeed = 6
Dim BallHat
Sub InitToys
Set BallHat = KiHat.CreateBall
BartOrigX = Bart.X
BartOrigY = Bart.Y
Mine.RotX = (MineSign.Z * 0.375) - 10
KiHat.Kick 0, 0, 0
Dim TrainPosX:TrainPosX = LoadValue (TableName,"TrainPos")
If TrainPosX = "" then Train.TransX = 0 Else Train.TransX = TrainPosX End If
End Sub
Sub MoveBart(Enabled)
If Enabled Then
DOFALT 149, DOFPulse
blrnh = -1 'Start him moving left
BartSwitched = 0 'Reset every time this kicks
Bart1.Enabled = 1 'Shoopity- turn on the animation any time the bart toy is moving
PlaySoundAt SoundFX("fx_bart_hit", DOFContactors),Bart
BallHat.VelX = RndNum (-10,10)
end If
End Sub
Sub MoveHat(Enabled)
If Enabled Then
DOFALT 150, DOFPulse
PlaySoundAt SoundFX("fx_bart_move", DOFContactors),Bart
Bart2.Enabled = 1 'Shoopity- Here, the hat obviously returns to the head, and we'll turn it off in the timer, like it was done prior to me coming here
End If
End Sub
Sub BHit_Timer()
Select Case bsmash
Case 1:
If Bart.TransY => 20 Then
bsmash = 2
End If
Bart.TransY = Bart.TransY + 2
Bart_Hat.TransY = Bart_Hat.TransY + 2
bartsh.Y = bartsh.Y + 2
Case 2:
If Bart.TransY <= 0 Then
me.enabled = 0
Bart.TransZ= 0
Bart_Hat.TransY = 70
bartsh.Y = 224.25
End If
Bart.TransY = Bart.TransY - 2
Bart_Hat.TransY = Bart_Hat.TransY - 2
bartsh.Y = bartsh.Y - 2
End Select
End Sub
Dim BartOrigX, BartOrigY, BartSwitched
Sub Bart1_Timer() ' - Left then right with no hat lift. 'Shoopity- I've changed it to just move back and forth as long as the solenoid is on
Bart.X = Bart.X + BartSpeed * blrnh 'Shoopity- so we move it, but you can change the speed by changing BartSpeed if you want, and blrnh will be used as a direction
Bart_Hat.X = Bart_Hat.X + BartSpeed * blrnh 'Shoopity- had to change it back since they're not longer in the same location
bartsh.X = bartsh.X + BartSpeed * blrnh
Bart_Hat.RotZ = KiHat.X - BallHat.X
If Bart.X <= 592 Then blrnh = 1:BartSwitched = BartSwitched + 1
If Bart.X >= 660 Then blrnh = -1:BartSwitched = BartSwitched + 1
If Bart.X <= BartOrigX AND BartSwitched >=2 Then
Bart.X = BartOrigX:bartsh.X=624.436
Me.Enabled = 0
End If
End Sub
Dim HatHeight, HatHi, HatAdjuster
HatAdjuster = 100
HatHeight = Bart_Hat.Z 'Shoopity- So if you ever change the height of the hat, it'll get remembered here properly
HatHi = HatHeight + 75 'Shoopity- The heighest point the hat will go, so if you want to change how hi the hat goes, change that here
Sub Bart2_Timer() ' - Left then right with no hat lift. 'Shoopity- I'm pretty sure this is supposed to say "Hat hit" or something like that
Bart_Hat.Z = (dSin(blrnhud) * HatAdjuster) + HatHeight 'Shoopity- This is how I use physics, although it's not going to be variable height like the beer mug is
blrnhud = blrnhud + SlowMo + 5
If blrnhud > 180 Then
blrnhud =1
Me.Enabled = 0
End If
End Sub
'********************************************************
' Shoopity's Beer Mug Animation
'********************************************************
Dim MugHit 'Shoopity- Variable to capture the Y velocity of the ball to know how high to kick it
Sub Sw46_Hit()
DOFALT 153, DOFPulse
If BeerMugMod = 1 Then
BeerMugL1.Duration 2, 1000, 0 'light starts to blink for 1000ms and then switches to OFF
BeerMugL2.Duration 2, 1000, 0
BeerMugL3.Duration 2, 1000, 0
End If
RandomSoundMetal()
vpmTimer.PulseSwitch 46,0,0
MugHit = ActiveBall.VelY
Beer.Enabled = 1
End Sub
Dim mmmbeer, BeerMaxHeight, SlowMo, BeerAdjuster, mmmswitch
SlowMo = 3 'Shoopity- Just a fun variable if you want to see stuff move in slow motion
mmmbeer = 1
BeerAdjuster = 10 'Shoopity- Adjuster to translate the ball velocity into how high the mug goes
BeerMaxHeight = 150 'Shoopity- if you want to change how high the mug goes, just change this number
Sub Beer_Timer()
BeerMug.Z = (dSin(mmmBeer) * (ABS(MugHit)*BeerAdjuster)) + 52
sw46p.RotX = -(dSin(mmmBeer) * MugHit/30)
If BeerMugMod = 1 Then
BeerMugL1.BulbHaloHeight = BeerMug.Z
BeerMugL2.BulbHaloHeight = BeerMug.Z + 56
BeerMugL3.BulbHaloHeight = BeerMug.Z + 30
End If
mmmBeer = mmmBeer + SlowMo
If BeerMug.Z > BeerMaxHeight Then 'Shoopity- If you hight the max height then...
BeerMug.Z = BeerMaxHeight ' Hold it there for a bit
sw46p.RotX = -BeerMaxHeight/3 ' Hold it there for a bit
End If
If mmmBeer > 180 Then 'Shoopity- If it's traveled all the way up and down then...
mmmBeer = 1 'Reset so next time it starts over
Me.Enabled = 0 'Stop the animation
End If
End Sub
'*********************************************
'************** Flippers ***************
'*********************************************
Sub SolLFlipper(Enabled)
If Enabled Then
PlaySoundAt SoundFX("fx_flipperup",DOFFlippers), LeftFlipper
DOFALT 101, DOFOn
LeftFlipper.RotateToEnd
Else
PlaySoundAt SoundFX("fx_flipperdown",DOFFlippers), RightFlipper
DOFALT 101, DOFOff
LeftFlipper.RotateToStart
End If
End Sub
Sub SolRFlipper(Enabled)
If Enabled Then
PlaySoundAt SoundFX("fx_flipperup",DOFFlippers), LeftFlipper
DOFALT 102, DOFOn
RightFlipper.RotateToEnd
Else
PlaySoundAt SoundFX("fx_flipperdown",DOFFlippers), RightFlipper
DOFALT 102, DOFOff
RightFlipper.RotateToStart
End If
End Sub
'**************************************************************
'*********************** Switches ************************
'**************************************************************
'*************** Gold Mine & Sign *************
Sub sw15_Hit() : PlaySoundAtBall "fx_mine_hit" : vpmTimer.PulseSwitch 15,0,0 : DOFALT 149, DOFPulse : End Sub
Sub sw15b_Hit() : RandomSoundMetal() : vpmTimer.PulseSwitch 15,0,0 : End Sub
'*************** Bart Toy *********************
Sub sw75_Hit() : RandomSoundMetal() : vpmTimer.PulseSwitch 75,0,0 : bsmash = 1 : Bhit.enabled = 1 : End Sub
'*************** Saloon *********************
Sub sw73_Hit() : PlaySoundAtBall "fx_gate4" : vpmTimer.PulseSwitch 73,0,0 : End Sub
'*************** Opto Switches *********************
Sub sw36_Hit() : vpmTimer.PulseSwitch 36,0,0 : End Sub
Sub sw37_Hit() : vpmTimer.PulseSwitch 37,0,0 : End Sub
Sub sw56_Hit() : vpmTimer.PulseSwitch 56,0,0 : End Sub
Sub sw66_Hit() : vpmTimer.PulseSwitch 66,0,0 : End Sub
Sub sw67_Hit() : vpmTimer.PulseSwitch 67,0,0 : End Sub