Jump to content



Photo
* * * * * 1 votes

Analog Plunger Help Desk


  • Please log in to reply
116 replies to this topic

#1 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 30 May 2012 - 07:32 AM

Having trouble converting your a table to use an analog plunger? I am willing to offer my assistance. biggrin.gif

Just give me the name of the table as it appears in the download section (to avoid confusion), and I will post the instructions and script changes necessary to get it working.


I am only working about 2 days a week currently, and overnight at that, so I find myself killing a large amount of time in front of my computer regularly checking the forums here. I usually try to help as best I can anyway, and this is one subject I think I've got down well enough that I can help those with issues. I also figure I can keep a running list of tables 'fixed' in this first post here with links to the relative post so anyone looking to mod the same table can easily find the post.

List of tables covered in this thread identified by name in download section:
The Addams Family VP91X 2.0.1 FS LINK
Dolly Parton (JP Salas) FS and Dolly Parton VP9 1.1FS LINK
Twilight Zone Night Mod FS LINK


Some Basic Trouble Shooting tips...

1.) make sure VP is seeing your plunger move from 0 to 25... Attached File  Plunger_test.zip   31.3KB   636 downloads
2.) make sure your plunger axis is being read via direct input as 0 to 1000 (or -1000 to 0, depending on how it is set up), instead of -1000 to 1000, as VP will only start accepting input starting from 0... Attached File  joystick.zip   51.98KB   299 downloads
3.)If plunger axis is being read as -1000 to 1000, see below:

..3a.)XP - DXTweak2 - This will allow you to shift the centerpoint of the axis (and even adjust calibration) on the fly, just make sure you are adjusting the proper one

..3b.)Vista/7 - It can also be done with an older version of DXTweak2, you just need to make sure that you click on an unused axis first (like X/Y Rotation), and hit 'Axis Defaults', as this will enable the 'Apply' button, otherwise there is no way to apply the changes. If you can't get it to work, there is a more involved solution, and requires some registry editing. I have listed the steps necessary in this post for those of you who need to go this route.

So say the raw values for the Z axis are 32 for the minimum, and 78 for the maximum, the center point will be set at 55 by default, but to work optimally, it needs to be changed to 32 (in this example). There is also the possibility of using the Z rotation (rZ) axis for the plunger on the Mot-Ion kit (with my custom build and upcoming official build), but it is reversed, so you would have to set the center point to the maximum value instead of the minimum

Edited by koadic, 04 July 2012 - 12:25 PM.


#2 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 30 May 2012 - 09:46 AM

Here's an example from a recent post...

QUOTE (im14pinball @ May 30 2012, 12:24 AM) <{POST_SNAPBACK}>
Dolly partons table "Dolly", has the graphic for the plunger, but I cant get the plunger to work with the Mot-ion plunger. I pasted in the script but it didnt work. I probably didnt put it in the right spot or something.


The solutions below apply to both Dolly_Parton_VP9_1.01FS and Dolly_Parton_VP9_1.1FS, just add the parts in RED and follow the corresponding instructions.

Solution 1:
CODE
Sub dolly_KeyDown(ByVal Keycode)
...
If keycode = PlungerKey Then PlungerIM.Pullback:Pcount = 0:PTime.Enabled = 1:Plunger.TimerEnabled=0
...

Sub dolly_KeyUp(ByVal Keycode)
...
If keycode = PlungerKey Then PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1:Plunger.TimerEnabled=0
...

'(and placed after End Sub from the Sub PTime2_Timer...)
Dim PlungerPos,oPlungerPos
Sub Plunger_Timer()
PlungerPos=INT(Plunger.Position)
PTop.Y = PTopY+INT(PlungerPos)*3
PBottom.Y = PBottomY+INT(PlungerPos)*3
oPlungerPos=PlungerPos
End Sub
Instructions: Select Plunger in editor, check the "Enable Mechanical Plunger" box, check the "Timer Enabled" box and set the interval to 40.


Solution 2 (utilizing the impulse plunger which includes the sound and bounce that you get with the digital plunger):
CODE
Sub dolly_KeyDown(ByVal Keycode)
...
If keycode = PlungerKey Then PlungerIM.Pullback:Pcount = 0:PTime.Enabled = 1:Plunger.TimerEnabled=0
...

Sub dolly_KeyUp(ByVal Keycode)
...
If keycode = PlungerKey Then PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1:Plunger.TimerEnabled=0
...

Sub PTime2_Timer
Select Case Pcount
Case 0:PTop.Y = PTopY:PBottom.Y = PBottomY
Case 1:PTop.Y = PTop.Y + 10:PBottom.Y = PBottom.Y + 10
Case 2: 'pause
Case 3:PTop.Y = PTopY:PBottom.Y = PBottomY
Case 4:Me.Enabled = 0:Pcount=0
End Select
Pcount = Pcount + 1
End Sub

Dim PlungerPos,oPlungerPos,PlungerPos2,PlungerPos3,PowerSetting,plcount
Sub Plunger_Timer()
PlungerPos=INT(Plunger.Position)
If Plunger.Position < 2 and PlungerPos3 > 5 Then
PowerSetting = PlungerIM.Strength
PlungerIM.Strength = (PlungerPos3/25*PlungerIM.Strength)
PlungerIM.AutoFire
PlungerIM.Strength = PowerSetting
PlungerPos2 = 0
PTime2.Enabled = 1
plcount = 1
End If
PTop.Y = PTopY+INT(PlungerPos)*3
PBottom.Y = PBottomY+INT(PlungerPos)*3
If plcount mod 5 = 0 Then PlungerPos2=Plunger.Position : plcount = 0
oPlungerPos=PlungerPos:PlungerPos3=PlungerPos2:plcount = plcount + 1
End Sub
Instructions: Select Plunger in editor, check the "Timer Enabled" box and set the interval to 40, and change the Park Position to 0. You can leave the "Enable Mechanical Plunger" box unchecked if you wish, as it makes very little difference.

Edit: modified solution 2 to make a little more plunger friendly as was originally developed and tested on a joystick with much quicker response

Edited by koadic, 02 July 2012 - 05:08 PM.


#3 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 5,047 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 30 May 2012 - 10:56 AM

that will disable the plunger animation also wont it

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#4 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 30 May 2012 - 11:31 AM

QUOTE (unclewilly @ May 30 2012, 05:56 AM) <{POST_SNAPBACK}>
that will disable the plunger animation also wont it


If you are referring to the Plunger.TimerEnabled additions, the timer is enabled by default (see instructions), it only disables the analog function when the plunger button is pressed, and re enables it when released, as this allows the animation to work for the button when an analog input is connected.

#5 ressof

ressof

    Enthusiast

  • Members
  • PipPipPip
  • 59 posts

  • Flag: Sweden

  • Favorite Pinball: World Cup Soccer

Posted 30 May 2012 - 01:29 PM

Hello

What a great initiative.

I would love to have analog plunger support on "The Addams Family VP91X 2.0.1 FS"

#6 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 30 May 2012 - 02:04 PM

TAF VP91X FS 2.0.1

Solution 1:
CODE
'(placed after End Sub from the Sub PTime2_Timer...)
Dim PlungerPos,oPlungerPos
Sub Plunger_Timer()
PlungerPos=INT(Plunger.Position)
PTop.Y = PTopY+INT(PlungerPos)*3
PBottom.Y = PBottomY+INT(PlungerPos)*3
oPlungerPos=PlungerPos
End Sub


Sub TAF_KeyDown(keycode)
...
If keycode = PlungerKey Then PlungerIM.Pullback:Pcount = 0:PTime.Enabled = 1:Plunger.TimerEnabled=0
...

Sub TAF_KeyUp(ByVal keycode)
...
If keycode = PlungerKey Then PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1:Plunger.TimerEnabled=1
...
Instructions: In the editor, add a plunger object named Plunger; uncheck the "Visable" box; check the "Enable Mechanical Plunger" box, check the "Timer Enabled" box and set the interval to 40. Make sure to position the plunger so it will hit the ball. Adjust MechStrength and Break Over Velocity to suit (may need to experiment to get it how you want).

Solution 2:
CODE
Sub PTime2_Timer
Select Case Pcount
Case 0:PTop.Y = PTopY:PBottom.Y = PBottomY
Case 1:PTop.Y = PTop.Y + 10:PBottom.Y = PBottom.Y + 10
Case 2: 'pause
Case 3:PTop.Y = PTopY:PBottom.Y = PBottomY
Case 4:Me.Enabled = 0:Pcount=0
End Select
Pcount = Pcount + 1
End Sub

Dim PlungerPos,oPlungerPos,PlungerPos2,PlungerPos3,PowerSetting,plcount
Sub Plunger_Timer()
PlungerPos=INT(Plunger.Position)
If Plunger.Position <2 and PlungerPos3 > 5 Then
PowerSetting = PlungerIM.Strength
PlungerIM.Strength = (PlungerPos3/25*PlungerIM.Strength)
PlungerIM.AutoFire
PlungerIM.Strength = PowerSetting
PlungerPos2 = 0
plcount = 1
PTime2.Enabled=1
End If
PTop.Y = PTopY+INT(PlungerPos)*3
PBottom.Y = PBottomY+INT(PlungerPos)*3
If plcount mod 5 = 0 Then PlungerPos2=Plunger.Position : plcount = 0
oPlungerPos=PlungerPos : PlungerPos3=PlungerPos2 : plcount = plcount + 1
End Sub


Sub TAF_KeyDown(keycode)
...
If keycode = PlungerKey Then PlungerIM.Pullback:Pcount = 0:PTime.Enabled = 1:Plunger.TimerEnabled=0
...

Sub TAF_KeyUp(ByVal keycode)
...
If keycode = PlungerKey Then PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1:Plunger.TimerEnabled=1
...
Instructions: In the editor, add a plunger object named Plunger; uncheck the "Visable" box; check the "Timer Enabled" box and set the interval to 40, and change the Park Position to 0; no need to check the "Enable Mechanical Plunger" box and it can be placed anywhere (preferably somewhere off the main playfield smile.gif ), even off screen, as it won't be used to actually hit the ball.

Edit: modified solution 2 to make a little more plunger friendly as was originally developed and tested on a joystick with much quicker response

Edited by koadic, 02 July 2012 - 05:09 PM.


#7 im14pinball

im14pinball

    Enthusiast

  • Members
  • PipPipPip
  • 66 posts
  • Location:Kentucky

  • Flag: United States of America

  • Favorite Pinball: Twilight Zone, Theatre of Magic

Posted 31 May 2012 - 01:30 AM

This is wonderful. Hopefully I can try this a little later tonight. This should help me figure out other tables as well. I'll let you know how it goes.

Thanks again!!



#8 CPSNine

CPSNine

    Enthusiast

  • Platinum Supporter
  • 136 posts

  • Flag: ---------

  • Favorite Pinball: Tales of the Arabian Nights

Posted 01 June 2012 - 01:35 AM

Thank you for this thead Koadic you always offer a great deal of help on many subjects and it is greatly appreciated.

Would love to get Twilight Zone Night Mod FS to work with analog plunger.

Thank you for your time.
My Cab: Pin-up
Universal Pinball Machine

#9 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 01 June 2012 - 01:54 AM

BALLY - TWILIGHT ZONE - MEGAPIN - VP9 - V1.2FSNM.Final.vpt (Twilight Zone Night Mod FS by Groni, Kingb33, UncleWilly)

Solution 1:
CODE
Sub TZ_KeyDown(ByVal Keycode)
...
If keycode = PlungerKey Then : PlungerIM.Pullback : PTime.enabled = true : Plunger.TimerEnabled = 0 : End If
...

Sub TZ_KeyUp(ByVal Keycode)
...
If keycode = PlungerKey Then : PlungerIM.Fire : PTime.enabled = false : PlungeReel.Setvalue 0 : Pcount = 0 : Plunger.TimerEnabled = 1 : End If
...

'(after End Sub from the Sub PTime_Timer...)

Dim PlungerPos
Sub Plunger_Timer()
PlungerPos=INT(Plunger.position/2)
PlungeReel.SetValue(PlungerPos)
End Sub
Instructions: In the editor, add a plunger object named Plunger; uncheck the "Visable" box; check the "Enable Mechanical Plunger" box, check the "Timer Enabled" box and set the interval to 40. Make sure to position the plunger so it will hit the ball. Adjust MechStrength and Break Over Velocity to suit (may need to experiment to get it how you want). In addition, you will also need to go into the back drop options and change the 'Physics Max Looptime' to 0 and 'Mech-Plunger Adjust' to 100 (thanks to Destruk for figuring out the issue with this table, and thanks Kruge99 for pointing it out in the TZ thread)

Solution 2:
CODE
Sub TZ_KeyDown(ByVal Keycode)
...
If keycode = PlungerKey Then : PlungerIM.Pullback : PTime.enabled = true : Plunger.TimerEnabled = 0 : End If
...

Sub TZ_KeyUp(ByVal Keycode)
...
If keycode = PlungerKey Then : PlungerIM.Fire : PTime.enabled = false : PlungeReel.Setvalue 0 : Pcount = 0 : Plunger.TimerEnabled = 1 : End If
...

'(after End Sub from the Sub PTime_Timer...)

Dim PlungerPos,PlungerPos2,PlungerPos3,PowerSetting,plcount
Sub Plunger_Timer()
PlungerPos=INT(Plunger.position/2)
If Plunger.Position < 2 and PlungerPos3 > 5 Then
PowerSetting = PlungerIM.Strength
PlungerIM.Strength = (PlungerPos3/25*PlungerIM.Strength)
PlungerIM.AutoFire
PlungerIM.Strength = PowerSetting
PlungerPos2 = 0
plcount = 1
End If
PlungeReel.SetValue(PlungerPos)
If plcount mod 5 = 0 Then PlungerPos2=Plunger.Position: plcount = 0
PlungerPos3=PlungerPos2:plcount = plcount + 1
End Sub
Instructions: In the editor, add a plunger object named Plunger; uncheck the "Visable" box; check the "Timer Enabled" box and set the interval to 40, and change the Park Position to 0; no need to check the "Enable Mechanical Plunger" box and it can be placed anywhere (preferably somewhere off the main playfield ), even off screen, as it won't be used to actually hit the ball. And while not necessary with this method, you should probably still go into the back drop options and change the 'Physics Max Looptime' to 0 and 'Mech-Plunger Adjust' to 100.

Edit: modified solution 2 to make a little more plunger friendly as was originally developed and tested on a joystick with much quicker response

Edited by koadic, 02 July 2012 - 05:09 PM.


#10 CPSNine

CPSNine

    Enthusiast

  • Platinum Supporter
  • 136 posts

  • Flag: ---------

  • Favorite Pinball: Tales of the Arabian Nights

Posted 01 June 2012 - 02:35 AM

Wow that was fast!

I was just wondering, you always give two options. Is there any advantage to use one rather than the other.
Even though both work why would one chose one over the other.

Thanks.
My Cab: Pin-up
Universal Pinball Machine

#11 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 01 June 2012 - 02:44 AM

QUOTE (CPSNine @ May 31 2012, 09:35 PM) <{POST_SNAPBACK}>
Wow that was fast!

I was just wondering, you always give two options. Is there any advantage to use one rather than the other.
Even though both work why would one chose one over the other.

Thanks.


The first option uses the actual Plunger object to hit the ball, and this is rarely equivalent to what the digital plunger does from the same perceived pullback. This has to be positioned just right to allow it to hit the ball properly. Personally, I am tired of tweaking settings up and down to get it halfway close and then have it cause another issue, I find it is almost always too touchy or not sensitive enough,(sometimes both smile.gif) but it is the easiest method script wise.

The second option utilizes the existing Impulse plunger already coded into the table. This is what the digital plunger uses to launch the ball. With this option, the Plunger object is only used as a timer and for position tracking of the z axis. It then uses the auto fire function of the impulse plunger with the strength set at whatever percentage of pullback is applied when the ball is released. Another benefit to this is that you can place the Plunger anywhere (no need to get it positioned exactly right) and it works whether the 'Enable Mechanical Plunger' box is checked or not. In fact, it was Twilight Zone that forced me to come up with this method, as I didn't know about the 'Physics Max Looptime' bug, and the ball kept disappearing when hit with a Plunger, so I had to devise an alternate solution.

Edited by koadic, 01 June 2012 - 02:48 AM.


#12 CPSNine

CPSNine

    Enthusiast

  • Platinum Supporter
  • 136 posts

  • Flag: ---------

  • Favorite Pinball: Tales of the Arabian Nights

Posted 01 June 2012 - 07:41 PM

QUOTE (koadic @ May 31 2012, 10:44 PM) <{POST_SNAPBACK}>
QUOTE (CPSNine @ May 31 2012, 09:35 PM) <{POST_SNAPBACK}>
Wow that was fast!

I was just wondering, you always give two options. Is there any advantage to use one rather than the other.
Even though both work why would one chose one over the other.

Thanks.


The first option uses the actual Plunger object to hit the ball, and this is rarely equivalent to what the digital plunger does from the same perceived pullback. This has to be positioned just right to allow it to hit the ball properly. Personally, I am tired of tweaking settings up and down to get it halfway close and then have it cause another issue, I find it is almost always too touchy or not sensitive enough,(sometimes both smile.gif) but it is the easiest method script wise.

The second option utilizes the existing Impulse plunger already coded into the table. This is what the digital plunger uses to launch the ball. With this option, the Plunger object is only used as a timer and for position tracking of the z axis. It then uses the auto fire function of the impulse plunger with the strength set at whatever percentage of pullback is applied when the ball is released. Another benefit to this is that you can place the Plunger anywhere (no need to get it positioned exactly right) and it works whether the 'Enable Mechanical Plunger' box is checked or not. In fact, it was Twilight Zone that forced me to come up with this method, as I didn't know about the 'Physics Max Looptime' bug, and the ball kept disappearing when hit with a Plunger, so I had to devise an alternate solution.


Awesome, thanks for all the details.
I have been adding analog plunger to some table but only by placing a plunger object to the table over the existing animation (no scripting) and I agree with you it is a bit of a pain to calibrate. Especially when there is a skil shot involved.
I will give your second alternative a try.
Thanks again for your help.

My Cab: Pin-up
Universal Pinball Machine

#13 JamieJC666

JamieJC666

    Enthusiast

  • Members
  • PipPipPip
  • 107 posts
  • Location:London

  • Flag: United Kingdom

  • Favorite Pinball: Attack From Mars/T2 Chrome

  • PS3 Gamer Tag: JamieJC666
  • 360 Gamer Tag: JamieJC666

Posted 01 June 2012 - 11:13 PM

So am I right in thinking that if you have a pinball wizard controller with a plunger this is the way to get the plunger working with tables in VP? Just edit the script and enable the plunger in the options, thats it?

Thanks
My HyperPin Cab and GT-R


#14 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 01 June 2012 - 11:53 PM

QUOTE (JamieJC666 @ Jun 1 2012, 06:13 PM) <{POST_SNAPBACK}>
So am I right in thinking that if you have a pinball wizard controller with a plunger this is the way to get the plunger working with tables in VP? Just edit the script and enable the plunger in the options, thats it?

Thanks


More or less, yes smile.gif but sometimes it isn't as easy as it seems, which is why I started this thread. If the general instructions provided HERE still leave you with issues, then this is where you would ask for help with a specific table. I will then go and download the table (if I don't have it already) and make the necessary changes to get everything working, and then post back with the changes I made.

#15 JamieJC666

JamieJC666

    Enthusiast

  • Members
  • PipPipPip
  • 107 posts
  • Location:London

  • Flag: United Kingdom

  • Favorite Pinball: Attack From Mars/T2 Chrome

  • PS3 Gamer Tag: JamieJC666
  • 360 Gamer Tag: JamieJC666

Posted 01 June 2012 - 11:57 PM

QUOTE (koadic @ Jun 2 2012, 12:53 AM) <{POST_SNAPBACK}>
QUOTE (JamieJC666 @ Jun 1 2012, 06:13 PM) <{POST_SNAPBACK}>
So am I right in thinking that if you have a pinball wizard controller with a plunger this is the way to get the plunger working with tables in VP? Just edit the script and enable the plunger in the options, thats it?

Thanks


More or less, yes smile.gif but sometimes it isn't as easy as it seems, which is why I started this thread. If the general instructions provided HERE still leave you with issues, then this is where you would ask for help with a specific table. I will then go and download the table (if I don't have it already) and make the necessary changes to get everything working, and then post back with the changes I made.


Thank you mate yout a legend and a great help!! Very gratefull
My HyperPin Cab and GT-R


#16 JamieJC666

JamieJC666

    Enthusiast

  • Members
  • PipPipPip
  • 107 posts
  • Location:London

  • Flag: United Kingdom

  • Favorite Pinball: Attack From Mars/T2 Chrome

  • PS3 Gamer Tag: JamieJC666
  • 360 Gamer Tag: JamieJC666

Posted 02 June 2012 - 08:20 AM

QUOTE (koadic @ May 30 2012, 03:04 PM) <{POST_SNAPBACK}>
TAF VP91X FS 2.0.1

Solution 1:
CODE
'(placed after Sub PTime2_Timer...)
Dim PlungerPos,oPlungerPos
Sub Plunger_Timer()
PlungerPos=INT(Plunger.Position)
PTop.Y = PTopY+INT(PlungerPos)*3
PBottom.Y = PBottomY+INT(PlungerPos)*3
oPlungerPos=PlungerPos
End Sub


Sub TAF_KeyDown(keycode)
...
If keycode = PlungerKey Then PlungerIM.Pullback:Pcount = 0:PTime.Enabled = 1:Plunger.TimerEnabled=0
...

Sub TAF_KeyUp(ByVal keycode)
...
If keycode = PlungerKey Then PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1:Plunger.TimerEnabled=1
...
Instructions: In the editor, add a plunger object named Plunger; uncheck the "Visable" box; check the "Enable Mechanical Plunger" box, check the "Timer Enabled" box and set the interval to 40. Make sure to position the plunger so it will hit the ball. Adjust MechStrength and Break Over Velocity to suit (may need to experiment to get it how you want).

Solution 2:
CODE
Sub PTime2_Timer
Select Case Pcount
Case 0:PTop.Y = PTopY:PBottom.Y = PBottomY
Case 1:PTop.Y = PTop.Y + 10:PBottom.Y = PBottom.Y + 10
Case 2: 'pause
Case 3:PTop.Y = PTopY:PBottom.Y = PBottomY
Case 4:Me.Enabled = 0:Pcount=0
End Select
Pcount = Pcount + 1
End Sub

Dim PlungerPos,oPlungerPos,PlungerPos2,PlungerPos3,PowerSetting
Sub Plunger_Timer()
PlungerPos=INT(Plunger.Position)
If Plunger.Position = 0 and PlungerPos3 > 3 Then
PowerSetting = PlungerIM.Strength
PlungerIM.Strength = (PlungerPos3/25*PlungerIM.Strength)
PlungerIM.AutoFire
PlungerIM.Strength = PowerSetting
PlungerPos2 = 0
PTime2.Enabled=1
End If
PTop.Y = PTopY+INT(PlungerPos)*3
PBottom.Y = PBottomY+INT(PlungerPos)*3
oPlungerPos=PlungerPos:PlungerPos3=PlungerPos2:PlungerPos2=Plunger.Position
End Sub


Sub TAF_KeyDown(keycode)
...
If keycode = PlungerKey Then PlungerIM.Pullback:Pcount = 0:PTime.Enabled = 1:Plunger.TimerEnabled=0
...

Sub TAF_KeyUp(ByVal keycode)
...
If keycode = PlungerKey Then PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1:Plunger.TimerEnabled=1
...
Instructions: In the editor, add a plunger object named Plunger; uncheck the "Visable" box; check the "Timer Enabled" box and set the interval to 40; no need to check the "Enable Mechanical Plunger" box and it can be placed anywhere (preferably somewhere off the main playfield smile.gif ), even off screen, as it won't be used to actually hit the ball.


Please help what am I doing wrong?

Have copied and paste the new code and im getting a "line 298 syntax error." with the following code in red

Sub Plunger_Timer()

Please let me know what im doing wrong?

Thanks
My HyperPin Cab and GT-R


#17 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 02 June 2012 - 08:29 AM

Did you follow the 'Instructions' below the code? and have you made sure the Plunger you added is named Plunger, and not something like Plunger1?

#18 JamieJC666

JamieJC666

    Enthusiast

  • Members
  • PipPipPip
  • 107 posts
  • Location:London

  • Flag: United Kingdom

  • Favorite Pinball: Attack From Mars/T2 Chrome

  • PS3 Gamer Tag: JamieJC666
  • 360 Gamer Tag: JamieJC666

Posted 02 June 2012 - 08:38 AM

QUOTE (koadic @ Jun 2 2012, 09:29 AM) <{POST_SNAPBACK}>
Did you follow the 'Instructions' below the code? and have you made sure the Plunger you added is named Plunger, and not something like Plunger1?


Yes mate put the code in, clicked on plunger on the left, placed plunger in, remaned it Plunger, ticked and unchecked everything as per instructions and still the same error?
My HyperPin Cab and GT-R


#19 koadic

koadic

    Pinball Fan

  • VIP
  • 1,363 posts
  • Location:Omaha, NE, USA

  • Flag: United States of America

  • Favorite Pinball: Addams Family/Fish Tales/Medieval Madness



Contributor

Posted 02 June 2012 - 08:46 AM

sent you a pm...


#20 wook

wook

    Neophyte

  • Members
  • Pip
  • 1 posts

  • Flag: Netherlands

  • Favorite Pinball: Creature from the black lagoon

Posted 04 June 2012 - 10:08 AM

I have an analog plunger, home made, in my cabinet. The 'trigger' is a microswitch which is switched when I pull back. When it's hit again it shoots te ball.

You can check it out here:

What I would really like, is that when I keep my trigger halfway, the virtual trigger would also stay halfway. I saw a youtube movie somewhere where they used a mousewheel to get what I want. I also have a mousewheel connected, but can't seem to configure visual pinball to use this feature.



Any chance you can help my out here?

Thx.


Back to Visual Pinball