- View New Content
-
Getting Started
-
Tutorials
Tutorial Categories
Tutorials Main Page Installation and Setup Downloadable TutorialsROM Adjustments
Number of Balls Adjustments Volume Adjustments
-
Visual Pinball Tables
VP 8 Desktop Tables
All VPM Recreations VP Recreations VP/VPM MODs VP Originals ROMsVP 9 Desktop Tables
All VPM Recreations VP Recreations VP/VPM MODs VP Originals ROMsVP9 Cabinet Tables
All Full Screen Cabinet Full Screen B2S Cabinet Spanned Cabinet Tables Media Packs ROMsVPX Tables
All VPinMAME Recreations VPX- - /VPinMAME - MOD Tables VPX Recreations VPX Originals Media Packs ROMs VR
-
Frontend Media & Backglass
Media Packs
Complete Media Packs Wheel Logos VideosBackglasses
dB2S Animated Backglasses UVP Animated Backglasses Topper Images
- Future Pinball Tables
-
Design Resources
Main Resources
Table Templates Playfield Images Image Library Sound Library Key CodesVP Guides
VP8 Guide - English VP8 Guide - Deutsch VP9 Guide - English VP9.1.x Guide - English VP Object Guide VPM DocumentationFuture Pinball Resources
Playfield Images 3D Model LibraryFuture Pinball Guides
FP Script Guide Big Draco Script Guide FP Table Design Guide FP DMD Guide
- Other Features
- Bug Tracker
- Image Gallery
- Blogs
-
More
My first table (Hogan's Heroes)
Started By
PainkillerAlice
, Nov 15 2009 11:13 PM
366 replies to this topic
#241
Posted 30 July 2010 - 01:27 AM
Looking at how to programmatically disable and enable the flippers on the lower mini playfield as to only enable when the ball hits the underground scoop to enter the underground playfield and to disable them when the ball hits either drain in the mini playfield.
I could have been smart, but I never learned anything by being smart!
#242
Posted 30 July 2010 - 01:52 AM
QUOTE (Practicedummy @ Jul 29 2010, 09:27 PM) <{POST_SNAPBACK}>
Looking at how to programmatically disable and enable the flippers on the lower mini playfield as to only enable when the ball hits the underground scoop to enter the underground playfield and to disable them when the ball hits either drain in the mini playfield.
Dim MiniPlayfield
MiniPlayfield = True 'set it to true when you want the flippers to flip
If MiniPlayfield = True Then LowerLeftFlipper.RotateToEnd
If MiniPlayfield = True Then LowerLeftFlipper.RotateToStart
MiniPlayfield = False ' set it to false when you don't want them to flip
You will also need to LowerLeftFlipper.RotateToStart when you set MiniPlayfield to False, so the flippers always return to the starting position, rather than stuck in the up position.

You have discovered an Easter egg. Pat yourself on the back.
#243
Posted 30 July 2010 - 02:13 AM
Where do I insert the loop statement in?
Here's the code that handles the ball destruction and creation for the underground playfield and subsequent events if this helps out in helping me put in the code. I renamed miniplayfield to MiniPlayfieldFlippers for ease of reading:
Sub UndergroundEntranceScoop_Hit()
UndergroundEntranceScoop.DestroyBall
InPlayUndergroundKicker.CreateBall
UndergroundEntranceScoopTimer.Enabled=True
MiniPlayfieldFlippers.Enabled= True
End Sub
Sub UndergroundEntranceScoopTimer_Timer()
InPlayUndergroundKicker.Kick 180, 10
UndergroundEntranceScoopTimer.Enabled=False
End Sub
Sub LeftUndergroundDrain_Hit()
LeftUndergroundDrain.DestroyBall
HeroesTarget1.IsDropped=False
HeroesTarget2.IsDropped=False
HeroesTarget3.IsDropped=False
HeroesTarget4.IsDropped=False
HeroesTarget5.IsDropped=False
HeroesTarget6.IsDropped=False
MiniPlayfieldFlippers.Enabled= False
TreestumpHatchClosed.IsDropped=True
TreestumpHatchOpened.IsDropped=False
TreestumpHatchTimer.Enabled=True
End Sub
Sub RightUndergroundDrain_Hit()
RightUndergroundDrain.DestroyBall
HeroesTarget1.IsDropped=False
HeroesTarget2.IsDropped=False
HeroesTarget3.IsDropped=False
HeroesTarget4.IsDropped=False
HeroesTarget5.IsDropped=False
HeroesTarget6.IsDropped=False
MiniPlayfieldFlippers.Enabled= False
TreestumpHatchClosed.IsDropped=True
TreestumpHatchOpened.IsDropped=False
TreestumpHatchTimer.Enabled=True
End Sub
Sub TreestumpHatchTimer_Timer()
TreestumpKicker.CreateBall
TreestumpKicker.Kick 170, 20, 1
TreestumpHatchOpened.IsDropped=True
TreestumpHatchClosed.IsDropped=False
TreestumpHatchTimer.Enabled=False
End Sub
Here's the code that handles the ball destruction and creation for the underground playfield and subsequent events if this helps out in helping me put in the code. I renamed miniplayfield to MiniPlayfieldFlippers for ease of reading:
Sub UndergroundEntranceScoop_Hit()
UndergroundEntranceScoop.DestroyBall
InPlayUndergroundKicker.CreateBall
UndergroundEntranceScoopTimer.Enabled=True
MiniPlayfieldFlippers.Enabled= True
End Sub
Sub UndergroundEntranceScoopTimer_Timer()
InPlayUndergroundKicker.Kick 180, 10
UndergroundEntranceScoopTimer.Enabled=False
End Sub
Sub LeftUndergroundDrain_Hit()
LeftUndergroundDrain.DestroyBall
HeroesTarget1.IsDropped=False
HeroesTarget2.IsDropped=False
HeroesTarget3.IsDropped=False
HeroesTarget4.IsDropped=False
HeroesTarget5.IsDropped=False
HeroesTarget6.IsDropped=False
MiniPlayfieldFlippers.Enabled= False
TreestumpHatchClosed.IsDropped=True
TreestumpHatchOpened.IsDropped=False
TreestumpHatchTimer.Enabled=True
End Sub
Sub RightUndergroundDrain_Hit()
RightUndergroundDrain.DestroyBall
HeroesTarget1.IsDropped=False
HeroesTarget2.IsDropped=False
HeroesTarget3.IsDropped=False
HeroesTarget4.IsDropped=False
HeroesTarget5.IsDropped=False
HeroesTarget6.IsDropped=False
MiniPlayfieldFlippers.Enabled= False
TreestumpHatchClosed.IsDropped=True
TreestumpHatchOpened.IsDropped=False
TreestumpHatchTimer.Enabled=True
End Sub
Sub TreestumpHatchTimer_Timer()
TreestumpKicker.CreateBall
TreestumpKicker.Kick 170, 20, 1
TreestumpHatchOpened.IsDropped=True
TreestumpHatchClosed.IsDropped=False
TreestumpHatchTimer.Enabled=False
End Sub
Edited by Practicedummy, 30 July 2010 - 02:15 AM.
I could have been smart, but I never learned anything by being smart!
#244
Posted 30 July 2010 - 02:14 AM
QUOTE (Practicedummy @ Jul 29 2010, 10:05 PM) <{POST_SNAPBACK}>
Where do I insert the loop statement in?
You don't need a Loop statement. That's all you need above. You are just adding a condition to the lower flipper code. You just set MiniPlayfied to True when you enter the lower playfield, like at a trigger or some other object that has a Hit event. Then when you leave the miniplayfield, set it to False.

You have discovered an Easter egg. Pat yourself on the back.
#247
Posted 30 July 2010 - 02:33 AM
Get error code when the underground scoop is hit: Object Required MiniPlayfieldFlippers
MiniPlayfieldFlippers.Enabled= True is highlighted in red.
Almost forgot, the mini playfield flippers don't flip when the table starts, which is one of the desirable effects I was going for so we are halfway there.
MiniPlayfieldFlippers.Enabled= True is highlighted in red.
Almost forgot, the mini playfield flippers don't flip when the table starts, which is one of the desirable effects I was going for so we are halfway there.
Edited by Practicedummy, 30 July 2010 - 02:45 AM.
I could have been smart, but I never learned anything by being smart!
#248
Posted 30 July 2010 - 02:58 AM
QUOTE (Practicedummy @ Jul 29 2010, 10:33 PM) <{POST_SNAPBACK}>
Get error code when the underground scoop is hit: Object Required MiniPlayfieldFlippers
MiniPlayfieldFlippers.Enabled= True is highlighted in red.
Almost forgot, the mini playfield flippers don't flip when the table starts, which is one of the desirable effects I was going for so we are halfway there.
MiniPlayfieldFlippers.Enabled= True is highlighted in red.
Almost forgot, the mini playfield flippers don't flip when the table starts, which is one of the desirable effects I was going for so we are halfway there.
My way doesn't need the
MiniPlayfieldFlippers.Enabled= True
I don't know if you can use the disable with flippers anyway

You have discovered an Easter egg. Pat yourself on the back.
#249
Posted 30 July 2010 - 05:54 AM
QUOTE (Bob5453 @ Jul 30 2010, 02:52 AM) <{POST_SNAPBACK}>
QUOTE (Practicedummy @ Jul 29 2010, 09:27 PM) <{POST_SNAPBACK}>
Looking at how to programmatically disable and enable the flippers on the lower mini playfield as to only enable when the ball hits the underground scoop to enter the underground playfield and to disable them when the ball hits either drain in the mini playfield.
Dim MiniPlayfield
MiniPlayfield = True 'set it to true when you want the flippers to flip
If MiniPlayfield = True Then LowerLeftFlipper.RotateToEnd
If MiniPlayfield = True Then LowerLeftFlipper.RotateToStart
MiniPlayfield = False ' set it to false when you don't want them to flip
You will also need to LowerLeftFlipper.RotateToStart when you set MiniPlayfield to False, so the flippers always return to the starting position, rather than stuck in the up position.
You are right Bob, but I don't think PD "gets" where you are asking him to put these lines of code - even when I first read the above, I thought you were telling him to throw the flippers up when the ball entered the miniplayfield, and then lower when it exits!
So....PD what Bob wants you to do is this:
CODE
Dim MiniPlayfieldFlippers 'Or whatever you want to call this variable - it will be used to let the table know if the ball is in the miniplayfiled or not
Sub UndergroundEntranceScoop_Hit()
UndergroundEntranceScoop.DestroyBall
InPlayUndergroundKicker.CreateBall
UndergroundEntranceScoopTimer.Enabled=True
MiniPlayfieldFlippers= True 'NOT ".enabled" - that would imply that MiniPlayfieldFlippers is a vp object, like a timer, or target etc, whereas it's only a variable.
End Sub
'Then in the _keydown sub (unless you have renamed your table this will be "Sub Table1_KeyDown(byVal keycode)"
'You need to include the lines
If Keycode=LeftFlipperKey and MiniPlayfieldFlippers=true then MiniPlayfieldLeftFlipper.RotateToEnd 'Assuming your mini playfield flippers are called MiniPlayfieldLeftFlipper (etc)
If Keycode=RightFlipperKey and MiniPlayfieldFlippers=true then MiniPlayfieldRightFlipper.RotateToEnd
'Then in the _keyup sub (unless you have renamed your table this will be "Sub Table1_KeyUp(byVal keycode)"
'You need to include the lines
If Keycode=LeftFlipperKey and MiniPlayfieldFlippers=true then MiniPlayfieldLeftFlipper.RotateToStart 'Assuming your mini playfield flippers are called MiniPlayfieldLeftFlipper (etc)
If Keycode=RightFlipperKey and MiniPlayfieldFlippers=true then MiniPlayfieldRightFlipper.RotateToStart
'Then you need to tell the drains to turn that MiniPlayfieldFlippers variable to false
Sub LeftUndergroundDrain_Hit()
LeftUndergroundDrain.DestroyBall
HeroesTarget1.IsDropped=False
HeroesTarget2.IsDropped=False
HeroesTarget3.IsDropped=False
HeroesTarget4.IsDropped=False
HeroesTarget5.IsDropped=False
HeroesTarget6.IsDropped=False
MiniPlayfieldFlippers= False 'Again all I've done here is removed the ".enabled" which implies it's a playfield object
MiniPlayfieldLeftFlipper.RotateToStart 'Reset the miniplayfield flippers when the ball leaves the miniplayfield
MiniPlayfieldRightFlipper.RotateToStart
TreestumpHatchClosed.IsDropped=True
TreestumpHatchOpened.IsDropped=False
TreestumpHatchTimer.Enabled=True
End Sub
Sub RightUndergroundDrain_Hit()
RightUndergroundDrain.DestroyBall
HeroesTarget1.IsDropped=False
HeroesTarget2.IsDropped=False
HeroesTarget3.IsDropped=False
HeroesTarget4.IsDropped=False
HeroesTarget5.IsDropped=False
HeroesTarget6.IsDropped=False
MiniPlayfieldFlippers= False 'Again all I've done here is removed the ".enabled" which implies it's a playfield object
MiniPlayfieldLeftFlipper.RotateToStart 'Reset the miniplayfield flippers when the ball leaves the miniplayfield
MiniPlayfieldRightFlipper.RotateToStart
TreestumpHatchClosed.IsDropped=True
TreestumpHatchOpened.IsDropped=False
TreestumpHatchTimer.Enabled=True
End Sub
Sub UndergroundEntranceScoop_Hit()
UndergroundEntranceScoop.DestroyBall
InPlayUndergroundKicker.CreateBall
UndergroundEntranceScoopTimer.Enabled=True
MiniPlayfieldFlippers= True 'NOT ".enabled" - that would imply that MiniPlayfieldFlippers is a vp object, like a timer, or target etc, whereas it's only a variable.
End Sub
'Then in the _keydown sub (unless you have renamed your table this will be "Sub Table1_KeyDown(byVal keycode)"
'You need to include the lines
If Keycode=LeftFlipperKey and MiniPlayfieldFlippers=true then MiniPlayfieldLeftFlipper.RotateToEnd 'Assuming your mini playfield flippers are called MiniPlayfieldLeftFlipper (etc)
If Keycode=RightFlipperKey and MiniPlayfieldFlippers=true then MiniPlayfieldRightFlipper.RotateToEnd
'Then in the _keyup sub (unless you have renamed your table this will be "Sub Table1_KeyUp(byVal keycode)"
'You need to include the lines
If Keycode=LeftFlipperKey and MiniPlayfieldFlippers=true then MiniPlayfieldLeftFlipper.RotateToStart 'Assuming your mini playfield flippers are called MiniPlayfieldLeftFlipper (etc)
If Keycode=RightFlipperKey and MiniPlayfieldFlippers=true then MiniPlayfieldRightFlipper.RotateToStart
'Then you need to tell the drains to turn that MiniPlayfieldFlippers variable to false
Sub LeftUndergroundDrain_Hit()
LeftUndergroundDrain.DestroyBall
HeroesTarget1.IsDropped=False
HeroesTarget2.IsDropped=False
HeroesTarget3.IsDropped=False
HeroesTarget4.IsDropped=False
HeroesTarget5.IsDropped=False
HeroesTarget6.IsDropped=False
MiniPlayfieldFlippers= False 'Again all I've done here is removed the ".enabled" which implies it's a playfield object
MiniPlayfieldLeftFlipper.RotateToStart 'Reset the miniplayfield flippers when the ball leaves the miniplayfield
MiniPlayfieldRightFlipper.RotateToStart
TreestumpHatchClosed.IsDropped=True
TreestumpHatchOpened.IsDropped=False
TreestumpHatchTimer.Enabled=True
End Sub
Sub RightUndergroundDrain_Hit()
RightUndergroundDrain.DestroyBall
HeroesTarget1.IsDropped=False
HeroesTarget2.IsDropped=False
HeroesTarget3.IsDropped=False
HeroesTarget4.IsDropped=False
HeroesTarget5.IsDropped=False
HeroesTarget6.IsDropped=False
MiniPlayfieldFlippers= False 'Again all I've done here is removed the ".enabled" which implies it's a playfield object
MiniPlayfieldLeftFlipper.RotateToStart 'Reset the miniplayfield flippers when the ball leaves the miniplayfield
MiniPlayfieldRightFlipper.RotateToStart
TreestumpHatchClosed.IsDropped=True
TreestumpHatchOpened.IsDropped=False
TreestumpHatchTimer.Enabled=True
End Sub
That's it.
You can cut down the coding a bit by making a collection of the 2 drains - seeing as they do exactly the same thing (I have done exactly this on the example table below)
I have attached an example table - using the code above - i.e. your code with those necessary bits added - & I've kept the names the same so you can see what's going on.
Hope this helps.
Regards,
Dan.
Attached Files
A wizard only needs one ball...but can handle six.
#250
Posted 30 July 2010 - 10:21 AM
That did the trick Wizard's Hat! I also did likewise with the Klink's Office mini playfield and got the desired result. Thank you and Bob for the input! 
I am thinking about altering the plunger next and am going to look at faralos' template to see how it is done.
I am thinking about altering the plunger next and am going to look at faralos' template to see how it is done.
Edited by Practicedummy, 30 July 2010 - 10:24 AM.
I could have been smart, but I never learned anything by being smart!
#251
Posted 30 July 2010 - 11:55 AM
Coded the Klnk's Office and Heroes' drop targets to reset when all of them have been dropped. Now working on adjusting the left part of the loop. Too many cheap drains when the ball exits from the left side of the loop and left target ramp.
I could have been smart, but I never learned anything by being smart!
#252
Posted 30 July 2010 - 12:52 PM
Wanting to add a unique type of tilt. Already entered a dim statement: Dim TiltCount As Integer and some code in the tilt keys code blocks that add 1 to the TiltCount every time a tilt key is used.
Just need to know what code to enter that when the TiltCount reaches 10, the tilt keys disabled until the ball drains. Entered if statement: If TiltCount = 10 Then .
Hope I am on the right track.
Just need to know what code to enter that when the TiltCount reaches 10, the tilt keys disabled until the ball drains. Entered if statement: If TiltCount = 10 Then .
Hope I am on the right track.
I could have been smart, but I never learned anything by being smart!
#253
Posted 30 July 2010 - 01:04 PM
QUOTE (Practicedummy @ Jul 30 2010, 01:52 PM) <{POST_SNAPBACK}>
Wanting to add a unique type of tilt. Already entered a dim statement: Dim TiltCount As Integer and some code in the tilt keys code blocks that add 1 to the TiltCount every time a tilt key is used.
Just need to know what code to enter that when the TiltCount reaches 10, the tilt keys disabled until the ball drains. Entered if statement: If TiltCount = 10 Then .
Hope I am on the right track.
Just need to know what code to enter that when the TiltCount reaches 10, the tilt keys disabled until the ball drains. Entered if statement: If TiltCount = 10 Then .
Hope I am on the right track.
It's the flippers you really want to disable when tilt happens - you might not want to actually disable the tilt...most times I tilt on a real machine is if the ball gets stuck somewhere and you're trying to free it.
To stop the flippers you only need to add a little to the "if" statements in the keyup & keydown subs.
e.g.
CODE
Sub Table1_KeyUp(byVal keycode)
If Keycode=LeftFlipperKey and GameOn=true and Tilt=false then LeftFlipper.RotateToEnd
or
If keycode=LeftFlipperKey and GameOn=true and Tilt<10 then LeftFlipper.RotateToEnd
If Keycode=LeftFlipperKey and GameOn=true and Tilt=false then LeftFlipper.RotateToEnd
or
If keycode=LeftFlipperKey and GameOn=true and Tilt<10 then LeftFlipper.RotateToEnd
Whatever you prefer.
Personally I wouldn't just go with the number of tilt key presses - there are several methods that people have used to be much more realistic.
Regards,
Dan.
A wizard only needs one ball...but can handle six.
#254
Posted 30 July 2010 - 03:27 PM
The reason I want to enable a limited number of tilt key presses is due to the gameplay itself. Due to the design of my table, there is a decent chance for a cheap drain. By giving the player a 10 tilt key press limit, it gives them a good chance to extend gameplay by being able to hammer on a tilt key to alter the ball enough to keep it in play. I know this isn't very lifelike here, but it helps with the gameplay overall.
I could have been smart, but I never learned anything by being smart!
#256
Posted 03 August 2010 - 03:32 PM
Looks like I have just about everything finished on the table design. Just have to decide on an image for the underground playfield and lights. After I finish the audio recording, will start on the coding (with possibly some help on the harder stuff).
I could have been smart, but I never learned anything by being smart!
#257
Posted 03 August 2010 - 05:55 PM
well since it's underground, can ya' put in the bunk bed that lifts up to show the shaft leading to their tunnel? or how about just a dark shaft of some sorts with maybe wooden walls or something to that effect? a mine shaft perhaps?
"Don’t let the noise of others’ opinions drown out your own inner voice.
And most important, have the courage to follow your heart and intuition.”
----Steve Jobs
And most important, have the courage to follow your heart and intuition.”
----Steve Jobs
#258
Posted 04 August 2010 - 12:25 AM
Thought I was almost finished with the playfield desing and completely forgot about the plunger lane! 
Made copies of the plunger lane ,decoration that faralos made for me, changed the texture and added them in a line all the way to the end of the plunger lane:

Most likely gonna have to take a screenshot off one of the dvd's for my underground playfield for a suitable decoration.
Made copies of the plunger lane ,decoration that faralos made for me, changed the texture and added them in a line all the way to the end of the plunger lane:

Most likely gonna have to take a screenshot off one of the dvd's for my underground playfield for a suitable decoration.
Edited by Practicedummy, 04 August 2010 - 12:26 AM.
I could have been smart, but I never learned anything by being smart!
#259
Posted 04 August 2010 - 02:29 PM
you're right! They do look like bullets, especially since that is the intention now anyways. good going so far, (man, I really am stuck on those trees, they are incredibly done!) Have you decided on the lower table image, yet? You mention that you'll pull a pic off a dvd, or is it gonna be a surprise for us? Maybe better that way (don't want to give away everything just yet!)
"Don’t let the noise of others’ opinions drown out your own inner voice.
And most important, have the courage to follow your heart and intuition.”
----Steve Jobs
And most important, have the courage to follow your heart and intuition.”
----Steve Jobs
#260
Posted 04 August 2010 - 05:28 PM
Yes I plan to pull a pic off my dvd's. It will be a bit of work to find one without one or more characters being in it but I should be able to manage.
Here's the current work submitted for more playtesting. I have made the ramps non-collidable so the ball can roll under them and hit the kickers which kick the ball back down fast (F-14 Tomcat-like).
Hogan's Heroes 8-4-10
Here's the current work submitted for more playtesting. I have made the ramps non-collidable so the ball can roll under them and hit the kickers which kick the ball back down fast (F-14 Tomcat-like).
Hogan's Heroes 8-4-10
Edited by Practicedummy, 04 August 2010 - 05:39 PM.
I could have been smart, but I never learned anything by being smart!


Top











are all trademarks of VPFORUMS.