Jump to content



Photo
- - - - -

Help: Controlling a gate in the script

Frontier Bally Gate Script Solenoid

  • Please log in to reply
9 replies to this topic

#1 bord

bord

    Pinball Fan

  • Members
  • PipPipPipPip
  • 603 posts

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

  • Favorite Pinball: Star Gazer, Whirlwind, Frontier

Posted 12 September 2016 - 02:57 PM

I'm trying to get a VPX gate controlled in the script. This is for Bally's Frontier. The gate is closed by default and opens when the solenoid is triggered during gameplay. It closes again at the end of the ball (assuming that is how the dips are set). I looked to the VP9 version for inspiration on how to get this to work but with the following script the gate is always open in VPX:

 

' Solenoids

...
Const sGate        = 17 '11
...

'----------------------------------------------------
' Bind events to solenoids
' Last argument will always be "enabled" (True, False)
'----------------------------------------------------
...
SolCallback(sGate)          = "SolGate"
...

 

Sub SolGate(enabled)
    Gate2.Open = true
End Sub

 

Does anyone know how to get this working properly? This seems to line up with the gate documentation but doesn't work.

Thanks!



#2 cyberpez

cyberpez

    Enthusiast

  • Silver Supporter
  • 394 posts

  • Flag: United States of America

  • Favorite Pinball: Back to the Future

Posted 12 September 2016 - 03:17 PM

RaB has a similar gate..  opens and closes with a solenoid.  This is the code I'm using and works well.  You cannot see the gate, so no animation code....    Hope it helps.

 

''''''''''''''''''''''''

 

solCallback(14) ="TopGate"

 

 

'''''''''''''''''''''''''

 

Dim TopGateOpen
 
Sub TopGate(Enabled)
    If Enabled Then
Gate2.Collidable = false
If TopGateOpen = 0 then playsound "topgate_close"
TopGateOpen = 1
      Else
Gate2.Collidable = true
If TopGateOpen = 1 then playsound "topgate_open"
TopGateOpen = 0
  End If
End Sub


#3 sliderpoint

sliderpoint

    Pinball Fan

  • Members
  • PipPipPipPip
  • 760 posts
  • Location:Spokane, WA

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 12 September 2016 - 04:29 PM

much simpler, one line. replace current solcallback with this and comment out everything else:

 

SolCallback(17)="vpmSolGate Gate2,true,"

 

The rom controls if the gate is open or closed.

 

-Mike



#4 bord

bord

    Pinball Fan

  • Members
  • PipPipPipPip
  • 603 posts

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

  • Favorite Pinball: Star Gazer, Whirlwind, Frontier

Posted 12 September 2016 - 06:22 PM

cyberpez & sliderpoint: THANK YOU!  Are these meant to be controlling a wall element or a gate element on the playfield?



#5 sliderpoint

sliderpoint

    Pinball Fan

  • Members
  • PipPipPipPip
  • 760 posts
  • Location:Spokane, WA

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 14 September 2016 - 02:37 PM

These are for a Gate object.

 

-Mike



#6 bord

bord

    Pinball Fan

  • Members
  • PipPipPipPip
  • 603 posts

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

  • Favorite Pinball: Star Gazer, Whirlwind, Frontier

Posted 14 September 2016 - 02:46 PM

I'm feeling dense. I couldn't get it to work with my gate object. The gate was just always open. The cyberpez script worked fine with an invisible wall, which accomplishes my goal, but if a single line can control an actual gate object I'd like to know how to do it properly.



#7 kiwi

kiwi

    Pinball Fan

  • VIP
  • 2,670 posts

  • Flag: Italy

  • Favorite Pinball: Star Trek 25th Anniversary



Posted 14 September 2016 - 03:00 PM

And with this

SolCallback(1)=UpperGate
 
Sub UpperGate(Enabled)
Gate.Open=Enabled
End Sub

The number 1 must correspond to the solenoid of your table, and Gate to the gate name of your table.



#8 bord

bord

    Pinball Fan

  • Members
  • PipPipPipPip
  • 603 posts

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

  • Favorite Pinball: Star Gazer, Whirlwind, Frontier

Posted 14 September 2016 - 03:06 PM

Ok, I'll try it again tonight. Seems I did just that and it was always open. Nothing special as far as gate object settings in the editor? Mine was set up as Invisible, collidable, 2 way.



#9 kiwi

kiwi

    Pinball Fan

  • VIP
  • 2,670 posts

  • Flag: Italy

  • Favorite Pinball: Star Trek 25th Anniversary



Posted 14 September 2016 - 03:14 PM

No 2 way.



#10 bord

bord

    Pinball Fan

  • Members
  • PipPipPipPip
  • 603 posts

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

  • Favorite Pinball: Star Gazer, Whirlwind, Frontier

Posted 18 September 2016 - 04:22 PM

No 2 way.

 

That was the ticket. Thanks! One step closer to finishing Frontier.







Also tagged with one or more of these keywords: Frontier, Bally, Gate, Script, Solenoid