OK, I took Koadic's code (which supposedly came from JP's and modified to work with Primitives)
Try this (sorry, I can't upload Groni's table, it's too big for my graciously donated membership):
1) Download Groni's table
2) Add two timers called "PTime" and "PTime2"; Disable both, change both Intervals to something smaller unless you want to see a slow animation
3) Go to Table -> collection Manager -> New - Edit
A) Name it "CoPlunger"
B) Add P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, and P12 to it, in that order
4) Select all the Script and replace it with the following:
Option Explicit
Randomize
Sub Table1_KeyDown(ByVal keycode)
If keycode = PlungerKey Then
Plunger.PullBack
Pcount = 0
PTime.Enabled = 1
'Plunger.TimerEnabled=0
End If
If keycode = LeftFlipperKey Then
LeftFlipper.RotateToEnd
PlaySound "FlipperUp",0,1,-0.1,0.25
End If
If keycode = RightFlipperKey Then
RightFlipper.RotateToEnd
PlaySound "FlipperUp",0,1,0.1,0.25
End If
If keycode = LeftTiltKey Then
Nudge 90, 2
End If
If keycode = RightTiltKey Then
Nudge 270, 2
End If
If keycode = CenterTiltKey Then
Nudge 0, 2
End If
End Sub
Sub Table1_KeyUp(ByVal keycode)
If keycode = PlungerKey Then
Plunger.Fire
PTime.Enabled = 0
Pcount = 0
PTime2.Enabled = 1
'Plunger.TimerEnabled=1
End If
If keycode = LeftFlipperKey Then
LeftFlipper.RotateToStart
PlaySound "FlipperDown",0,1,-0.1,0.25
End If
If keycode = RightFlipperKey Then
RightFlipper.RotateToStart
PlaySound "FlipperDown",0,1,0.1,0.25
End If
End Sub
Sub Drain_Hit()
Drain.DestroyBall
Plunger.CreateBall
PlaySound "Plunger",0,1,0,0.25
End Sub
Sub LeftSlingshot_Slingshot()
PlaySound "Bumper",0,1,-0.15,0.25
End Sub
Sub RightSlingshot_Slingshot()
PlaySound "Bumper",0,1,0.15,0.25
End Sub
Sub Plunger_Init()
PlaySound "Plunger",0,0.5,0.5,0.25
Plunger.CreateBall
End Sub
Sub Table1_Init
Dim X
For each X in CoPlunger
x.TopVisible = 0
Next
CoPlunger(0).TopVisible = 1
ResetPlungers
End Sub
Dim PlNewPos, PlOldPos, PCount
Sub PTime_Timer
If Pcount <11 Then
CoPlunger(Pcount).TopVisible = 0
Pcount = Pcount + 1
CoPlunger(Pcount).TopVisible = 1
' PRefresh.state = ABS(PRefresh.state - 1) Not needed since A) we're not dealing with lights or ramps and 2) this was supposedly fixed in the 9.9 so a refresh light wasn't needed
End If
End Sub
Sub PTime2_Timer
Dim X
Select Case Pcount
Case 0:ResetPlungers
Case 1
For each X in CoPlunger
x.TopVisible = 0
Next
CoPlunger(2).Topvisible = 1
Case 2
ResetPlungers
Me.Enabled = 0
End Select
Pcount = Pcount + 1
End Sub
'Sub Plunger_Timer()
' CoPlunger(PlOldPos).TopVisible = 0
' PlNewPos = INT(Plunger.Position/2)
' If PlNewPos > 11 Then PlNewPos = 11
' CoPlunger(PlNewPos).TopVisible = 1
' PlOldPos = PlNewPos
' PRefresh.state = ABS(PRefresh.state - 1)
'End Sub
Sub ResetPlungers
Dim X
For x = 0 to 11:CoPlunger(x).TopVisible = 0:Next
CoPlunger(0).TopVisible = 1
Pcount = 0
PlNewPos = 0
PlOldPos = 0
' PRefresh.state = ABS(PRefresh.state - 1)
End Sub
I left in a bunch of Koadic's code just in case someone else wanted to play with it. For example the Plunger_Timer sub just ruins the bounce animation. Maybe something changed in VP9.9, but anytime I try to get the plunger's position, it's always 0. I figured that was because that gets fed from a physical plunger.
Edited by Shoopity, 09 October 2014 - 07:09 PM.