If you want to control a launch button (such as those on MM, STTNG, etc...) with a plunger as found on the Mot-Ion kit or VirtuaPin kit, and you are willing to do some very minor table editing, it is really easy to do.
Add a plunger object to the table somewhere outside the table area (will only used for the timer and position reading), make sure it is named 'Plunger', uncheck 'visible', set the timer interval to 40 and enable the timer (all other settings/options aren't going to be used). Then add the following code to the table, it can be placed just about anywhere, even at the very end of the existing script...
Dim PlPos(3)
Sub Plunger_Timer()
Dim x
PlPos(PDelay) = Plunger.Position
If PlPos(PDelay) < 2 and PlPos(0) > 5 Then PlungerIM.AutoFire
For x = 0 to ubound(PlPos)-1:PlPos(x)=PlPos(x+1):Next
End Sub
All you need to do is make sure that PlungerIM matches the existing impulse plunger already included in the table (usually defined in the Table_Init section). If the plunger is pulled past the 5 position, and then released quickly, it will launch the ball just like if you had hit the button... If for some reason you decide you don't want to launch the ball after pulling the plunger back, you can release it slowly back to it's resting point and it shouldn't launch.
The above is a very simplified version of the scripting I use to control the plunger in tables using my analog impulse plunger scripting, but since it is only used for launching with no plunger animation, much of the scripting is unneeded requiring only what I have included above.
I discovered that there are a lot of tables with a analog plunger but the plunger isn't working yet....
Then there are tables already with a plunger in it (called "plunger"), there are tables with plungers called something else and tables without plungers at all.
I would like to start with Scared Stiff, Theatre of Magic and World Cup Soccer,
I understand how to add a plunger object, set the options for it and adding the little script. But I don't know what to do with :
"All you need to do is make sure that PlungerIM matches the existing impulse plunger already included in the table"
And If there is already a plunger object called "plunger" do I still have to add an extra one outside the table area ?
And I tried some tables with plunger already working but all have the same problem with my Virtua Plunger kit,
when I pull the plunger under VirtuaPin Controller Properties I see the Z axis moving from the moment I start pulling.
But when I pull it in for example, TOTAN, the plunger ingame starts moving when the real plunger is halfway
so I don't have enough power to make the right skillshot or whatever. Where can I change that it start moving from the moment I pull the plunger ?
Edited by BlackPredator72, 23 January 2014 - 09:53 AM.