Jump to content



Photo
- - - - -

How to determine game or flipper state via script?

vpx script

Best Answer TravisP , 28 July 2020 - 04:15 PM

I have something working with Apollo 13, so now on to see if this is universal or a case by case basis. I've added .Collidable= conditions for my NoDrain rubber in Plunger KeyDown and KeyUp, and it's exactly what I was hoping for.

 
Sub Table1_KeyDown(ByVal keycode)
If keycode = LeftFlipperKey Then SolLFlipper 1
If keycode = RightFlipperKey Then SolRFlipper 1
If vpmKeyDown(keycode) Then Exit Sub
If keycode = PlungerKey Then Controller.Switch(9) = True:NoDrain.Collidable=False:end if
End Sub

Sub Table1_KeyUp(ByVal keycode)
If keycode = LeftFlipperKey Then SolLFlipper 0
If keycode = RightFlipperKey Then SolRFlipper 0
If vpmKeyUp(KeyCode) Then Exit Sub
If keycode = PlungerKey Then Controller.Switch(9) = False:NoDrain.Collidable=True:end if
End Sub
 

I can then drain any lingering balls just by holding the Plunger key.

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 TravisP

TravisP

    Neophyte

  • Members
  • Pip
  • 3 posts

  • Flag: United States of America

  • Favorite Pinball: Black Hole

  • PS3 Gamer Tag: SinistarX
  • 360 Gamer Tag: SinistarX

Posted 26 July 2020 - 09:21 PM

Sorry for the super n00b question, but I'm using VPX and trying to modify tables so they can be played by my 18yo son who has CP. His reflexes aren't fast enough for standard play, so I've been placing an invisible rubber between the flippers to hold the ball instead of drain it.

 

This works incredibly well, but it falls apart on multiball games when, at the end of the game, the held balls are released. They end up just sitting at the flippers with no way to drain them as the flippers are at that point disabled.

 

I'd like to make the rubber move out of the way when the game ends (or when the flippers are disabled), but I'm not sure how to tell that's the case. 

 

Any direct help or pointers to resources would be greatly appreciated. Thanks!


Edited by TravisP, 26 July 2020 - 09:25 PM.


#2 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,152 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 27 July 2020 - 03:37 AM

You could set up a button to move the rubber. If you want it to detect when game over, each table will be different so post the tables you are trying to modify and we can help

Edited by gtxjoe, 27 July 2020 - 03:38 AM.


#3 TravisP

TravisP

    Neophyte

  • Members
  • Pip
  • 3 posts

  • Flag: United States of America

  • Favorite Pinball: Black Hole

  • PS3 Gamer Tag: SinistarX
  • 360 Gamer Tag: SinistarX

Posted 27 July 2020 - 04:11 AM

I guess the first example would be Blackout (even though that's not multiball). He loves watching me play our physical pin, so it's high time he play the game himself. :)

 

Sounds like mapping a button would be the better universal solution, but I'd still love to learn how to figure out the game over state and trigger based on that.


Edited by TravisP, 27 July 2020 - 12:54 PM.


#4 TravisP

TravisP

    Neophyte

  • Members
  • Pip
  • 3 posts

  • Flag: United States of America

  • Favorite Pinball: Black Hole

  • PS3 Gamer Tag: SinistarX
  • 360 Gamer Tag: SinistarX

Posted 28 July 2020 - 04:15 PM   Best Answer

I have something working with Apollo 13, so now on to see if this is universal or a case by case basis. I've added .Collidable= conditions for my NoDrain rubber in Plunger KeyDown and KeyUp, and it's exactly what I was hoping for.

 
Sub Table1_KeyDown(ByVal keycode)
If keycode = LeftFlipperKey Then SolLFlipper 1
If keycode = RightFlipperKey Then SolRFlipper 1
If vpmKeyDown(keycode) Then Exit Sub
If keycode = PlungerKey Then Controller.Switch(9) = True:NoDrain.Collidable=False:end if
End Sub

Sub Table1_KeyUp(ByVal keycode)
If keycode = LeftFlipperKey Then SolLFlipper 0
If keycode = RightFlipperKey Then SolRFlipper 0
If vpmKeyUp(KeyCode) Then Exit Sub
If keycode = PlungerKey Then Controller.Switch(9) = False:NoDrain.Collidable=True:end if
End Sub
 

I can then drain any lingering balls just by holding the Plunger key.


Edited by TravisP, 28 July 2020 - 04:17 PM.


#5 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,859 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 28 July 2020 - 08:19 PM

Hehe that could also be kind of handy for testing out tables too


If you feel the need to empty your wallet in my direction, i don't have any way to receive it anyways

Spend it on Hookers and Blow






Also tagged with one or more of these keywords: vpx script