-
Notifications
You must be signed in to change notification settings - Fork 31
/
Space Jam (Sega 1996) 1.4 JPJ - Edizzle - TeamPP - JLou.vbs
3075 lines (2677 loc) · 96 KB
/
Space Jam (Sega 1996) 1.4 JPJ - Edizzle - TeamPP - JLou.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
Option Explicit
Randomize
On Error Resume Next
ExecuteGlobal GetTextFile("controller.vbs")
If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
On Error Goto 0
Const BallSize = 52
Const BallMass = 2.2
'Const Lumen = 10
'*********************************************************************************************************
'*** to show dmd in desktop Mod ***
Dim UseVPMDMD, DesktopMode
DesktopMode = Table1.ShowDT
If NOT DesktopMode Then
UseVPMDMD = False 'hides the internal VPMDMD when using the color ROM or when table is in Full Screen and color ROM is not in use
MetalSides.visible = False'put True or False if you want to see or not the wood side in fullscreen mod
LockDown.visible = False
end if
If DesktopMode Then UseVPMDMD = True 'shows the internal VPMDMD when in desktop mode
'*********************************************************************************************************
'***************************************************
'* Options *
'***************************************************
'*******************************************************************
'* Wire Color 1 : Orange or 0 : Metal *
'* BE CAREFUL, it doesn't work if RampWireA is Static Rendering *
'* And it is by default for optimising, so you can uncheck the *
'* box if you have a good computer ;) *
'*******************************************************************
Dim WireColor
WireColor = 0
'*******************************************************************
'***************************************************
'* Ball 1 : BasketBall or 0 : MetalBall *
'***************************************************
Dim BallType
BallType = 0
'***************************************************
'***************************************************
'* Led = 0 : for some led parts or 0 for none *
'***************************************************
dim led, ledramp
led = 1
ledramp = 0 '0 not led ramps, 1 OK for led ramps
'***************************************************
' ***************** Some volumes *******************
Const VolDiv = 6000 'Lower number, louder ballrolling/collition sound
Const VolCol = 10 'Ball collition divider ( voldiv/volcol )
Const RolVol = 5000 'Ball Rolling
Const MroVol = 45 'Wire Ramps Rolling
Const MroVolA = 30 'Metal Ramps Rolling
Const ProVol = 0.2 'Plastic Ramps Rolling
Const MsideVol = 2 'Metal Sides sound
' **************************************************
'***************************************************
'* Lola = 1 : for 3d Lola and her ball - 0 for no *
'***************************************************
Dim Lola, SpotInt
Lola = 1
'***************************************************
'***************************************************
'* Difficulty for skill shot Basket Plunger *
'* 4 to 10 max - 4 easy - 10 more difficult *
'***************************************************
Dim PSSB
PSSB = 4
'***************************************************
'***********************************************************
'* Sides Mod by Mussinger - 1 = yes - 0 = Original Sides *
'***********************************************************
Dim SidesMod
SidesMod = 0
'***********************************************************
'*********************************************************************************
'* FlipperLight = 1 : for more light over flippers - Slingshots - 0 for no more *
'* and or the fl variable to add more light only to flippers *
'*********************************************************************************
Dim FlipperLight, fl
FlipperLight = 1
fl = 0.5 'Try numbers to 1 or 2 maxi, better is 0.1 to 0.9
'*********************************************************************************
LoadVPM "01000000","SEGA.vbs",3.02
Const UseLamps=0,UseGI=0,UseSolenoids=2, UseSync=true
Const SSolenoidOn="solon",SSolenoidOff="soloff",SFlipperOn="FlipperUp",SFlipperOff="FlipperDown",sCoin="coin3"
Dim preload
Preload = 1
'**********************************************************
'* LUT Options - Script Taken from The Flintstones *
'* All lut examples taken from The Flintstones, TOTAN and *
'* 007 - Big Thanks for all the samples *
'**********************************************************
Dim LUTmeUP:'LUTMeUp = 1 '0 = No LUT Initialized in the memory procedure
Dim DisableLUTSelector:DisableLUTSelector = 0 ' Disables the ability to change LUT option with magna saves in game when set to 1
Const MaxLut = 10
'********************************************************
'*************** LUT Memory by JPJ ****************
dim FileObj, File, LUTFile, Txt, TxtTF 'Dim for LUT Memory Outside Init's SUB
Set FileObj = CreateObject("Scripting.FileSystemObject")
If Not FileObj.FileExists(UserDirectory & "SpaceJamLUT.txt") then
LutMeUp = 1:WriteLUT
End if
If FileObj.FileExists(UserDirectory & "SpaceJamLUT.txt") then
Set LUTFile=FileObj.GetFile(UserDirectory & "SpaceJamLUT.txt")
Set Txt=LUTFile.OpenAsTextStream(1,0) 'Number taken from the file
TxtTF = cint(txt.readline)
LUTMeUp = TxtTF:SetLUT
if LutMeUp >MaxLut or LutMeUp <0 or LutMeUp = Null Then
LutMeUp = 1
End if
End if
'****************************************************
'***************************************
' Table Ini
'***************************************
Dim mbackboard, bsTrough, bsLaunch, DtBank, bsWabbitHole, bsVUK, bsSVUK, mBBMagnet,mSnagger, x, xx, bump1, bump2, bump3, PlungerIM, VUKT, VUKM, mhole1, mhole2, mhole3, cbleft
RealTime.enabled = 1
NoUpperLeftFlipper
NoUpperRightFlipper
LUTBox.Visible = 0
Sub Table1_Init()
If lola = 0 Then
LolaA.visible = 0
LolaB.visible = 0
Lolac.visible = 0
LolaProjector.visible = 0
LolaSpot.intensity = 0
End if
'Create Controller Object, and read in options
DiverterA_Off.IsDropped=1
On Error Resume Next
Controller.GameName = "spacejam"
If Err Then MsgBox Err.Description, 0, "Game " & gameName & " Not found." : Exit Sub
On Error Goto 0
Controller.SplashInfoLine = "Space Jam - Sega, 1996" & vbNewLine & "Edizzle, JPJ, TeamPP"
Controller.HandleKeyboard = False
Controller.ShowTitle = False
Controller.ShowFrame = False
Controller.ShowDMDOnly = True
Controller.HandleMechanics = 0
Controller.DIP(0) = &H00 ' Set dipswitch to USA
Controller.hidden=DesktopMode
On Error Resume Next
Controller.Run
If Err Then MsgBox Err.Description
On Error Goto 0
PinMAMETimer.Interval = PinMAMEInterval
'********** Nudge **************
vpmNudge.TiltSwitch=56
vpmNudge.Sensitivity=3
vpmNudge.TiltObj=Array(LeftSlingshot,RightSlingshot,Bumper2b,Bumper3b,Bumper1b)
'*******************************
set bsTrough = new cvpmBallStack
bsTrough.InitSw 0,15,14,13,12,11,0,0
bsTrough.Balls = 5
bsTrough.InitKick BallRelease,80,5
bsTrough.InitEntrySnd SoundFX("BallRel",DOFContactors), SoundFX("Solenoid",DOFContactors)
Set bsWabbitHole = new cvpmBallStack
bsWabbitHole.InitSaucer wabbit, 46, 177, 33 '46, 190, 33
bsWabbitHole.KickZ =56 '56
bsWabbitHole.InitExitSnd SoundFX("scoopexit",DOFContactors),SoundFX("Solenoid",DOFContactors)
Set DTBank = New cvpmDropTarget
With DTBank
.InitDrop Array(sw17,sw18,sw19),Array(17,18,19)
.InitSnd SoundFX("target_drop",DOFDropTargets),SoundFX("reset_drop",DOFContactors)
End With
' Backboard Magnet
Set mbackboard = New cvpmMyMagnet
With mbackboard
.InitMagnet BMagnet, 300
.Solenoid = 14
.GrabCenter = 1
.MagnetHeight = 270
End With
' Impulse Plunger
Const IMPowerSetting = 60
Const IMTime = 0.6
Set plungerIM = New cvpmImpulseP
With plungerIM
.InitImpulseP swplunger, IMPowerSetting, IMTime
.Switch 16
.Random 1.5
.InitExitSnd "plunger2", "plunger"
.CreateEvents "plungerIM"
End With
for each xx in DL:
xx.blendDisableLighting = 0
playfieldOff.opacity = 100
Next
for each xx in DL2:
xx.blendDisableLighting = 0.4
LolaB.blenddisablelighting = lightb + ll + 7
Next
PFShadows.opacity = 0
RampB.image = "rampeBOff"
FlasherbaseBumperA.blenddisablelighting = 0.5
FlasherbaseBumperB.blenddisablelighting = 0.5
FlasherbaseBumperC.blenddisablelighting = 0.5
BoisA.blenddisablelighting = 0.2
BoisB.blenddisablelighting = 0.2
Panniersorange.blenddisablelighting = 0.5
sol1.blenddisablelighting = 0.5
Lflogo.image = "SJflipper-LOff"
Rflogo.image = "SJflipper-ROff"
RampB.blenddisablelighting = 0
LightFF17.State = 0
flashFF17.IntensityScale = 0
FlashlightA.Amount = 0
FlashlightA.IntensityScale = 0
FlashlightB.Amount = 0
FlashlightB.IntensityScale = 0
FlashlightCC.Amount = 0
FlashlightCC.IntensityScale = 0
rampeMetal.blenddisablelighting = 0.1
FlashlightB1.Amount = 0
FlashlightB1.IntensityScale = 0
FlashlightB2.Amount = 0
FlashlightB2.IntensityScale = 0
WhiteLumF.Amount = 10
WhiteLumF.IntensityScale = 0
WhiteLumF.opacity = 20
' Flashers ini
Dim FlashLevelF(20), objbase(20), objlit(20), objflasher(20), objlight(20)
Dim tablewidth, tableheight : tablewidth = TableRef.width : tableheight = TableRef.height
'initialise the flasher color, you can only choose from "green", "red", "purple", "blue", "white" and "yellow"
InitFlasher 1, "white" : InitFlasher 2, "white" : InitFlasher 3, "white" : InitFlasher 4, "white" : InitFlasher 5, "white"
InitFlasher 6, "red" : InitFlasher 7, "red"
RotateFlasher 1,-40 : RotateFlasher 2,-40:RotateFlasher 3,90 : RotateFlasher 4,90 : RotateFlasher 5,90
If BallType = 1 then
Table1.BallFrontDecal = "ballBasket"
Table1.BallDecalMode = True
Table1.Ballimage="black"
Table1.DefaultBulbIntensityScale=0
Table1.BallPlayfieldReflectionScale=0
CapKicker1.Createball:CapKicker1.Kick 0,3:CapKicker1.enabled = 0
Else
'Table1.BallFrontDecal = ""
Table1.BallDecalMode = False
Table1.BallImage = "ball"
'Table1.DefaultBulbIntensityScale = 0,1
'Table1.BallPlayfieldReflectionScale= 0,1
CapKicker1.Createball:CapKicker1.Kick 0,3:CapKicker1.enabled = 0
End If
if led = 1 then
RainbowTimer.enabled = 1
Else
RainbowTimer.enabled = 0
End If
if WireColor = 1 Then
RampWireA.material = "Metallic Orange"
Else
RampWireA.material = "Metal JP2"
End if
SpotInt = 20
if SidesMod = 1 Then
Sides.image = "SidesMod"
Else
Sides.image = "Sides"
End if
End Sub
'**************************************************
SolCallback(1) ="bsTrough.SolOut" 'Trough Up-Kicker
SolCallback(2) ="solAutofire" 'Auto Launch
SolCallBack(3) = "ResetDrops" '3-Bank Drop Target Reset
SolCallback(4) ="SolDiv1" 'Jump Ball Top Kicker
SolCallback(5) ="SolDiv2" 'Jump Ball Right Kicker
SolCallback(6) ="SolVUK" 'Jump Ball VUK
SolCallback(7) ="Jumpmag" 'Jump Ball Magnet
'SolCallback(9) =" 'Top Turbo Bumper
'SolCallback(10) =" 'Left Turbo Bumper
'SolCallback(11) =" 'Right Turbo Bumper
'SolCallback(12) =" 'Left Slingshot
'SolCallback(13) =" 'Right Slingshot
SolCallback(14) ="solBasketMagnet" 'Basket Magnet
SolCallback(17) ="Flash17" '17 - Flash Final JAM*1
SolCallback(18) ="SolRdiv" 'Ramp Diverter
SolCallback(19) ="Flash19" '19 - Flash Jump Ball*2
SolCallback(20) ="bsWabbitHole.SolOut" 'Wabbit Hole VUK
SolCallback(21) ="Flash21" '21 - Flash Skill*3
SolCallback(22) ="Flash22" '22 - Flash Basket RAMP*4
SolCallback(23) ="Flash23" '23 - Flash TOP-LT*2 TOP-RT*2
'SolCallback(24) ="SetFlash 124," 'Optional Coin Meter
SolCallback(25) ="FlashF1s" 'F1 - Flash Orbit Arrow*1
SolCallback(26) ="FlashF2s" 'F2 - Flash C-Ball Arrow*1
SolCallback(27) ="FlashF3s" 'F3 - Flash B Ramp Arrow*1
SolCallback(28) ="FlashF4s" 'F4 - Flash J-Ball Arrow*1
SolCallback(29) ="FlashF5s" 'F5 - Flash R Ramp Arrow*1
SolCallback(30) ="FlashF6s" 'F6 - Flash R Orbit Arrow*1
SolCallback(31) ="FlashF7s" 'F7 - Flash 3 Bank Drop*2
SolCallback(32) ="FlashF8s" 'F8 - Flash POPS*3
SolCallback(sLRFlipper) = "SolRFlipper"
SolCallback(sLLFlipper) = "SolLFlipper"
'********************************************************************************
Sub flashf1s(Enabled)
if enabled Then
lightF1.state = 1
flashF1.IntensityScale = 45
else
lightF1.state = 0
flashF1.IntensityScale = 0
end If
End Sub
Sub flashf2s(Enabled)
if enabled Then
lightF2.state = 1
flashF2.IntensityScale = 45
else
lightF2.state = 0
flashF2.IntensityScale = 0
end If
End Sub
Sub flashf3s(Enabled)
if enabled Then
lightF3.state = 1
flashF3.IntensityScale = 45
else
lightF3.state = 0
flashF3.IntensityScale = 0
end If
End Sub
Sub flashf4s(Enabled)
if enabled Then
lightF4.state = 1
flashF4.IntensityScale = 45
else
lightF4.state = 0
flashF4.IntensityScale = 0
end If
End Sub
Sub flashf5s(Enabled)
if enabled Then
lightF5.state = 1
flashF5.IntensityScale = 45
else
lightF5.state = 0
flashF5.IntensityScale = 0
end If
End Sub
Sub flashf6s(Enabled)
if enabled Then
lightF6.state = 1
flashF6.IntensityScale = 45
else
lightF6.state = 0
flashF6.IntensityScale = 0
end If
End Sub
Sub flashf7s(Enabled)
if enabled Then
lightF7.state = 1
flashF7.IntensityScale = 45
else
lightF7.state = 0
flashF7.IntensityScale = 0
end If
End Sub
Sub flashf8s(Enabled)
if enabled Then
lightPop1.state = 1:lightPop2.state = 1:lightPop3.state = 1
flashF8a.IntensityScale = 25:flashF8b.IntensityScale = 35:flashF8c.IntensityScale = 20
else
lightPop1.state = 0:lightPop2.state = 0:lightPop3.state = 0
flashF8a.IntensityScale = 0:flashF8b.IntensityScale = 0:flashF8c.IntensityScale = 0
end If
End Sub
Sub flash17(flstate)
If Flstate Then
LightFF17.State = 1
flashFF17.IntensityScale = 45
Else
LightFF17.State = 0
flashFF17.IntensityScale = 0
End If
End Sub
Sub flash19(flstate)
If Flstate Then
BallonLightA.opacity = 100
BallonLightA.IntensityScale = 40
Flasherlight19A.State = 1
Flasherlight19B.State = 1
Ballon.image = "ballonOn"
Ballon.blenddisablelighting = light + 4
FlashlightB1.Amount = 50
FlashlightB1.IntensityScale = 50
FlashlightB2.Amount = 30
FlashlightB2.IntensityScale = 30
Else
BallonLightA.opacity = 0
BallonLightA.IntensityScale = 0
Ballon.image = "ballon"
Flasherlight19A.State = 0
Flasherlight19B.State = 0
' if lightdir = -0.05 then Ballon.blenddisablelighting = 0
' if lightdir = 0.05 then Ballon.blenddisablelighting = 0.6
Ballon.blenddisablelighting = light
FlashlightB1.Amount = 0
FlashlightB1.IntensityScale = 0
FlashlightB2.Amount = 0
FlashlightB2.IntensityScale = 0
End If
End Sub
Sub flash21(flstate)
If Flstate Then
FlashlevelF(3) = 1 : FlasherFlash3_Timer
FlashlevelF(4) = 1 : FlasherFlash4_Timer
FlashlevelF(5) = 1 : FlasherFlash5_Timer
if lightdir = -0.05 then VitreB.blenddisablelighting = 0.35:RampA.blenddisablelighting = 0.35:end if
if lightdir = 0.05 then VitreB.blenddisablelighting = 1:RampA.blenddisablelighting = 1:end if
fl22a.Amount = 100
fl22a.IntensityScale = 20
fl22b.Amount = 100
fl22b.IntensityScale = 4
FlashlightE.Amount = 200
FlashlightE.IntensityScale = 150
Else
fl22a.Amount = 0
fl22a.IntensityScale = 0
fl22b.Amount = 0
fl22b.IntensityScale = 0
FlashlightE.Amount = 0
FlashlightE.IntensityScale = 0
if lightdir = -0.05 then VitreB.blenddisablelighting = 0:RampA.blenddisablelighting = 0:end if
if lightdir = 0.05 then VitreB.blenddisablelighting = 0.6:RampA.blenddisablelighting = 0.6:end if
End If
End Sub
Sub flash22(flstate)
If Flstate Then
FlashlevelF(6) = 1 : FlasherFlash6_Timer
FlashlevelF(7) = 1 : FlasherFlash7_Timer
if lightdir = -0.05 then VitreA.blenddisablelighting = 0.35:VitreC.blenddisablelighting = 0.35:end if
if lightdir = 0.05 then VitreA.blenddisablelighting = 3:VitreC.blenddisablelighting = 1.5:end if
Else
if lightdir = -0.05 then VitreA.blenddisablelighting = 0:VitreC.blenddisablelighting = 0:end if
if lightdir = 0.05 then VitreA.blenddisablelighting = 0.6:VitreC.blenddisablelighting = 0.6:end if
End If
End Sub
Sub flash23(flstate)
If Flstate Then
FlashlevelF(1) = 1 : FlasherFlash1_Timer
FlashlevelF(2) = 1 : FlasherFlash2_Timer
Flasherlight1plus.State = 1
Flasherlight1plusb.State = 1
fl23a.Amount = 100
fl23a.IntensityScale = 10
fl23b.Amount = 100
fl23b.IntensityScale = 10
fl23c.Amount = 100
fl23c.IntensityScale = 10
FlashlightA.Amount = 80
FlashlightA.IntensityScale = 80
FlashlightB.Amount = 60
FlashlightB.IntensityScale = 50
FlashlightC.Amount = 100
FlashlightC.IntensityScale = 50
FlashlightCC.Amount = 10
FlashlightCC.IntensityScale = 10
FlashlightD.Amount = 200
FlashlightD.IntensityScale = 70
Else
Flasherlight1plus.state = 0
Flasherlight1plusb.State = 0
fl23a.Amount = 0
fl23a.IntensityScale = 0
fl23b.Amount = 0
fl23b.IntensityScale = 0
fl23c.Amount = 0
fl23c.IntensityScale = 0
FlashlightA.Amount = 0
FlashlightA.IntensityScale = 0
FlashlightB.Amount = 0
FlashlightB.IntensityScale = 0
FlashlightC.Amount = 0
FlashlightC.IntensityScale = 0
FlashlightCC.Amount = 0
FlashlightCC.IntensityScale = 0
FlashlightD.Amount = 0
FlashlightD.IntensityScale = 0
End If
End Sub
'***************************************************
' Flupper's flashers V2
'***************************************************
Dim TestFlashers, TableRef, FlasherLightIntensity, FlasherFlareIntensity
' *****************************************************************
TestFlashers = 0 ' *** set this to 1 to check position of flasher object ***
Set TableRef = Table1 ' *** change this, if your table has another name ***
FlasherLightIntensity = 1 ' *** lower this, if the VPX lights are too bright (i.e. 0.1) ***
FlasherFlareIntensity = 1 ' *** lower this, if the flares are too bright (i.e. 0.1) ***
' *****************************************************************
Dim FlashLevelF(20), objbase(20), objlit(20), objflasher(20), objlight(20)
Dim tablewidth, tableheight : tablewidth = TableRef.width : tableheight = TableRef.height
'initialise the flasher color, you can only choose from "green", "red", "purple", "blue", "white" and "yellow"
'InitFlasher 1, "white" : InitFlasher 2, "white" : InitFlasher 3, "white" : InitFlasher 4, "white" : InitFlasher 5, "white"
'InitFlasher 2, "red" : InitFlasher 3, "white"
'InitFlasher 4, "green" : InitFlasher 5, "red" : InitFlasher 6, "white"
'InitFlasher 7, "green" : InitFlasher 8, "red"
'InitFlasher 9, "green" : InitFlasher 10, "red" : InitFlasher 11, "white"
' rotate the flasher with the command below (first argument = flasher nr, second argument = angle in degrees)
'RotateFlasher 4,17 : RotateFlasher 5,0 : RotateFlasher 6,90
'RotateFlasher 7,0 : RotateFlasher 8,0
'RotateFlasher 9,-45 : RotateFlasher 10,90 : RotateFlasher 11,90
Sub InitFlasher(nrr, col)
' store all objects in an array for use in FlashFlasher subroutine
Set objbase(nrr) = Eval("Flasherbase" & nrr) : Set objlit(nrr) = Eval("Flasherlit" & nrr)
Set objflasher(nrr) = Eval("Flasherflash" & nrr) : Set objlight(nrr) = Eval("Flasherlight" & nrr)
' If the flasher is parallel to the playfield, rotate the VPX flasher object for POV and place it at the correct height
If objbase(nrr).RotY = 0 Then
objbase(nrr).ObjRotZ = atn( (tablewidth/2 - objbase(nrr).x) / (objbase(nrr).y - tableheight*1.1)) * 180 / 3.14159
objflasher(nrr).RotZ = objbase(nrr).ObjRotZ : objflasher(nrr).height = objbase(nrr).z + 60
End If
' set all effects to invisible and move the lit primitive at the same position and rotation as the base primitive
objlight(nrr).IntensityScale = 0 : objlit(nrr).visible = 0 : objlit(nrr).material = "Flashermaterial" & nrr
objlit(nrr).RotX = objbase(nrr).RotX : objlit(nrr).RotY = objbase(nrr).RotY : objlit(nrr).RotZ = objbase(nrr).RotZ
objlit(nrr).ObjRotX = objbase(nrr).ObjRotX : objlit(nrr).ObjRotY = objbase(nrr).ObjRotY : objlit(nrr).ObjRotZ = objbase(nrr).ObjRotZ
objlit(nrr).x = objbase(nrr).x : objlit(nrr).y = objbase(nrr).y : objlit(nrr).z = objbase(nrr).z
' set the texture and color of all objects
select case objbase(nrr).image
Case "dome2basewhite" : objbase(nrr).image = "dome2base" & col : objlit(nrr).image = "dome2lit" & col :
Case "ronddomebasewhite" : objbase(nrr).image = "ronddomebase" & col : objlit(nrr).image = "ronddomelit" & col
Case "domeearbasewhite" : objbase(nrr).image = "domeearbase" & col : objlit(nrr).image = "domeearlit" & col
end select
If TestFlashers = 0 Then objflasher(nrr).imageA = "domeflashwhite" : objflasher(nrr).visible = 0 : End If
select case col
Case "blue" : objlight(nrr).color = RGB(4,120,255) : objflasher(nrr).color = RGB(200,255,255) : objlight(nrr).intensity = 5000
Case "green" : objlight(nrr).color = RGB(12,255,4) : objflasher(nrr).color = RGB(12,255,4)
Case "red" : objlight(nrr).color = RGB(255,32,4) : objflasher(nrr).color = RGB(255,32,4)
Case "purple" : objlight(nrr).color = RGB(230,49,255) : objflasher(nrr).color = RGB(255,64,255)
Case "yellow" : objlight(nrr).color = RGB(200,173,25) : objflasher(nrr).color = RGB(255,200,50)
Case "white" : objlight(nrr).color = RGB(255,240,150) : objflasher(nrr).color = RGB(100,86,59)
end select
objlight(nrr).colorfull = objlight(nrr).color
If TableRef.ShowDT and ObjFlasher(nrr).RotX = -45 Then
objflasher(nrr).height = objflasher(nrr).height - 20 * ObjFlasher(nrr).y / tableheight
ObjFlasher(nrr).y = ObjFlasher(nrr).y + 10
End If
End Sub
Sub RotateFlasher(nrr, angle) : angle = ((angle + 360 - objbase(nrr).ObjRotZ) mod 180)/30 : objbase(nrr).showframe(angle) : objlit(nrr).showframe(angle) : End Sub
Sub FlashFlasher(nrr)
If not objflasher(nrr).TimerEnabled Then objflasher(nrr).TimerEnabled = True : objflasher(nrr).visible = 1 : objlit(nrr).visible = 1 : End If
objflasher(nrr).opacity = 1000 * FlasherFlareIntensity * FlashLevelF(nrr)^2.5
objlight(nrr).IntensityScale = 0.5 * FlasherLightIntensity * FlashLevelF(nrr)^3
objbase(nrr).BlendDisableLighting = 10 * FlashLevelF(nrr)^3
objlit(nrr).BlendDisableLighting = 10 * FlashLevelF(nrr)^2
' if FlashLevelF(nrr) >1 then
' FlashLevelF(nrr) = FlashLevelF(nrr) * 0.9 - 0.01
' Else
UpdateMaterial "Flashermaterial" & nrr,0,0,0,0,0,0,1,RGB(255,255,255),0,0,False,True,0,0,0,0
FlashLevelF(nrr) = FlashLevelF(nrr) * 0.9 - 0.01
' End if
If FlashLevelF(nrr) < 0 Then objflasher(nrr).TimerEnabled = False : objflasher(nrr).visible = 0 : objlit(nrr).visible = 0 : End If
End Sub
Sub FlasherFlash1_Timer() : FlashFlasher(1) : End Sub
Sub FlasherFlash2_Timer() : FlashFlasher(2) : End Sub
Sub FlasherFlash3_Timer() : FlashFlasher(3) : End Sub
Sub FlasherFlash4_Timer() : FlashFlasher(4) : End Sub
Sub FlasherFlash5_Timer() : FlashFlasher(5) : End Sub
Sub FlasherFlash6_Timer() : FlashFlasher(6) : End Sub
Sub FlasherFlash7_Timer() : FlashFlasher(7) : End Sub
Sub FlasherFlash8_Timer() : FlashFlasher(8) : End Sub
Sub FlasherFlash9_Timer() : FlashFlasher(9) : End Sub
Sub FlasherFlash10_Timer() : FlashFlasher(10) : End Sub
Sub FlasherFlash11_Timer() : FlashFlasher(11) : End Sub
'***************************************************
'***************************************************
' GI ON OFF
'***************************************************
dim xxx
dim lightdir, Light, lightdirb, Lightb, pflight
pflight = 0
Light=0:Lightb=0
lightdir = 0.05:lightdirb = 0.4
set GICallback = GetRef("UpdateGI")
Sub UpdateGI(no, Enabled)
If Enabled Then
lightdir = 0.05:lightdirb = 0.4:Textlight.Enabled = 1
For each xxx in GI:xxx.State = 1:Next
PlaySound "fx_relay"
DOF 103, DOFOn
If B2SOn Then
Controller.B2SSetData 90, 1
End If
Else
lightdir = -0.05:lightdirb = -0.4:Textlight.Enabled = 1
For each xxx in GI:xxx.State = 0:Next
PlaySound "fx_relay"
DOF 103, DOFOff
If B2SOn Then
Controller.B2SSetData 90, 0
End If
End If
End Sub
Sub Textlight_timer
light=light+(lightdir) '/2 si 0,5
lightb=lightb+(lightdirb)
if lightdir = 0.05 then pflight = pflight - 10:end If
if lightdir = -0.05 then pflight = pflight + 10:end If
if pflight > 105 then pflight = 100
if pflight < 0 then pflight = 0
if lightdir = 0.05 and light > 0.6 then
RampB.image = "rampeB"
Plastics.image = "Plastics"
Plastics.BlendDisableLighting = 0.5
playfieldOff.opacity = 0
PFShadows.opacity = 100
BoisA.blenddisablelighting = 0.5
BoisB.blenddisablelighting = 0.5
Panniersorange.blenddisablelighting = 5
sol1.blenddisablelighting = 5
rampeMetal.blenddisablelighting = 0.6
if FlipperLight = 1 then
WhiteLumF.Amount = 10
WhiteLumF.IntensityScale = 12
WhiteLumF.opacity = 20
End if
light = 0.6
lightb = 5.2
pflight = 0
me.enabled = 0
End If
if lightdir = -0.05 and light < 0 then
RampB.image = "rampeBOff"
playfieldOff.opacity = 100
PFShadows.opacity = 0
Plastics.image = "PlasticsOff"
BoisA.blenddisablelighting = 0.2
BoisB.blenddisablelighting = 0.2
Panniersorange.blenddisablelighting = 0.5
sol1.blenddisablelighting = 0.5
RampB.blenddisablelighting = 0
rampeMetal.blenddisablelighting = 0.1
if FlipperLight = 1 then
WhiteLumF.Amount = 0
WhiteLumF.IntensityScale = 0
end if
light = 0
lightb = 0.4
pflight = 100
me.enabled = 0
' Else
Plastics.image = "plastics"
End If
for each xx in DL:
xx.blendDisableLighting = light
playfieldOff.opacity = pflight
PFShadows.opacity = 100 - pflight
Next
for each xx in DL2:
xx.blendDisableLighting = lightb
LolaB.blenddisablelighting = lightb + ll + 7
Next
if light < 0.05 then
Plastics.BlendDisableLighting = 0.05
Lflogo.BlendDisableLighting = 0.05+fl
Rflogo.BlendDisableLighting = 0.05+fl
end if
if light < 0.1 then
rampeMetal.blenddisablelighting = 0.1
end if
if light < 0.25 then
RampWireA.blenddisablelighting = 0.25
end if
if light > 0.49 then
Plastics.BlendDisableLighting = 0.5
Lflogo.BlendDisableLighting = 0.7+fl
Rflogo.BlendDisableLighting = 0.7+fl
RampWireA.blenddisablelighting = 0.5
end if
End Sub
'***************************************************
'***************************************************
' Real Time Sub
'***************************************************
dim eyerot
eyerot = 0.05
Sub RealTime_timer()
LolaEyeL.objRotZ = LolaEyeL.objRotZ + eyerot
LolaEyeR.objRotZ = LolaEyeR.objRotZ + eyerot
if LolaEyeL.objRotZ > 10 then eyerot = -0.05:end If
if LolaEyeL.objRotZ < -25 then eyerot = 0.05:end If
if mm>0 then mm=mm+1:end If
if mmm>0 then mmm=mmm+1:end If
if mmmm>0 then mmmm=mmmm+1:end If
if mm>50 then mm=0:end If
if mmm>50 then mmm=0:end If
if mmmm>50 then mmmm=0:end If
LFLogo.RotZ = LeftFlipper.CurrentAngle-121
RFlogo.RotZ = RightFlipper.CurrentAngle+121
LeftFlipperSh.RotZ = LeftFlipper.currentangle
RightFlipperSh.RotZ = RightFlipper.currentangle
BallShadowUpdate
gateA.ObjRotY = Gate2.currentangle
gateB.ObjRotX = -(gate3.currentangle)
gateC.ObjRotY = -(gate1.currentangle)
gateD.ObjRotY = -(gate4.currentangle)
End Sub
Sub RealTimeLights
'Compteur JPJ
if Light17.state = 1 then c17.BlendDisableLighting = 3
if Light17.state = 0 then c17.BlendDisableLighting = 0
if Light18.state = 1 then c18.BlendDisableLighting = 3
if Light18.state = 0 then c18.BlendDisableLighting = 0
if Light19.state = 1 then c19.BlendDisableLighting = 3
if Light19.state = 0 then c19.BlendDisableLighting = 0
if Light20.state = 1 then c20.BlendDisableLighting = 3
if Light20.state = 0 then c20.BlendDisableLighting = 0
if Light21.state = 1 then c21.BlendDisableLighting = 3
if Light21.state = 0 then c21.BlendDisableLighting = 0
if Light22.state = 1 then c22.BlendDisableLighting = 3
if Light22.state = 0 then c22.BlendDisableLighting = 0
if Light23.state = 1 then c23.BlendDisableLighting = 3
if Light23.state = 0 then c23.BlendDisableLighting = 0
if Light41.state = 1 then c41.BlendDisableLighting = 3
if Light41.state = 0 then c41.BlendDisableLighting = 0
if Light42.state = 1 then c42.BlendDisableLighting = 3
if Light42.state = 0 then c42.BlendDisableLighting = 0
if Light43.state = 1 then c43.BlendDisableLighting = 3
if Light43.state = 0 then c43.BlendDisableLighting = 0
if Light44.state = 1 then c44.BlendDisableLighting = 3
if Light44.state = 0 then c44.BlendDisableLighting = 0
if Light45.state = 1 then c45.BlendDisableLighting = 3
if Light45.state = 0 then c45.BlendDisableLighting = 0
if Light46.state = 1 then c46.BlendDisableLighting = 3
if Light46.state = 0 then c46.BlendDisableLighting = 0
if Light47.state = 1 then c47.BlendDisableLighting = 3
if Light47.state = 0 then c47.BlendDisableLighting = 0
'Bumpers JPJ
if Light58.state = 1 then
FlasherbaseBumperB.BlendDisableLighting = 14
else
FlasherbaseBumperB.BlendDisableLighting = 0.5
end if
if Light58.state = 1 then
FlasherbaseBumperA.BlendDisableLighting = 12
else
FlasherbaseBumperA.BlendDisableLighting = 0.5
end if
if Light59.state = 1 then
FlasherbaseBumperC.BlendDisableLighting = 13
else
FlasherbaseBumperC.BlendDisableLighting = 0.5
end if
'FIRE balls JPJ
if Light36.state = 1 then
F.BlendDisableLighting = 10
else
F.BlendDisableLighting = 0.3
end if
if Light35.state = 1 then
I.BlendDisableLighting = 11
else
I.BlendDisableLighting = 0.2
end if
if Light34.state = 1 then
R.BlendDisableLighting = 12
else
R.BlendDisableLighting = 0.1
end if
if Light33.state = 1 then
E.BlendDisableLighting = 13
else
E.BlendDisableLighting = 0
end if
End Sub
'****************************************************
'* Flippers *
'****************************************************
Sub SolLFlipper(Enabled)
If Enabled Then
PlaySound SoundFXDOF("FlipperUpL",101,DOFOn,DOFFlippers)
LeftFlipper.EOSTorque = 0.7
LeftFlipper.RotateToEnd
PlaySoundAtVol SoundFX("FlipperUpL2",DOFContactors), LeftFlipper, 1
Else
Controller.Switch(63)=0
PlaySound SoundFXDOF("flipperdownL",101,DOFOff,DOFFlippers)
LeftFlipper.EOSTorque = 0.15
LeftFlipper.RotateToStart
End If
End Sub
Sub SolRFlipper(Enabled)
If Enabled Then
PlaySound SoundFXDOF("FlipperUpR",102,DOFOn,DOFFlippers)
RightFlipper.EOSTorque = 0.7
RightFlipper.RotateToEnd
PlaySoundAtVol SoundFX("FlipperUpR2",DOFContactors), RightFlipper, 1
Else
Controller.Switch(64)=0
PlaySound SoundFXDOF("flipperdownR",102,DOFOff,DOFFlippers)
RightFlipper.EOSTorque = 0.15
RightFlipper.RotateToStart
End If
End Sub
'****************************************************
'-----------------------------------
' keyboard routines
'-----------------------------------
Sub Table1_KeyDown(ByVal KeyCode)
If vpmKeyDown(KeyCode) Then Exit Sub
If keycode = PlungerKey Then PlaySoundAtVol "PlungerPull", Wall016, 1:PlungerIM.Pullback:Plunger.Pullback
End Sub
Sub Table1_KeyUp(ByVal KeyCode)
If vpmKeyUp(KeyCode) Then Exit Sub
If keycode = PlungerKey Then StopSound "PlungerPull":PlungerIM.Fire:Plunger.Fire
If keycode = RightMagnaSave Then
if DisableLUTSelector = 0 then
LUTmeUP = LUTMeUp + 1
if LutMeUp > MaxLut then LUTmeUP = 0
SetLUT
ShowLUT
end if
end if
If keycode = LeftMagnaSave Then
if DisableLUTSelector = 0 then
LUTmeUP = LUTMeUp - 1
if LutMeUp < 0 then LUTmeUP = MaxLut
SetLUT
ShowLUT
end if
End if
End Sub
'-----------------------------------
Sub wabbit_Hit:bswabbithole.AddBall Me:PlaysoundAtVol "scoopenter", wabbit,1:End Sub
Sub wabbit_unHit:Sol1.z = 40:me.TimerEnabled = 1:End Sub
Sub Wabbit_Timer():Sol1.z = Sol1.z - 5:
if Sol1.z >0 then
exit sub
Else
Me.TimerEnabled = 0
end if
End Sub
Sub ballrelease_unHit: :PlaysoundAtVol SoundFX("ballrel",DOFContactors), ballrelease,1:End Sub
Sub SolTrough(Enabled)
If Enabled Then
GI_AllTroughCheck
bsTrough.ExitSol_On
vpmTimer.PulseSw 15
End If
End Sub
Sub Drain_Hit:ClearBallID : bsTrough.AddBall Me:PlaySoundAtVol "drain", Drain, 1:End Sub
Sub launch_Hit:bsLaunch.AddBall 0:End Sub
Sub VUK1_Hit:Sol2.z = 40:sol2.TimerEnabled = 1:ClearBallid:End Sub
Sub VUK2_Hit:ClearBallid:End Sub
Sub Jumpmag(enabled)
If enabled then
VUKM=True
Else VUKM=False
End if
End Sub
Sub JumpballT(enabled)
If enabled then
VUKT=True
Else VUKT=False
End if
End Sub
Sub TrigPrehole_hit
jumpballkicker.enabled = 0
me.TimerEnabled = 1
End Sub
Dim preH
preH = 0
Sub TrigPrehole_timer
preH = preH + 1
if preH = 10 then
jumpballkicker.enabled = 1:preH = 0:me.TimerEnabled = 0
else
exit Sub
End if
End Sub
Sub jumpballkicker_Hit
clearballid
Controller.Switch(45) = True
PlaySoundAtVol "Scoopenter", jumpballkicker, 1
End Sub
Sub jumpballkicker_unHit:Sol2.z = 40:sol2.TimerEnabled = 1:End Sub
Sub Sol2Timer_Timer
Sol2.z = Sol2.z - 5:
if Sol2.z >0 then
exit sub
Else
Me.Enabled = 0
end if
End Sub
'******************************************************
' BASKET MAGNET
'******************************************************
dim xxxx, yyyy, zzzz, block
block = 0
Sub solBasketMagnet(enabled)
if enabled then
ringblock.collidable = 1
mbackboard.MagnetOn = True
Else
mbackboard.MagnetOn = False
magnetissue.enabled = 1