Jump to content

[New VP10 Alert] ALIEN


Recommended Posts

' Declare a variable to keep track of the number
' of balls in play (those that are rolling around)
Dim BallsInPlay

' Declare a variable to keep track of how many
' balls are locked 
Dim BallsLocked

' Create a subroutine that sets up various things
' when the table is first opened (INITialized)
Sub Table1_Init()
	BallsInPlay = 0 ' No balls rolling around yet
	BallsLocked = 0 ' and no balls locked yet
	' Lets display the values just to keep track of what's going on
	TextBox1.Text = "BallsInPlay: " & BallsInPlay
	TextBox2.Text = "BallsLocked: " & BallsLocked
End Sub

' Default script that needs to be modified for our use
Sub Drain_Hit()
	Drain.DestroyBall
	PlaySound "ComputerButton"
	BallsInPlay = BallsInPlay - 1 ' 1 Less ball rolling around now

	TextBox1.Text = "BallsInPlay: " & BallsInPlay
	TextBox2.Text = "BallsLocked: " & BallsLocked

	' You normally don't want to create a ball when there are others
	' still active on the table.  Check to see what that value is:
	If BallsInPlay = 0 then ' No balls are rolling around so,
		Plunger.CreateBall
		PlaySound "Plunger"
	End If
End Sub

Sub CheckBallsInPlay()
' KEY NOTE: we could have typed all this code for each kicker hit,
' but it's easier to type it all out once in it's own subroutine
' and just type the name of the subroutine for each Kicker hit.
	If BallsLocked = 5 then ' All locked up, kick 'em out
		Kicker1.Kick 150, 10	' Kick the ball (direction, force)
		Kicker2.Kick 150, 10
		Kicker3.Kick 150, 10
		Kicker4.Kick 210, 10
		Kicker5.Kick 210, 10
		BallsLocked = 0		' No more locked balls now
		BallsInPlay = 5 	' We got 5 balls rolling around now
	ElseIf BallsInPlay < 1 then ' No balls rolling around . . .
		Plunger.CreateBall		' Create one to put into play
		PlaySound "Plunger"
	End If
	' Lets see what those values are
	TextBox1.Text = "BallsInPlay: " & BallsInPlay
	TextBox2.Text = "BallsLocked: " & BallsLocked
End Sub

Sub Kicker1_Hit() ' This ball is locked up
	Playsound "BumpBell"
	BallsInPlay = BallsInPlay - 1
	BallsLocked = BallsLocked + 1
	CheckBallsInPlay()
End Sub

Sub Kicker2_Hit() ' This ball is locked up
	Playsound "BumpBell"
	BallsInPlay = BallsInPlay - 1
	BallsLocked = BallsLocked + 1
	CheckBallsInPlay()
End Sub

Sub Kicker3_Hit() ' This ball is locked up
	Playsound "BumpBell"
	BallsInPlay = BallsInPlay - 1
	BallsLocked = BallsLocked + 1
	CheckBallsInPlay()
End Sub

Sub Kicker4_Hit() ' This ball is locked up
	Playsound "BumpBell"
	BallsInPlay = BallsInPlay - 1
	BallsLocked = BallsLocked + 1
	CheckBallsInPlay()
End Sub

Sub Kicker5_Hit() ' This ball is locked up
	Playsound "BumpBell"
	BallsInPlay = BallsInPlay - 1
	BallsLocked = BallsLocked + 1
	CheckBallsInPlay()
End Sub

Sub Gate_Hit() ' A ball has passed onto the table
	PlaySound "Fart-13"
	BallsInPlay = BallsInPlay + 1
	TextBox1.Text = "BallsInPlay: " & BallsInPlay
End Sub

' Standard default table scripting poop from here on down
Sub Table1_KeyDown(ByVal keycode) ' default script

	If keycode = PlungerKey Then
		Plunger.PullBack
	End If

	If keycode = LeftFlipperKey Then
		LeftFlipper.RotateToEnd
		PlaySound "FlipperUp"
	End If
    
	If keycode = RightFlipperKey Then
		RightFlipper.RotateToEnd
		PlaySound "FlipperUp"
	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) ' default script

	If keycode = PlungerKey Then
		Plunger.Fire
	End If
    
	If keycode = LeftFlipperKey Then
		LeftFlipper.RotateToStart
		PlaySound "FlipperDown"
	End If
    
	If keycode = RightFlipperKey Then
		RightFlipper.RotateToStart
		PlaySound "FlipperDown"
	End If

End Sub

Sub Plunger_Init() ' default script
	PlaySound "Plunger"
	Plunger.CreateBall
End Sub
      

pour ceux qui désirent un mode multiball (ball locked and not add-a-ball).

for those who want a multiball mode

Link to comment
Share on other sites

This update puts the table close to everything you need to make your own Alien.  Running dual video's on the playfield is awesome.  In testing my ball gets stuck up at the top behind the head but otherwise it offers a lot to shoot at & runs fast.  The left out lane is great. It's hard to find a good set of rules.

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...