Jump to content



Photo
- - - - -

How do I make drop targets that reset when knocked down?


  • Please log in to reply
5 replies to this topic

#1 mystman12

mystman12

    Enthusiast

  • Members
  • PipPipPip
  • 73 posts

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

  • Favorite Pinball: White Water

Posted 07 April 2012 - 05:06 PM

Hi. I barely now anything about scripting, and I'm trying to make a pinball table, but I can't figure out how to make a bank of drop targets that resets the moment it is knocked down. Could someone please post some script I can use. Thanks.

Edited by mystman12, 07 April 2012 - 05:07 PM.

"What is life anyway, when compared to the immortality of a high score?" - Soos, from Gravity Falls
tilt!tilt!tilt!3.gif
I'm working on a Future Pinball game, called Joe's Ultimate Bus Ride! Check out my blog if you want to know more!

#2 Popotte

Popotte

    Pinball Fan

  • VIP
  • 758 posts
  • Location:Paris

  • Flag: France

  • Favorite Pinball: World Fair



Posted 07 April 2012 - 07:07 PM

The Help is really well done, so have a look to it...
If your bank is named MyBank, MyBank.SolenoidPulse is the solution.

Les cons ça ose tout. C'est même à ça qu'on les reconnaît.

PopotteDMDredo.gif

 


#3 Neo

Neo

    Silverball Dreamer

  • Members
  • PipPipPip
  • 272 posts
  • Location:Kansas USA

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

  • PS3 Gamer Tag: AppleJack052570
  • 360 Gamer Tag: MCHachiRoku

Posted 07 April 2012 - 07:07 PM

I don't know whether or not you're making a VPM table or not, but this assumes you're making a non-VPM table.

Try this. This is a very basic block of code for drop targets.

CODE


' Drop targets defined in VP as DropTarget1, DropTarget2, and DropTarget3. The "Can Drop" checkbox must be checked for drop targets

Dim TargetsDown ' number of targets hit in the bank. Set this to 0 at start of your game

' Hit event for DropTarget1

Sub DropTarget1_Hit()

AddScore 900 ' Add some points
TargetsDown = TargetsDown + 1 ' Bump the number of targets down by 1
DropTarget1.IsDropped = True ' This actually drops the target
CheckDropTargets ' Check to see if we got all of them

End Sub

' Hit Event for Drop Target2

Sub DropTarget2_Hit()

AddScore 900 ' Add some points
TargetsDown = TargetsDown + 1 ' Bump the number of targets down by 1
DropTarget2.IsDropped = True ' This actually drops the target
CheckDropTargets ' Check to see if we got all of them

End Sub

' Hit Event for Drop Target3

Sub DropTarget3_Hit()

AddScore 900 ' Add some points
TargetsDown = TargetsDown + 1 ' Bump the number of targets down by 1
DropTarget3.IsDropped = True ' This actually drops the target
CheckDropTargets ' Check to see if we got all of them

End Sub

Sub CheckDropTargets()

If TargetsDown = 3 then
Addscore 5000 ' Add some points for clearing the bank if desired
DropTarget1.IsDropped = False ' Reset all three drop targets
DropTarget2.IsDropped = False
DropTarget3.IsDropped = False
TargetsDown = 0 ' Reset the counter to 0
End If

End Sub



This will raise the targets immediately when all three are clear.

Edited by Neo, 07 April 2012 - 07:09 PM.

-Neo
VPX Tables Completed: Hextech 1.2, Crazy Cats Demo Derby 1.1; Zone Fury VPX 1.0
"Some say his tears are adhesive, and that the dark outline around his nipple matches the Nurburgring...All we know is he's not the Stig, but rather, the Stig's pinball-playing cousin."


#4 mystman12

mystman12

    Enthusiast

  • Members
  • PipPipPip
  • 73 posts

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

  • Favorite Pinball: White Water

Posted 07 April 2012 - 10:37 PM

Thanks for the code, but it didn't work. I am using Future Pinball.
"What is life anyway, when compared to the immortality of a high score?" - Soos, from Gravity Falls
tilt!tilt!tilt!3.gif
I'm working on a Future Pinball game, called Joe's Ultimate Bus Ride! Check out my blog if you want to know more!

#5 dafuyoma

dafuyoma

    Hobbyist

  • Members
  • PipPip
  • 16 posts
  • Location:European Badlands

  • Flag: Germany

  • Favorite Pinball: Future Pinball

Posted 08 April 2012 - 01:17 AM

This should work in FP:

Sub DropTarget_Hit()
If (DropTarget.Dropped) Then
DropTarget.SolenoidPulse
End If
End Sub

Regards

#6 mystman12

mystman12

    Enthusiast

  • Members
  • PipPipPip
  • 73 posts

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

  • Favorite Pinball: White Water

Posted 08 April 2012 - 01:51 AM

Thanks dafuyoma, That's just what I needed! It works perfectly. biggrin.gif
"What is life anyway, when compared to the immortality of a high score?" - Soos, from Gravity Falls
tilt!tilt!tilt!3.gif
I'm working on a Future Pinball game, called Joe's Ultimate Bus Ride! Check out my blog if you want to know more!