Download the TestKick.zip from the following link:
http://vpinball.com/VPBdownloads/vpx-test-kicker/
Step 1:
Copy the test kicker and flasher from the test table and paste into your table. Both items are part of a collection and clicking one should select both.
Step 2:
Open the collection manager in your table and create a new collection. Rename the new collection to “testkickercol”. Edit the collection and make sure “Group elements together” is checked.
Step 3:
Select both the kicker and the flasher and add them to the “testkickercol” collection. This makes it easier to move the items around the table.
Step 4:
Open the image manager in your table and import the “tkarrow.png” image included in the zip file.
Step 5:
Add the following code to the TableName_keydown sub:
‘******************************************************
‘ Start Test Kicker 1/3
‘******************************************************
If keycode = 37 Then TestKick ‘ K
If keycode = 19 Then return_to_test ‘ R return ball to kicker
If keycode = 46 Then create_testball ‘ C create ball ball in test kicker
If keycode = 205 Then TKickAngle = TKickAngle + 3:fKickDirection.Visible=1:fKickDirection.RotZ=TKickAngle’+90 ‘ right arrow
If keycode = 203 Then TKickAngle = TKickAngle – 3:fKickDirection.Visible=1:fKickDirection.RotZ=TKickAngle’+90 ‘left arrow
If keycode = 200 Then TKickPower = TKickPower + 2:debug.print “TKickPower: “&TKickPower ‘ up arrow
If keycode = 208 Then TKickPower = TKickPower – 2:debug.print “TKickPower: “&TKickPower ‘ down arrow
‘******************************************************
‘ End Test Kicker 1/3
‘******************************************************
Step 6:
Add the following code to the TableName_keyup sub:
‘******************************************************
‘ Start Test Kicker 2/3
‘******************************************************
If keycode = 205 Then fKickDirection.Visible=0 ‘ right arrow
If keycode = 203 Then fKickDirection.Visible=0 ‘left arrow
‘******************************************************
‘ End Test Kicker 2/3
‘******************************************************
Step 7:
Add the following code to the script outside of any other Sub or Function (best to place it right after the TableName_keyup sub):
‘******************************************************
‘ Start Test Kicker 3/3
‘******************************************************
Dim TKickAngle, TKickPower, TKickBall
TKickAngle = 0
TKickPower = 10
Set TKickBall = Nothing
Sub testkick()
test.kick TKickAngle,TKickPower
End Sub
Sub create_testball():Set TKickBall = test.CreateBall:End Sub
Sub test_hit():Set TKickBall=ActiveBall:End Sub
Sub return_to_test()
If Not TKickBall Is Nothing then
TKickBall.velx=0:TKickBall.vely=0:TKickBall.x=test.x:TKickBall.y=test.y-50
End If:
End Sub
‘******************************************************
‘ End Test Kicker 3/3
‘******************************************************
Usage:
If you’re using a raised playfield or want to place the kicker on a ramp, you will need to select the test kicker and assign it to the appropriate surface. You will also need to select the “fKickDirection” flasher and adjust the height accordingly.
Left & Right Arrow: Change the direction of the kick
Up & Down Arrow: Increase / Decrease the power of the kicker (open the debugger window to see current power setting)
C: Create a ball in the test kicker
R: Returns the last created ball to the test kicker
K: Kicks the ball
You need to login in order to like this post: click here