Hi everyone!
I am working on a Age of Empires 2 homebrew pinball, and have started implementing code in MPF connected to VPX with the MPF to VPX Bridge, so I can do some programming until I get the solidworks template done and can start the physical process.
I am having problems getting the logic around manual plunger in VPX to work. Is it okay that I ask it here?
In my PF config, i have the following related to the plunger: (I read another thread here, regarding combo plunger, but its in MPF without Visual Pinball):
config.yaml:
______________
switches:
s_plunger_lane:
number: 7
tags: plunger_lane
coils:
c_plunger_eject:
number: coil7
default_pulse_ms: 100
ball_devices:
bd_trough:
tags: trough, home, drain
ball_switches: s_trough_1, s_trough_2, s_trough_3
eject_coil: c_ballrelease
eject_targets: bd_plunger
entrance_count_delay: 300ms
bd_plunger:
ball_switches: s_plunger_lane
entrance_count_delay: 300ms
eject_timeouts: 3s
eject_coil: c_plunger_eject
mechanical_eject: true
-------------------------------------------------------------------
VPX script (Basically copied the MPF to VPX bridge demo script, which has autoplunger):
Sub UpdateSolenoids(SolNoPar,StatePar)
select Case SolNoPar
Case "coil7": Sol7(StatePar) 'Auto-Plunger
End Select
End Sub
'Sol7 Auto-Plunger
Sub Sol7(enabled)
if enabled Then
Plunger.Pullback
Plunger.Timerenabled = True
end If
End Sub
Sub Plunger_Timer
Plunger.Timerenabled = False
Plunger.Fire
PlaySound "plunger",0,1,AudioPan(Plunger),0.25,0,0,1,AudioFade(Plunger)
End Sub
-----------------------------
As it is now it is autolaunching. I tried marking the plunger in VPX as mechanical, but it still attempts to autolunch, it just does not manage it.
I am sure the solution is quite obvious, but I have been sitting with this too long so need to reach out, there is something I am missing =)
Thanks!
Kind regards,
Morten Andre