Jump to content



Photo
- - - - -

Drop target Script help please.


  • Please log in to reply
6 replies to this topic

#1 Episode

Episode

    Hobbyist

  • Silver Supporter
  • 46 posts
  • Location:USA

  • Flag: United States of America

  • Favorite Pinball: Simpsons

Posted 13 November 2010 - 11:18 PM

I have looked over quite a few tables and have serched the forum and cannot seem to understand the subject matter.

Can anyone please give me an example of 1 drop target wall scripted for basic understand lets call it "wall1".
This is in its own catagory aswell i think? it seems people put a ton of walls in an array or something? I am not quite understanding.

Or a beginner tut on basic scrpting would be helpfull, maybe i just cannot seem to find the right thread? Thanks for any and all help.
"For he today that sheds his blood with me shall be my brother" -William Shakespeare
CAL: CQC-Recon-Intel


My needing help post.

#2 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 5,047 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 13 November 2010 - 11:35 PM

QUOTE (Episode @ Nov 14 2010, 12:18 AM) <{POST_SNAPBACK}>
I have looked over quite a few tables and have serched the forum and cannot seem to understand the subject matter.

Can anyone please give me an example of 1 drop target wall scripted for basic understand lets call it "wall1".
This is in its own catagory aswell i think? it seems people put a ton of walls in an array or something? I am not quite understanding.

Or a beginner tut on basic scrpting would be helpfull, maybe i just cannot seem to find the right thread? Thanks for any and all help.

when i'm back at home i could give you exact scripts, but for now, have a look at either a table from the originals section or one of the table templates available under design resources

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#3 Bob5453

Bob5453

    I'm taking a nap

  • VIP
  • 3,896 posts
  • Location:Near Dayton, Ohio USA

  • Flag: United States of America

  • Favorite Pinball: Any table I can play while sitting in a rocking chair




  • Trophies:

Posted 14 November 2010 - 12:27 AM

Here's a table. it has nothing but 3 targets on it, you knock them down and then it will set them up with a small delay to look more realistic.

Things to remember about a drop target, you must have "Can Drop" and "Collidable" checked in property options.

Attached Files


Edited by Bob5453, 14 November 2010 - 12:31 AM.

Posted Image

You have discovered an Easter egg. Pat yourself on the back.


#4 Itchigo

Itchigo

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,562 posts
  • Location:Chicago, Illinois

  • Flag: United States of America

  • Favorite Pinball: All




  • Trophies:

Posted 14 November 2010 - 12:38 AM

QUOTE (Episode @ Nov 13 2010, 05:18 PM) <{POST_SNAPBACK}>
I have looked over quite a few tables and have serched the forum and cannot seem to understand the subject matter.

Can anyone please give me an example of 1 drop target wall scripted for basic understand lets call it "wall1".
This is in its own catagory aswell i think? it seems people put a ton of walls in an array or something? I am not quite understanding.

Or a beginner tut on basic scrpting would be helpfull, maybe i just cannot seem to find the right thread? Thanks for any and all help.

Thi is out of my script page but it should help. Just make sure you make the target names match the script names!!

' Drop Targets----------------------

Sub LeftDropTarget1_Hit()
PlaySound""
AddScore ()
LeftDropTarget1.IsDropped = True
Check_Targets1 'Each time a target is hit check to see if they need to reset. (Calls the sub below).
End Sub

Sub LeftDropTarget2_Hit()
PlaySound""
AddScore ()
LeftDropTarget2.IsDropped = True
Check_Targets1
End Sub

Sub LeftDropTarget3_Hit()
PlaySound""
AddScore ()
LeftDropTarget3.IsDropped = True
Check_Targets1
End Sub

Sub LeftDropTarget4_Hit()
PlaySound""
AddScore ()
LeftDropTarget4.IsDropped = True
Check_Targets1
End Sub

Sub LeftDropTarget5_Hit()
PlaySound""
AddScore ()
LeftDropTarget5.IsDropped = True
Check_Targets1
End Sub

Sub LeftDropTarget6_Hit()
PlaySound""
AddScore ()
LeftDropTarget6.IsDropped = True
Check_Targets1
End Sub

Sub Check_Targets1() 'this is this drop targets subroutine for the timer (so they know when or if to reset)
LeftDropTarget1.TimerInterval=3000 ' set timer to expire in 3 seconds. Targets will reset in 3 seconds if all hit.
If LeftDropTarget1.IsDropped = true And LeftDropTarget2.IsDropped = true and LeftDropTarget3.IsDropped = true and LeftDropTarget4.IsDropped = true and LeftDropTarget5.IsDropped = true and LeftDropTarget6.IsDropped = true THEN LeftDropTarget1.TimerEnabled = True 'Then LeftLaneDrop1.TimerEnabled = True
' the line above tells the timer that IF they all are dropped then the timer should go on for them to come back up
End Sub

'Note: Can Drop unchecked will produce a null error!

Edited by Itchigo, 14 November 2010 - 12:40 AM.

Founder of Rogue Pinball! https://roguepinball.com/index.php                 Making Pinball great again!!

 

partylikeits1776-.jpg


#5 Wizards_Hat

Wizards_Hat

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 1,257 posts
  • Location:Manchester, UK

  • Flag: United Kingdom

  • Favorite Pinball: STTNG




  • Trophies:

Posted 14 November 2010 - 11:01 AM

Hi Episode,
there are several ways of trying to learn what you need to know...the main problem (for me at least) in trying to help you is knowing where you're starting from.

I introduced VP into a school a couple of years ago, and wrote a few things that helped a lot of kids from zero understanding to be able to make their own tables - (this was written all for VP8).
You may find that what you're really interested in from that is the "scripting" section I did from the second part of the tutorial - can be found here: Wizards_Hat's VP tutorial part2 (powerpoint)
(The whole thing is here - Wizards Hat's VP introduction section)

Alternatively, I (& others) have also written several simple tutorial tables with heavily commented script - I tend to try & make tutorial tables very short & very specific to a particular want...so for example if you want to learn how to use drop targets in simple collections (arrays) have a look here - Collections tutorial table (using drop targets)
The rest of the tutorials on this site are here - Tutorials Section

Further, you may be interested to look the guide for the editor I recently completed - VP9.08 Guide.

If after all this you still need help, by all means ask again smile.gif

Hope this helps.

Regards,
Dan.


A wizard only needs one ball...but can handle six.

#6 Episode

Episode

    Hobbyist

  • Silver Supporter
  • 46 posts
  • Location:USA

  • Flag: United States of America

  • Favorite Pinball: Simpsons

Posted 15 November 2010 - 05:54 PM

Wow, thanks alot guys this is perfect. Exactly what i needed.
"For he today that sheds his blood with me shall be my brother" -William Shakespeare
CAL: CQC-Recon-Intel


My needing help post.

#7 powerchisper

powerchisper

    Enthusiast

  • Silver Supporter
  • 243 posts
  • Location:Sevilla

  • Flag: Spain

  • Favorite Pinball: Dracula

Posted 15 November 2010 - 08:11 PM

I have problems with this part of the script.

Dracula has one drop target only.

What I don't understand is the difference between dtDropTarget and dtLDropTarget.

I think it also requires a solenoid callback to work .


Please correct my English if it is necessary.

Any funny words or sentences you can teach me are welcome too !!!

This way I'll learn about pinball but English as well.