Jump to content



Photo
- - - - -

Trigger hit problem


  • Please log in to reply
3 replies to this topic

#1 atlas

atlas

    Neophyte

  • Members
  • Pip
  • 3 posts

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

  • Favorite Pinball: high speed

Posted 12 September 2011 - 02:03 PM

I have a problem with future pinball tables. When the ball rolls over a trigger wire, it will call the _Hit sub multiple times, making the scoring wrong. The slower the ball is traveling when rolling over the trigger, the more times the sub will be called. I tried everything I could think of to fix it, including re-installing the app. I used an AddDebugText in the <trigger>_Hit sub to confirm that it is calling the sub multiple times. Anyone have any suggestions?

#2 Comicalman

Comicalman

    Enthusiast

  • Members
  • PipPipPip
  • 128 posts
  • Location:Great Midwest

  • Flag: United States of America

  • Favorite Pinball: 8 ball deluxe, Black Knight

Posted 12 September 2011 - 04:46 PM

QUOTE (atlas @ Sep 12 2011, 03:03 PM) <{POST_SNAPBACK}>
I have a problem with future pinball tables. When the ball rolls over a trigger wire, it will call the _Hit sub multiple times, making the scoring wrong. The slower the ball is traveling when rolling over the trigger, the more times the sub will be called. I tried everything I could think of to fix it, including re-installing the app. I used an AddDebugText in the <trigger>_Hit sub to confirm that it is calling the sub multiple times. Anyone have any suggestions?



I noticed the same thing on my table recently- but for a kicker. You might want to try a different trigger model without so much surface area. However, I coded around the issue thusly:

Sub MyKicker_Hit()
if LastSwitchHit.Name <> "MyKicker" then 'Make sure not last hit!
addscore(100)
end if
set LastSwitchHit = MyKicker
End sub

Cujopb
drinks.gif

https://www.facebook...yer3productions follow me on twitter @player3products

Current WIPs: DMD Coloring:???,

FP Tables completed:Shrek, Heavy Metal, Nehwon (Fafhrd, Gray Mouser), NHL TableHockey,


#3 atlas

atlas

    Neophyte

  • Members
  • Pip
  • 3 posts

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

  • Favorite Pinball: high speed

Posted 12 September 2011 - 09:09 PM

Thanks for the reply. I fixed mine in a similar way, and added a timer for the times when you need to score the same trigger twice in a row. I did a lot of searching and was surprised that no one else reported having this problem. I am new to future pinball and pinball sims in general, is this a bug in the latest build, or was it in past builds? Is the future pinball source code available?

#4 Sebek74

Sebek74

    Enthusiast

  • Members
  • PipPipPip
  • 114 posts
  • Location:Lodz, Poland

  • Flag: Poland

  • Favorite Pinball: Pinball Dreams: Ignition

Posted 12 September 2011 - 09:56 PM

QUOTE (cujopb @ Sep 12 2011, 06:46 PM) <{POST_SNAPBACK}>
I noticed the same thing on my table recently- but for a kicker.

The kicker hit event can be raised with two unexpected situations:
* ball is created - the hit event is called just after ball touches the kicker trigger. You can use that fake event to detect if the ball was created or not (create ball fails if another ball occupies the kicker).
* ball in the kicker is hit by another ball - such events should be ignored; it's simple just store ball number when kicker is hit and set to -1 when ball is released; false events is reaised when store ball number>0

QUOTE (cujopb @ Sep 12 2011, 06:46 PM) <{POST_SNAPBACK}>
Sub MyKicker_Hit()
if LastSwitchHit.Name <> "MyKicker" then 'Make sure not last hit!
addscore(100)
end if
set LastSwitchHit = MyKicker
End sub


Good solution but I suggest a little bit improvent to enable another hit after longer time (f.e. when ball returns lane and it's back again)

Dim LastSwitch
Set LastSwitch = DummyTrigger

Sub MyKicker_Hit()
if LastSwitchHit.Name <> "MyKicker" then 'Make sure not last hit!
addscore(100)
end if
LastSwitchTimer.Set TRUE, 500
set LastSwitchHit = MyKicker
End sub

Sub LastSwitchTimer_Expired() ' add extra timer
LastSwitchTimer.Enabled = FALSE
set LastSwitchHit = DummyTrigger ' create any extra table element that cannot be hit and it's invisible
End Sub





Sebek74
Visit http://futurepinball.mm.com.pl/ for my tables download: Ignition, Beat-Box, Nightmare, Billion Dollar Gameshow, Wild West
http://futurepinball...om.pl/Gfx2DmdF/ for Gfx2DmdF font conversion
http://picasaweb.google.com/sebek74 - personal photo gallery