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
  • 62 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
  • 686 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.

logo_.gif PopotteDMDredo.gif

2739049.png


#3 Neo

Neo

    Silverball Dreamer

  • Members
  • PipPipPip
  • 219 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

Double Potions Pinball Productions

VP8 Tables Completed: Bubblegum Crisis MegaTokyo 2035 1.3, Initial D Pinball Stage 1.3, Yu-Gi-Oh! Duelist's Pinball 1.6, Tokimeki Forever With You 2.0
VP9 Tables Completed: Zone Fury, Harry Potter and the Silverball Dream (WS and FS versions), Bubblegum Crisis MegaTokyo 2035 VP9, Initial D Pinball Stage VP9, Tokimeki Forever 2.0.2 VP9
WIPs: Various Solid-State Display Templates, Harry Potter 1.2.0, BGC2035 VP9 version 1.0.2, Yu-Gi-Oh Anniversary Edition (VP9)


"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
  • 62 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
  • 62 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!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users