Hi all,
I have a flipper that I want to do a 2s auto pulse when a certain event is received. Here's a sterilized version of what I currently have, then I'll talk about what's happening in the game with this setup.
flippers:
flipper_a:
main_coil: c_flipper_a
hold_coil: c_flipper_a_hold
activation_switch: s_flipper_a_button
enable_events: e_active_event, e_special_condition_enable
disable_events: e_inactive_event, e_special_condition_disable
sw_flip_events: e_special_condition_flip
sw_release_events: e_special_condition_deflip
When the mode starts, e_active_event happens, flipper enables, works normally.
Then at a certain point, the e_inactive_event occurs and the flipper disables, is disabled normally.
A moment later, I want to pulse the flipper for 2s (to release any trapped ball under the flipper, don't ask, it would take too long to explain and it's not really relevant).
So to pulse the flipper, I send the e_special_condition_enable event to enable it, this works normally.
Then 1s later, I send the e_special_condition_flip event. The logs show it enabling the main and hold driver for the coil. But it doesn't flip.
Then 2s later, I send the e_special_condition_deflip event. The logs show it disabling the drivers. But since it didn't flip, nothing happens.
Then 1s later, I send the e_special_condition_disable event to return the flipper to its normal disabled state.
So it's like it should be working, but nothing happens. But here's where it gets interesting. If I manually flip the flipper with the button during the 2s window that the flipper should be flipping on its own, it flips AND HOLDS for the rest of the 2s window until the e_special_condition_deflip occurs and releases it.
I'm at a bit of a loss. It's like it wants to work, but... doesn't... unless I "help" it a little with the flipper button. Is it that I'm not pulsing it long enough doing it this way (it's default is 21ms, which maybe isn't long enough to pulse it to where the hold coil can grab and hold it, though that works fine for an actual flip)? I don't see a way to change the pulse times.
Which leads me to the real question: Is this the way I should be trying to do this? I see that I could use a "pulse_event" directly on the coil, but I believe that will also follow the short default pulse time for the coil and won't let me "hold" it for 2s. Should I set up a second clone flipper, like in the "weak flipper" example? But if so, I still don't see a way to override the default pulse time of the coil.
Update: So I discovered the main_coil_overwrite: option for flippers, and I tried making a clone flipper like in the "weak flippers" example as follows:
flippers:
flipper_a:
#Removed all special condition handling
main_coil: c_flipper_a
hold_coil: c_flipper_a_hold
activation_switch: s_flipper_a_button
enable_events: e_active_event
disable_events: e_inactive_event
flipper_a_auto:
#New special flipper for handing the special condition for auto flipping
#Activation switch removed so you can't manually flip even when enabled
main_coil: c_flipper_a
hold_coil: c_flipper_a_hold
enable_events: e_special_condition_enable
disable_events: e_special_condition_disable
sw_flip_events: e_special_condition_flip
sw_release_events: e_special_condition_deflip
main_coil_overwrite:
pulse_ms: 1000
I thought for sure this was going to do it, but in the log (when running virtual on my PC), it shows it's still pulsing it for only the usual default 21ms. I also tried it using the hold_coil_overwrite set, but same thing, log shows normal pulse time for that coil.
I'll try pushing this to the physical game anyways to see what happens, but my expectations are low based on what I'm seeing on my local logs. But I suspect I'm still either missing something or misusing the coil_overwrite somehow. Any advice would be much appreciated!
Thanks,
Kaydee