GoPinball.com
http://www.gopinball.com/forum/

Script help needed, segment display
http://www.gopinball.com/forum/viewtopic.php?f=84&t=8334
Page 1 of 1

Author:  SlipperyJimdiGris [ Thu Jan 10, 2019 1:52 am ]
Post subject:  Script help needed, segment display

I have an opto sensor on a habitrail that when 'hit" I want to display a short message on a display segment. The problem is thus:

there is a spinner at the ramp entrance, and if the spinner is still scoring when the ball hits the sensor, then the message is not displayed. the message is displayed if I use the manual ball roller and slowly push the ball past the spinner so it has stopped before it gets to sensor.

the display code is simple and in this subroutine:

Code:
Sub TriggerOpto3_Hit()

   FluxCapacitorOn()

   Sign = Sign + 1


Select Case Sign

Case 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29


   DispSegM.QueueText "   BACK TO 1955",  seBlink, 3000, 0, False, ""
   HudSegInfo.QueueText "   BACK TO 1955",  seBlink, 3000, 0, False, ""

   HillValleySign1955.Dropped = FALSE
   HillValleySign1985.Dropped = TRUE

Case 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30


   DispSegM.QueueText "   BACK TO 1985",  seBlink, 3000, 0, False, ""
   HudSegInfo.QueueText "   BACK TO 1985",  seBlink, 3000, 0, False, ""

   HillValleySign1955.Dropped = TRUE
   HillValleySign1985.Dropped = FALSE

End Select


End Sub



how do I force the display to show the message even if there is scoring in progress?

Author:  Gimli [ Thu Jan 10, 2019 3:04 pm ]
Post subject:  Re: Script help needed, segment display

SlipperyJimdiGris wrote:
I have an opto sensor on a habitrail that when 'hit" I want to display a short message on a display segment. The problem is thus:

there is a spinner at the ramp entrance, and if the spinner is still scoring when the ball hits the sensor, then the message is not displayed. the message is displayed if I use the manual ball roller and slowly push the ball past the spinner so it has stopped before it gets to sensor.

the display code is simple and in this subroutine:

Code:
Sub TriggerOpto3_Hit()

   FluxCapacitorOn()

   Sign = Sign + 1


Select Case Sign

Case 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29


   DispSegM.QueueText "   BACK TO 1955",  seBlink, 3000, 0, False, ""
   HudSegInfo.QueueText "   BACK TO 1955",  seBlink, 3000, 0, False, ""

   HillValleySign1955.Dropped = FALSE
   HillValleySign1985.Dropped = TRUE

Case 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30


   DispSegM.QueueText "   BACK TO 1985",  seBlink, 3000, 0, False, ""
   HudSegInfo.QueueText "   BACK TO 1985",  seBlink, 3000, 0, False, ""

   HillValleySign1955.Dropped = TRUE
   HillValleySign1985.Dropped = FALSE

End Select


End Sub



how do I force the display to show the message even if there is scoring in progress?


You can have flag
ScoreUpdate = true/false

So in your segment code for score preface that with:
If ScoreUpdate = true then .....

Then in opo trigger code
have
Flush queue code
ScoreUpdate = false

And then add a timer to turn it back on....
Scoretimer.set True, 2000

Sub Scoretimer_expired
Scoretimer.set False
ScoreUpdate =True
End Sub

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/