forked from LegendsUnchained/vpx-standalone-alp4k
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nip-It (Bally 1973).vbs
3347 lines (2830 loc) · 70 KB
/
Nip-It (Bally 1973).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
'*
'* Bally's Nip-It (1973)
'* Table primary build/scripted by Loserman!
'* Playfield/Plastics by hauntfreaks
'* http://www.ipdb.org/machine.cgi?id=1680
'*
'*
option explicit
Randomize
'********from JPSalas***************************
Const BallSize = 50 ' 50 is the normal size
Const BallMass = 1.7' 1 is the normal ball mass.
'*********************************************
ExecuteGlobal GetTextFile("core.vbs")
On Error Resume Next
ExecuteGlobal GetTextFile("Controller.vbs")
If Err Then MsgBox "Unable to open Controller.vbs. Ensure that it is in the scripts folder."
On Error Goto 0
Const cGameName = "NipIt_1973"
Const ShadowFlippersOn = false
Const ShadowBallOn = false
Const ShadowConfigFile = false
Const OV =10 'object volume, default = 10 higher = louder
Dim Controller ' B2S
Dim B2SScore ' B2S Score Displayed
Const HSFileName="NipIt_73VPX.txt"
Const B2STableName="NipIt_1973"
Const LMEMTableConfig="LMEMTables.txt"
Const LMEMShadowConfig="LMEMShadows.txt"
Dim EnableBallShadow
Dim EnableFlipperShadow
'* this value adjusts whether or not a locked ball remains locked when game is over (for use in next game) or kicked out
'* 0=ball remains locked at game over, 1=ball is kicked out at game over
Const EndGameClearGatorHole=0
'* this value adjusts score motor behavior - 0 allows you to continue scoring while the score motor is running - 1 sets score motor to behave more like a real EM
Const ScoreMotorAdjustment=1
'* this is a debug setting to use an older scoring routine vs a newer score routine - don't change this value
Const ScoreAdditionAdjustment=1
Dim bBallInPlungerLane
dim ScoreChecker
dim CheckAllScores
dim sortscores(4)
dim sortplayers(4)
Dim B2SOn
Dim B2SFrameCounter
Dim BackglassBallFlagColor
Dim TextStr,TextStr2
Dim i
Dim obj
Dim Points210counter
Dim Points500counter
Dim Points1000counter
Dim Points2000counter
Dim BallsPerGame
Dim InProgress
Dim BallInPlay
Dim CreditsPerCoin
Dim Score100K(4)
Dim Score(4)
Dim ScoreDisplay(4)
Dim HighScorePaid(4)
Dim HighScore
Dim HighScoreReward
Dim BonusMultiplier
Dim Credits
Dim Match
Dim Replay1
Dim Replay2
Dim Replay3
Dim Replay4
Dim Replay1Paid(4)
Dim Replay2Paid(4)
Dim Replay3Paid(4)
Dim Replay4Paid(4)
Dim TableTilted
Dim TiltCount
Dim bgpos,dooralreadyopen
Dim OperatorMenu
Dim FlipperPosition
Dim LeftFlippersFlipped,RightFlippersFlipped
Dim BonusBooster
Dim BonusBoosterCounter
Dim BonusCounter
Dim HoleCounter
Dim Ones
Dim Tens
Dim Hundreds
Dim Thousands
Dim Player
Dim Players
Dim rst
Dim bonuscountdown
Dim TempMultiCounter
dim TempPlayerup
dim RotatorTemp
Dim bump1
Dim bump2
Dim bump3
Dim bump4
Dim LastChime10
Dim LastChime100
Dim LastChime1000
Dim Score10
Dim Score100
Dim targettempscore
Dim SpecialLightCounter
Dim SpecialLightOption
Dim HorseshoeCounter
Dim DropTargetCounter
Dim LeftTargetCounter
Dim RightTargetCounter
Dim MotorRunning
Dim Replay1Table(15)
Dim Replay2Table(15)
Dim Replay3Table(15)
Dim Replay4Table(15)
Dim ReplayTableSet
Dim ReplayLevel
Dim ReplayTableMax
Dim BonusSpecialThreshold
Dim TargetLightsOn
Dim AdvanceLightCounter
dim bonustempcounter
dim ChimesOn
dim raceRflag
dim raceAflag
dim raceCflag
dim raceEflag
Dim LStep, LStep2, RStep, xx,yy
Dim TStep
Dim ReelCounter
Dim BallCounter
Dim BallReelAddStart(12)
Dim BallReelAddFrames(12)
Dim BallReelDropStart(12)
Dim BallReelDropFrames(12)
Dim EightLit
Dim X
Dim Y
Dim Z
Dim AddABall
Dim AddABallFrames
Dim DropABall
Dim DropABallFrames
Dim CurrentFrame
Dim BonusMotorRunning
Dim QueuedBonusAdds
Dim QueuedBonusDrops
Dim TempLightTracker
Dim TargetLeftFlag
Dim TargetCenterFlag
Dim TargetRightFlag
Dim TargetSequenceComplete
Dim SpecialLightsFlag
Dim AlternatingRelay
Dim ZeroToNineUnit
Dim Kicker1Hold,Kicker2Hold,Kicker3Hold
Dim mHole,mHole2, mHole3
Dim SpinPos,Spin,Count,Count1,Count2,Count3,Reset,VelX,VelY,BallSpeed,LitSpinner
Spin=Array("5","6","7","8","9","10","J","Q","K","A")
Dim SilverBonusCounter
Dim ScoreMotorStepper
Dim FirecrackerLighter
Dim GatorMultiBall
Dim GatorSpot
Dim GatorRunning
Dim GatorPositionCounter
Sub Table1_Init()
LoadEM
LoadLMEMConfig2
If Table1.ShowDT = false then
For each obj in DesktopCrap
obj.visible=False
next
End If
OperatorMenuBackdrop.image = "PostitBL"
For XOpt = 1 to MaxOption
Eval("OperatorOption"&XOpt).image = "PostitBL"
next
For XOpt = 1 to 256
Eval("Option"&XOpt).image = "PostItBL"
next
Mush1.Visible=1
Mush3.Visible = 0:Mush2.Visible = 0'
Count=0
Count1=0
Count2=0
Count3=0
Reset=0
ZeroToNineUnit=Int(Rnd*10)
Kicker1Hold=0
Kicker2Hold=0
Kicker3Hold=0
EightLit=0
ChimesOn=0
BallCounter=0
ReelCounter=0
AddABall=0
DropABall=0
SetupReplayTables
PlasticsOn
BumpersOff
OperatorMenu=0
HighScore=0
MotorRunning=0
HighScoreReward=1
Credits=0
BallsPerGame=5
ReplayLevel=1
GatorMultiBall=False
AlternatingRelay=1
SpecialLightOption=2
BackglassBallFlagColor=1
loadhs
if HighScore=0 then HighScore=50000
TableTilted=false
Match=int(Rnd*10)
MatchReel.SetValue((Match)+1)
Match=Match*10
SpinPos=int(Rnd*10)
CanPlayReel.SetValue(0)
GameOverReel.SetValue(1)
FlipperPosition=0
LeftFlippersFlipped=0
RightFlippersFlipped=0
ShowFlippers
For each obj in PlayerHuds
obj.state=0
next
For each obj in PlayerHUDScores
obj.state=0
next
For each obj in PlayerScores
obj.ResetToZero
next
for each obj in BonusLights
obj.state=0
next
for each obj in bottgate
obj.isdropped=true
next
bgpos=6
bottgate(bgpos).isdropped=false
dooralreadyopen=0
primgate.RotY=90
Replay1=Replay1Table(ReplayLevel)
Replay2=Replay2Table(ReplayLevel)
Replay3=Replay3Table(ReplayLevel)
Replay4=Replay4Table(ReplayLevel)
BonusCounter=0
HoleCounter=0
InstructCard.image="IC"
BallCard.image="BC"+FormatNumber(BallsPerGame,0)
RefreshReplayCard
CurrentFrame=0
Bumper1Light.state=0
Bumper2Light.state=0
Bumper3Light.state=0
Bumper4Light.state=0
Kicker5.enabled=false
Kicker6.enabled=false
Kicker7.enabled=false
AdvanceLightCounter=0
Players=0
RotatorTemp=1
InProgress=false
TargetLightsOn=false
ScoreText.text=HighScore
TiltReel.SetValue(1)
If B2SOn Then
if Match=0 then
Controller.B2SSetMatch 100
else
Controller.B2SSetMatch Match
end if
Controller.B2SSetScoreRolloverPlayer1 0
Controller.B2SSetScoreRolloverPlayer2 0
Controller.B2SSetScoreRolloverPlayer3 0
Controller.B2SSetScoreRolloverPlayer4 0
'Controller.B2SSetScore 3,HighScore
Controller.B2SSetTilt 0
Controller.B2SSetCredits Credits
Controller.B2SSetGameOver 1
End If
for i=1 to 4
player=i
If B2SOn Then
Controller.B2SSetScorePlayer player, 0
End If
next
bump1=1
bump2=1
bump3=1
bump4=1
InitPauser5.enabled=true
If Credits > 0 Then DOF 129, DOFOn
End Sub
Sub Table1_exit()
savehs
SaveLMEMConfig
SaveLMEMConfig2
If B2SOn Then Controller.Stop
end sub
Sub TimerTitle1_timer
if B2SOn then
if raceRflag=1 then
Controller.B2SSetData 11,0
raceRflag=0
else
Controller.B2SSetData 11,1
raceRflag=1
end if
end if
end sub
Sub TimerTitle2_timer
if B2SOn then
if raceAflag=1 then
Controller.B2SSetData 12,0
raceAflag=0
else
Controller.B2SSetData 12,1
raceAflag=1
end if
end if
end sub
Sub TimerTitle3_timer
if B2SOn then
if raceCflag=1 then
Controller.B2SSetData 13,0
raceCflag=0
else
Controller.B2SSetData 13,1
raceCflag=1
end if
end if
end sub
Sub TimerTitle4_timer
if B2SOn then
if raceEflag=1 then
Controller.B2SSetData 14,0
raceEflag=0
else
Controller.B2SSetData 14,1
raceEflag=1
end if
end if
end sub
Sub Table1_KeyDown(ByVal keycode)
' GNMOD
if EnteringInitials then
CollectInitials(keycode)
exit sub
end if
if EnteringOptions then
CollectOptions(keycode)
exit sub
end if
If keycode = PlungerKey Then
Plunger.PullBack
PlungerPulled = 1
End If
if keycode = LeftFlipperKey and InProgress = false then
OperatorMenuTimer.Enabled = true
end if
' END GNMOD
If keycode = LeftFlipperKey and InProgress=true and TableTilted=false Then
LeftFlippers(FlipperPosition).RotateToEnd
LeftFlippersFlipped=1
PlaySound "buzzL",-1
PlaySound SoundFXDOF("LeftFlipperUpH",101,DOFOn,DOFFlippers)
End If
If keycode = RightFlipperKey and InProgress=true and TableTilted=false Then
RightFlippers(FlipperPosition).RotateToEnd
RightFlippersFlipped=1
PlaySound SoundFXDOF("RightFlipperUpH",102,DOFOn,DOFFlippers)
PlaySound "buzz",-1
End If
if keycode = RightMagnaSave and InProgress=true and TableTilted=false then
Playsound"BallyGator"
If GatorRunning=0 then
GatorSpot=0
GatorPositionCounter=15
GatorWall.IsDropped=true
' GatorWall1.IsDropped=false
gatortimerout.enabled=true
GatorRunning=1
Playsound "Ballygator"
Kicker5.enabled=true
Kicker6.enabled=true
Kicker7.enabled=true
end if
end if
If keycode = LeftTiltKey Then
Nudge 90, 2
TiltIt
End If
If keycode = RightTiltKey Then
Nudge 270, 2
TiltIt
End If
If keycode = CenterTiltKey Then
Nudge 0, 2
TiltIt
End If
If keycode = MechanicalTilt Then
TiltCount=2
TiltIt
End If
If keycode = AddCreditKey or keycode = 4 then
If B2SOn Then
'Controller.B2SSetScorePlayer6 HighScore
End If
playsound "coinin"
AddSpecial2
end if
if keycode = 5 then
playsound "coinin"
AddSpecial2
keycode= StartGameKey
end if
if keycode = StartGameKey and Credits>0 and InProgress=true and Players>0 and Players<4 and BallInPlay<2 then
Credits=Credits-1
If Credits < 1 Then DOF 129, DOFOff
CreditsReel.SetValue(Credits)
Players=Players+1
CanPlayReel.SetValue(Players)
playsound "BallyStartButtonPlayers2-4"
If B2SOn Then
Controller.B2SSetCanPlay Players
If Players=2 Then
Controller.B2SSetScoreRolloverPlayer2 0
End If
If Players=3 Then
Controller.B2SSetScoreRolloverPlayer3 0
End If
If Players=4 Then
Controller.B2SSetScoreRolloverPlayer4 0
End If
Controller.B2SSetCredits Credits
End If
end if
if keycode=StartGameKey and Credits>0 and InProgress=false and Players=0 and GatorMultiBall=False and EnteringOptions = 0 then
'GNMOD
OperatorMenuTimer.Enabled = false
'END GNMOD
Credits=Credits-1
If Credits < 1 Then DOF 129, DOFOff
CreditsReel.SetValue(Credits)
Players=1
CanPlayReel.SetValue(Players)
MatchReel.SetValue(0)
Player=1
playsound "startup_norm"
TempPlayerUp=Player
' PlayerUpRotator.enabled=true
rst=0
BallInPlay=1
InProgress=true
resettimer.enabled=true
BonusMultiplier=1
TimerTitle1.enabled=1
TimerTitle2.enabled=1
TimerTitle3.enabled=1
TimerTitle4.enabled=1
If B2SOn Then
Controller.B2SSetTilt 0
Controller.B2SSetGameOver 0
Controller.B2SSetMatch 0
Controller.B2SSetCredits Credits
Controller.B2SSetCanPlay 1
Controller.B2SSetPlayerUp 1
Controller.B2SSetBallInPlay BallInPlay
Controller.B2SSetScoreRolloverPlayer1 0
Controller.B2SSetShootAgain 0
End If
If Table1.ShowDT = True then
For each obj in PlayerScores
' obj.ResetToZero
obj.Visible=true
next
For each obj in PlayerScoresOn
' obj.ResetToZero
obj.Visible=false
next
For each obj in PlayerHuds
obj.state=0
next
For each obj in PlayerHUDScores
obj.state=0
next
PlayerHuds(Player-1).state=1
PlayerHUDScores(Player-1).state=1
PlayerScores(Player-1).Visible=0
PlayerScoresOn(Player-1).Visible=1
end If
GameOverReel.SetValue(0)
end if
End Sub
Sub Table1_KeyUp(ByVal keycode)
' GNMOD
if EnteringInitials then
exit sub
end if
If keycode = PlungerKey Then
if PlungerPulled = 0 then
exit sub
end if
' PlaySound"plungerrelease"
Plunger.Fire
If bBallInPlungerLane=true Then
PlaySoundAt "P_S_B_S_K1", plunger
Else
PlaySoundAt "P_E_S", plunger
End If
End If
if keycode = LeftFlipperKey then
OperatorMenuTimer.Enabled = false
end if
' END GNMOD
If keycode = LeftFlipperKey and InProgress=true and TableTilted=false Then
LeftFlippers(FlipperPosition).RotateToStart
LeftFlippersFlipped=0
PlaySound SoundFXDOF("LeftFlipperDownH",101,DOFOff,DOFFlippers)
StopSound "buzzL"
End If
If keycode = RightFlipperKey and InProgress=true and TableTilted=false Then
RightFlippers(FlipperPosition).RotateToStart
RightFlippersFlipped=0
StopSound "buzz"
PlaySound SoundFXDOF("RightFlipperDownH",102,DOFOff,DOFFlippers)
End If
End Sub
Sub GL1_hit()
Playsound "Left_GateTouch"
End Sub
Sub GL2_hit()
Playsound "Left_GateTouch"
End Sub
Sub GR2_hit()
Playsound "Right_GateTouch"
End Sub
Sub BiL_hit()
bBallInPlungerLane = True
End Sub
Sub BiL_unhit()
bBallInPlungerLane = False
End Sub
Sub Drain_Hit()
Drain.DestroyBall
PlaySound "fx_drain"
DOF 115, DOFPulse
If GatorMultiBall=False then
Pause4Bonustimer.enabled=true
else
GatorMultiBall=False
end if
End Sub
Sub Trigger0_Hit()
DOF 130, DOFPulse
End Sub
Sub Pause4Bonustimer_timer
Pause4Bonustimer.enabled=0
ScoreSilverBonus
End Sub
'***********************
' Flipper Logos
'***********************
Sub UpdateFlipperLogos_Timer
If FlipperPosition=0 then
FlipperT2Left.ObjRotZ=LeftFlippers(FlipperPosition).CurrentAngle+90
FlipperT2Right.ObjRotZ=RightFlippers(FlipperPosition).CurrentAngle+90
FlipperLSh.RotZ = LeftFlippers(FlipperPosition).currentangle
FlipperRSh.RotZ = RightFlippers(FlipperPosition).currentangle
else
FlipperT2Left1.ObjRotZ=LeftFlippers(FlipperPosition).CurrentAngle+90
FlipperT2Right1.ObjRotZ=RightFlippers(FlipperPosition).CurrentAngle+90
FlipperLSh1.RotZ = LeftFlippers(FlipperPosition).currentangle
FlipperRSh1.RotZ = RightFlippers(FlipperPosition).currentangle
end if
PGate.Rotz = (Gate.CurrentAngle*.75) + 25
End Sub
'***********************
' the Gator!
'***********************
Sub gatortimerout_timer
Primitive5.TransZ = -100
GatorSpot=-100
gatortimerout.enabled=false
Kicker5.enabled=true
Kicker6.enabled=true
Kicker7.enabled=true
gatortimerin.enabled=true
end sub
Sub gatortimerin_timer
GatorSpot=GatorSpot+10
GatorPositionCounter=GatorPositionCounter-1
if GatorSpot>0 then
GatorSpot=0
end if
If GatorPositionCounter<1 then
GatorWall.IsDropped=false
' GatorWall1.IsDropped=true
GatorRunning=0
' Primitive5.Visible=false
Kicker5.enabled=false
Kicker6.enabled=false
Kicker7.enabled=false
gatortimerin.enabled=false
end if
Primitive5.TransZ = GatorSpot
end sub
Sub Kicker5_Hit()
if gatortimerin.enabled=true then
Kicker5.kick 100,15
else
Kicker5.kick 275,5
end if
end sub
Sub Kicker6_Hit()
if gatortimerin.enabled=true then
Kicker6.kick 95,15
else
Kicker6.kick 275,5
end if
end sub
Sub Kicker7_Hit()
if gatortimerin.enabled=true then
Kicker7.kick 90,15
else
Kicker7.kick 275,5
end if
end sub
'***********************
' slingshots
'
Sub RightSlingShot_Slingshot
PlaySound SoundFXDOF("right_slingshot",104,DOFPulse,DOFContactors), 0, 1, 0.05, 0.05
DOF 106, DOFPulse
RSling0.Visible = 0
RSling1.Visible = 1
sling1.TransZ = -20
RStep = 0
RightSlingShot.TimerEnabled = 1
AddScore 10
End Sub
Sub RightSlingShot_Timer
Select Case RStep
Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.TransZ = -10
Case 4:RSLing2.Visible = 0:RSling0.Visible = 1:sling1.TransZ = 0:RightSlingShot.TimerEnabled = 0
End Select
RStep = RStep + 1
End Sub
Sub LeftSlingShot_Slingshot
PlaySound SoundFXDOF("left_slingshot",103,DOFPulse,DOFContactors),0,1,-0.05,0.05
DOF 105, DOFPulse
LSling0.Visible = 0
LSling1.Visible = 1
sling2.TransZ = -20
LStep = 0
LeftSlingShot.TimerEnabled = 1
AddScore 10
End Sub
Sub LeftSlingShot_Timer
Select Case LStep
Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.TransZ = -10
Case 4:LSLing2.Visible = 0:LSLing0.Visible = 1:sling2.TransZ = 0:LeftSlingShot.TimerEnabled = 0
End Select
LStep = LStep + 1
End Sub
'***********************************
' Walls
'***********************************
Sub RubberWallSwitches_Hit(idx)
if TableTilted=false then
AddScore(10)
end if
end Sub
'**********************Mushroom Trigger Animation
'****Init
Sub Mush1_hit()
DOF 131, DOFPulse
TStep = 0: Mush2.Visible = 1:Mush1.Visible = 0:PlaySound "Rubber"
If FlipperPosition=1 Then
ShowFlippers
Else
ShowFlippers
FlipperPosition=1
Playsound"ZipperClose"
End if
ShowFlippers
' PlaySound SoundFXDOF("ZipperClose",101,DOFPulse,DOFFlippers)
DOF 102,DOFPulse
AddScore(100)
MushTimer.Enabled = 1
End Sub
Sub MushTimer_Timer()
Select Case TStep
Case 0 : Mush3.visible = 1:Mush2.visible = 0
Case 1 : Mush2.visible = 1:Mush3.visible = 0
Case 2 : Mush1.visible = 1:Mush2.visible = 0:MushTimer.Enabled = 0
End Select
TStep = TStep +1
End Sub
'***********************************
' Bumpers
'***********************************
Sub Bumper1_Hit
If TableTilted=false then
PlaySound SoundFXDOF("bumper1",107,DOFPulse,DOFContactors)
DOF 111, DOFPulse
bump1 = 1
If Bumper1Light.state=1 then
AddScore(100)
else
AddScore(10)
end if
end if
End Sub
Sub Bumper2_Hit
If TableTilted=false then
PlaySound SoundFXDOF("bumper1",110,DOFPulse,DOFContactors)
DOF 114, DOFPulse
bump2 = 1
If Bumper2Light.state=1 then
AddScore(100)
else
AddScore(10)
end if
end if
End Sub
Sub Bumper3_Hit
If TableTilted=false then
PlaySound SoundFXDOF("bumper1",109,DOFPulse,DOFContactors)
DOF 113, DOFPulse
bump3 = 1
If Bumper3Light.state=1 then
AddScore(100)
else
AddScore(10)
end if
end if
End Sub
Sub Bumper4_Hit
If TableTilted=false then
PlaySound SoundFXDOF("bumper1",108,DOFPulse,DOFContactors)
DOF 112, DOFPulse
bump4 = 1
If Bumper4Light.state=1 then
AddScore(100)
else
AddScore(10)
end if
end if
End Sub
'************************************
' Rollover lanes
'************************************
Sub TriggerCollection_Hit(idx)
If TableTilted=false then
DOF 117 + idx, DOFPulse
Select Case idx
Case 0:
AddScore(1000)
IncreaseSilverBonus
Case 1:
SetMotor(500)
Case 2:
SetMotor(500)
If dooralreadyopen=1 then
PauseGateCloser.enabled=true
end if
End Select
end if
end Sub
'****************************************************
sub Kicker2_Hit()
Playsound"kicker_enter_center"
KDS.enabled=1
Dim speedx,speedy,finalspeed
speedx=activeball.velx
speedy=activeball.vely
finalspeed=SQR(activeball.velx * activeball.velx + activeball.vely * activeball.vely)
if TableTilted=true then
Kicker2.Timerenabled=1
exit sub
end if
if finalspeed>20 then
Kicker2.Kick 0,0
activeball.velx=speedx
activeball.vely=speedy
else
KickerHolder2.enabled=1
SetMotor(500)
end if
end sub
Sub KDS_Timer()
KDS.enabled=0
Playsound"Motorleer"
End Sub
Sub KickerHolder2_timer
If MotorRunning=0 then