help, how do i script schoot again in future pinball

dejanne

Pinball Player
Joined
Dec 28, 2011
Messages
3
Reaction score
1
Points
9
Favorite Pinball Machine
the adam's family
help, how do i script autoshoot for the plunger when ballsaver is lit

please tell me
 
Last edited:
I haven't scripted anything in Future Pinball, so be aware.

You can find the FP Help File (Future Pinball Manual.chm) in the (usually)
C:\Games\Future Pinball\Help folder.
For the AutoPlunger/AutoSave look in the help file > Contents tab > Table Components > Control > AutoPlunger / Kickback.

There it says to use: MyAutoPlunger.SolenoidOn()

Change MyAutoPlunger to the exact name of the AutoPlunger that you mean to use.

To turn off the control, use MyAutoPlunger.SolenoidOff()

Again, Change MyAutoPlunger to the exact name of the AutoPlunger that you mean to use.

You can enable an AutoPlunger as a Kickback from any other event, say using a Trigger in the outlane and in a Sub Trigger1_Hit()

Sub Trigger1_Hit()
MyAutoPlunger.SolenoidOn()
End Sub

Note that if Future Pinball only uses Functions in the scripting, then use

Function Trigger1_Hit()
MyAutoPlunger.SolenoidOn()
End Function

Instead of using a Trigger to enable the Kickback, you can also use a Drop Target bank, a StartGame_Init(), a Bumper_Hit() or any other event to enable this.

There is, according to the help file > ...> AutoPlunger also a Pulse method.

MyAutoPlunger.SolenoidPulse()

.Pulse is just a fancy word for time units. When pulse is used, the Kickback will be enabled for 100 milliseconds, unless you put a different number within the parenthesis, like this:

MyAutoPlunger.SolenoidPulse(2000)

1000 milliseconds = 1 second, so (2000) will turn the Kickback on for 2 seconds. Using (10000) will pulse the Kickback on for 10 seconds.

Hope that helps.
 
Hey, I blew it. I just woke up and misread Ball Saver as KickBack!!
I apologize for My Confusion!

I am not sure about Ball Saver in FP, but in VP it works something like not advancing the ball count when draining the ball.
With a Ball Saver in Visual Pinball you would do something like this:

Dim BallSaver, TCount, Balls, Game

Sub Table1_Init()

StartGame()
End Sub

Sub StartGame()
BallSaver = 1
Timer1.Enabled = True
Balls = 1
TextBox1.Text = Balls ' for displaying the ball count: place a TextBox1
Plunger.CreateBall
PlaySound "Plunger"
End Sub

Sub Timer1_Timer()
TCount = TCount + 1
If TCount = 10000 Then
Timer1.Enabled = False
BallSaver = 0
End Sub

Sub Drain_Hit()

Drain.DestroyBall

If BallSaver = 1 Then
Plunger.CreateBall
PlaySound "Plunger"
Exit Sub

Else

Balls = Balls + 1
If Balls = 3 Then 'for a 3 ball game
Game = False
ScoreText.Text = "Game Over"
End If
TextBox1.Text = Balls
Plunger.CreateBall
End Sub

Again, I do not know anything about scripting in Future Pinball.

I would guess you would use a variable (in VP this is a Dim, in FP I don't know) to keep the BallSaver enabled as I did with the Dim BallSaver in the above example and then if the variable (var in FP?) is still True (= the value you give it for an On State) then destroy the Ball at the Drain Kicker and Create a Ball with a Kicker Without advancing the Ball/Game count:

Kicker1.CreateBall

... at the AutoPlunger

EDIT: Yes, Future Pinball scripting uses Dim to create a variable. Please see the help file > Scripting > Scripting Basics, but don't let it's vagueness get in the way of your project. We've all been there.
 
Last edited:
Okay, let me simplify that.

Create a Dim.
Set the Dim to a value.
When the ball drains to the drain Kicker, check the value of the Dim.
If the value is set to the On State value that you chose, the ball is kicked to the AutoPlunger lane and then use Exit Sub

Else

Advance the Ball and Game count.

Code:
Dim BallSaver, TCount, Balls


Sub FuturePinball_BeginPlay()
BallSaver = 1
...
...
End Sub

Sub Timer1_Timer()
TCount = TCount + 1
If TCount = 10 Then
Timer1.Enabled = False
BallSaver = 0
BallSaverLight.State = BulbOff ' place a playfield indicator light.
...
...
End Sub

Sub DrainKicker_Hit()
If BallSaver = 1 Then
DrainKicker.Kick xx, xx   ' to the Plunger Lane
Exit Sub
Else
Balls = Balls + 1
BallCountWindowBox.Text = Balls
DrainKicker.Kick xx, xx   ' to the Plunger Lane
End If
End Sub

I hope this works!
 
Forum activity
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      Mibs Mibs: StevOz has posted a new reply in the thread "Post interesting videos you found on YouTube".
      Back
      Top