Need help on getting the ball lights to work.

Mitchell

Pinball Player
Joined
Jun 25, 2003
Messages
106
Reaction score
0
Points
18
OK this is simple here. I can get the lights lit from 1 to 7 and then lights off from 7 to 1.

Dim Light1Count

Light1Count = 0

Dim Light2Count

Light2Count = 0

Sub Table1_KeyDown(ByVal keycode)

If keycode = PlungerKey Then
Plunger.PullBack
End If

If keycode = LeftFlipperKey Then
LeftFlipper.RotateToEnd
PlaySound "FlipperUp"
Light1Count = Light1Count + 1
Light2Count = 0
If Light1Count = 1 Then Light1.State = 1
If Light1Count = 2 Then Light2.State = 1
If Light1Count = 3 Then Light3.State = 1
If Light1Count = 4 Then Light4.State = 1
If Light1Count = 5 Then Light5.State = 1
If Light1Count = 6 Then Light6.State = 1
If Light1Count = 7 Then Light7.State = 1
End If

If keycode = RightFlipperKey Then
RightFlipper.RotateToEnd
PlaySound "FlipperUp"
Light2Count = Light2Count + 1
Light1Count = 0
If Light2Count = 1 Then Light7.State = 0
If Light2Count = 2 Then Light6.State = 0
If Light2Count = 3 Then Light5.State = 0
If Light2Count = 4 Then Light4.State = 0
If Light2Count = 5 Then Light3.State = 0
If Light2Count = 6 Then Light2.State = 0
If Light2Count = 7 Then Light1.State = 0
End If

If keycode = LeftTiltKey Then
Nudge 90, 2
End If

If keycode = RightTiltKey Then
Nudge 270, 2
End If

If keycode = CenterTiltKey Then
Nudge 0, 2
End If

End Sub

But how I get the to count forward and backward from any light? For example 4 lights are lit and I want it to start turning off by 1 light per right flipper. Very confuse on this part. Remember there are 7 lights and 4 are lit up. Oh yea if 1 light got turn off and extra ball in play then that light is lit up again. These are ball lights not bonuses.
 
I'm tired, so I may be foggy, but I think you need an extra Dim.
Let me know if I blew it.

Dim switchdown

If keycode = RightFlipperKey Then
RightFlipper.RotateToEnd
PlaySound "FlipperUp"

If Light2Count < 5 And switchdown = 0 Then
Light2Count = Light2Count + 1
Else
switchdown = 1
End If

If Light2Count > 0 And switchdown = 1 Then
Light2Count = Light2Count - 1

If Light2Count = 0 Then
switchdown = 0
End If
End If
 
It is a good day. :)
 
Last edited:
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
  • Chat Bot Mibs Chat Bot Mibs:
    maxangelo19 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Dragonslapper has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    royaljet has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tyfox has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Goldtopboy has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    slick267 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    dabreeze has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Spike has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tofa has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Atropine has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    bongo2k5 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Bouly has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Felipefx3 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    djrbx has left the room.
  • F @ freebird1963:
    were do music and sound files go
    Quote
  • Chat Bot Mibs Chat Bot Mibs:
    jhbradley has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Conejazo has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Sedulous has left the room.
      Chat Bot Mibs Chat Bot Mibs: Sedulous has left the room.
      Back
      Top