Jump to content



Photo
- - - - -

Drop Target (Reset to Up)?


  • Please log in to reply
23 replies to this topic

#1 saecrow

saecrow

    Enthusiast

  • Members
  • PipPipPip
  • 93 posts

  • Flag: United States of America

  • Favorite Pinball: still figuring it out!

Posted 31 August 2016 - 09:50 PM

Ok, I'm obviously missing something here when it comes to drop targets and having them reset to the up position. I can't really find anything on this and One older VP guide/doc I came across said to create a "CheckTarget" sub to pop them back up (by setting to False:

 

Sub CheckTarget

If Target1.IsDropped = True and Target2.IsDropped = True then

Target1.IsDropped = False

Target2.IsDropped = False

End If

End Sub 

 

This doesn't seem to be working.

 

This is an original, non-ROM table. VPX

 

In FP, True and Falses designated checks for states, not invoking actions - it used solenoidon and solenoidoff and solenoidpulse commands to drop and reset targets. Is there something like that in VP or is the drop and reset handled through True and False statements?

 

Basically I have 7 targets that I want to reset once the last one drops - but to simplify and check the functionality I've created two targets in the shooter lane and once the second one is hit neither the first or second reset.

Can someone tell me where I've gone wrong?

 

Thanks


Edited by saecrow, 31 August 2016 - 09:51 PM.


#2 freneticamnesic

freneticamnesic

    A Faint Ghost Through the Raindrops

  • VIP
  • 3,370 posts
  • Location:Portland, OR

  • Flag: United States of America

  • Favorite Pinball: Star Trek, Black Hole, AFM, Fast Draw, Tron, AMH

  • 360 Gamer Tag: sixgunsounddd

Posted 31 August 2016 - 10:02 PM

You want to add CheckTarget to the Target1.Hit and Target2.Hit subs and then it will work


right after Target1.IsDropped = true



#3 saecrow

saecrow

    Enthusiast

  • Members
  • PipPipPip
  • 93 posts

  • Flag: United States of America

  • Favorite Pinball: still figuring it out!

Posted 31 August 2016 - 10:28 PM

Thanks for replying Fren. . .  I tried that at the start and have been banging my head ever since. That's why I thought there must be something completely different I have to do.

 

Here's my 2 target code - I figure if I can get this to work, I can easily get the others to work. Does anything jump out at you? When they are hit they drop, they just don't pop back up once Target9 is hit.

 

Sub Target8_hit
Target8.IsDropped = True
CheckTarget
End Sub
 
Sub Target9_hit
Target9.IsDropped = True
CheckTarget
End Sub
 
Sub CheckTarget
If Target8.IsDropped = True and Target9.IsDropped = True Then
Target8.IsDropped = False
Target9.IsDropped = False
End If
End sub


#4 freneticamnesic

freneticamnesic

    A Faint Ghost Through the Raindrops

  • VIP
  • 3,370 posts
  • Location:Portland, OR

  • Flag: United States of America

  • Favorite Pinball: Star Trek, Black Hole, AFM, Fast Draw, Tron, AMH

  • 360 Gamer Tag: sixgunsounddd

Posted 31 August 2016 - 10:31 PM

Yea that should work....maybe it needs a timer to keep it from getting out of order? Since the targets have an animation time now maybe you can't reset the targets so immediate afterwards, so you might need a timer with a interval of 100 which calls the checktarget routine instead of calling it directly...



#5 BorgDog

BorgDog

    We come in peace.. shoot to kill.. shoot to kill.

  • Members
  • PipPipPipPip
  • 1,427 posts
  • Location:Leavenworth, WA

  • Flag: United States of America

  • Favorite Pinball: Alien Star, TNA



Posted 31 August 2016 - 10:39 PM

vpx drop targets don't get the isdropped flag set until after the drop target animation happens. Because of this they added a _dropped event that you would want to use instead of _hit as when the _dropped is triggered the isdropped flag reflects the accurate state.  Make sense?  basically change your target8_hit and target9_hit to target8_dropped and target9_dropped and all will work as it should (hopefully) 

 

edit:  oh and yes even when you say isdropped=true it does not actually set that until after the animation.  That statement is not needed.


Edited by BorgDog, 31 August 2016 - 10:41 PM.


#6 saecrow

saecrow

    Enthusiast

  • Members
  • PipPipPip
  • 93 posts

  • Flag: United States of America

  • Favorite Pinball: still figuring it out!

Posted 31 August 2016 - 10:58 PM

Hmmmm. . . . ok, so something like this? (this isn't working - just need to know if I'm close to understanding how it should be). What a pain. . . 

 

Sub Target8_dropped
CheckTarget
End Sub
 
Sub Target9_dropped
CheckTarget
End Sub
 
Sub CheckTarget
If Target8.IsDropped = True and Target9.IsDropped = True Then
Target8.IsDropped = False
Target9.IsDropped = False
End If
End sub


#7 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,157 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 31 August 2016 - 11:24 PM

Weird, your script didn't work for me.  Got it working by changing True to 1

Sub Target8_dropped
CheckTarget
End Sub
 
Sub Target9_dropped
CheckTarget
End Sub
 
Sub CheckTarget
If Target8.IsDropped=1 and Target9.Isdropped=1 then
	Target8.IsDropped = False
	Target9.IsDropped = False
End If
End sub

This is so weird that True doesn't work for the evaluation, but False works to raise the Target...



#8 saecrow

saecrow

    Enthusiast

  • Members
  • PipPipPip
  • 93 posts

  • Flag: United States of America

  • Favorite Pinball: still figuring it out!

Posted 31 August 2016 - 11:35 PM

There it is! Thanks joe!  I feel a little better knowing it took 3 of the best to put this one to rest! :-)  I appreciate all the input guys. . .  I'm sure I'll have other questions down the road but this should carry me for a day or so.  :dblthumb:

 

Thanks again!



#9 BorgDog

BorgDog

    We come in peace.. shoot to kill.. shoot to kill.

  • Members
  • PipPipPipPip
  • 1,427 posts
  • Location:Leavenworth, WA

  • Flag: United States of America

  • Favorite Pinball: Alien Star, TNA



Posted 01 September 2016 - 12:40 AM

oops, thanks Joe, I forgot about that part.



#10 Shockman

Shockman

    Pinball Fan

  • VIP
  • 1,717 posts
  • Location:Portland Or.

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 01 September 2016 - 04:38 AM

I don't know if it would save much time in the cycle, but instead of calling a sub with a lot of checks (and statements inside an if) you could run a tally

 

where checktarget is called in each sub, instead increment banktally and check if that equals 7. If yes set the timer or go off to the routine to act on that. Reset tally to 0 when they pop back up.



#11 BorgDog

BorgDog

    We come in peace.. shoot to kill.. shoot to kill.

  • Members
  • PipPipPipPip
  • 1,427 posts
  • Location:Leavenworth, WA

  • Flag: United States of America

  • Favorite Pinball: Alien Star, TNA



Posted 01 September 2016 - 12:35 PM

yup, lots of ways to skin a cat. another I ran across in someones script and have been using is since it actually uses 0 and 1 you can do math on them.  so a check of if target8.isdropped+target9.isdropped=2 then.. probably not much use for just two targets, but can be useful as well depending on the situation



#12 saecrow

saecrow

    Enthusiast

  • Members
  • PipPipPip
  • 93 posts

  • Flag: United States of America

  • Favorite Pinball: still figuring it out!

Posted 01 September 2016 - 06:59 PM

Cool, thanks guys - nice to know and have a few different options. Seems the biggest key for anyone interested in making the move from FP to VP is really just learning the syntax / variable names and then figuring out a few other things that FP made really easy by performing by default (like trigger animation) - hint, hint.

 

Is there a "how to" on trigger animation somewhere (wire / star)? 

 

Thanks!



#13 BorgDog

BorgDog

    We come in peace.. shoot to kill.. shoot to kill.

  • Members
  • PipPipPipPip
  • 1,427 posts
  • Location:Leavenworth, WA

  • Flag: United States of America

  • Favorite Pinball: Alien Star, TNA



Posted 01 September 2016 - 07:20 PM

vpx does trigger animations, wire and star and round buttons



#14 saecrow

saecrow

    Enthusiast

  • Members
  • PipPipPip
  • 93 posts

  • Flag: United States of America

  • Favorite Pinball: still figuring it out!

Posted 02 September 2016 - 12:54 AM

Huh, ok cool!  I'll have to take a closer look at it tomorrow - I didn't see it animate when the ball went over it. All I did was add one to the shooter lane (without any programming for it). . . so it should just animate by placing it on the table and going over it with the ball then?



#15 BorgDog

BorgDog

    We come in peace.. shoot to kill.. shoot to kill.

  • Members
  • PipPipPipPip
  • 1,427 posts
  • Location:Leavenworth, WA

  • Flag: United States of America

  • Favorite Pinball: Alien Star, TNA



Posted 02 September 2016 - 01:49 AM

yup, just does it. 



#16 Shockman

Shockman

    Pinball Fan

  • VIP
  • 1,717 posts
  • Location:Portland Or.

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 02 September 2016 - 02:09 AM

Every time I have tried to use a VPX standard trigger It does weird things. It will either ignore the ball, 100% of the time with a fast moving ball, or the ball will push it down (actually it looks like it just disappears except a small part of the bend, and it will stay down till VPX is shut down. I have never seen realistic action from it (go down and come back up in any relation to the ball contact with it).

 

If there is a trigger though it seems that it would be pointless without a subroutine. (something is always triggered by a trigger). There should also be a subtle sound which would need scripted for it or the group. 



#17 saecrow

saecrow

    Enthusiast

  • Members
  • PipPipPip
  • 93 posts

  • Flag: United States of America

  • Favorite Pinball: still figuring it out!

Posted 02 September 2016 - 02:28 AM

Yeah, I'm telling going to have a sub for the triggers - I just wasn't sure if programming the animation needed to be part of that (and/or how that would be done). So if the animations don't work as expected for you Shockman, how are you handling animations - or are you not animating the triggers? Weird that it apparently works fine for others. . . 

 

I'll have to look at it a bit closer tomorrow but I'm pretty sure they weren't moving when the ball rolled over it. If not, is there an alternative method to get the animation?



#18 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,157 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 02 September 2016 - 02:43 AM

Try reducing the trigger hit height.  I think by default it is 50

 

If that doesnt work post your test table and we can take a look



#19 Shockman

Shockman

    Pinball Fan

  • VIP
  • 1,717 posts
  • Location:Portland Or.

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 02 September 2016 - 03:22 AM

Sub LeftInlane_Hit     :  Playsound "sensor" : Controller.Switch(12) = True : End Sub
Sub LeftInlane_UnHit   : Controller.Switch(12) = False :End Sub
 
They are at a place where they usually register but often the ball is too fast and nothing. No animation, no sound and no score. 
 
If you think this problem does not effect you put your favorite trigger in the plunger lane at go over it fast.
 
A larger trigger area might help, but mine should be big enough, and the speed i'm talking about is not outrageous.
A timer to reset the controller might work as well, but It doesn't for me. Nothing in unhit could prevent the sound from playing though it may unset the switch before it is set.

Edited by Shockman, 02 September 2016 - 03:25 AM.


#20 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,157 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 02 September 2016 - 03:48 AM

I don't agree. The triggers are reliable

I don't recall a ramp or loop shot not registering a trigger hit in a released VPX table. If that were the case I would have reported it