Having a little issue with this skill shot tutorial
https://missionpinball.org/latest/cookbook/skillshot_with_auto_rotate/This tutorial was originally written for 5-drop targets, but tweaked it for my 5 top rollover lanes.
My code will be below.
All testing is being done virtually in MPF.
mpf 0.56.2
mpf-mc 0.56.1
mpf-monitor 0.56.1
On the first ball it works fine showing just one light moving left to right, on plung the light stops and flashes like it should. If the flasing shot is hit your awarded with skillshot value and it goes back into base/regular play, if not it goes into base/regular play.
The problem happens with the second and third balls.
On the second ball skill shot there now two lights moving left to right and on the third ball skill shot there are two or sometimes three lights moving left to right.
I have no clue what I screwed up. Anybody else have a clue?
If anyone knows of a skillshot or similar mode that scans back and forth requiring to hit a lit/flashing target please let me know,
Thanks,
Bowman
My yaml/code
#config_version=5
mode:
start_events: ball_starting
stop_events: stop_mode_skillshot
priority: 1000
event_player:
timer_skillshot_rotate_stopped:
- advance_skillshot_01{device.shots.skill_rollover_01.state==1}
- advance_skillshot_02{device.shots.skill_rollover_02.state==1}
- advance_skillshot_03{device.shots.skill_rollover_03.state==1}
- advance_skillshot_04{device.shots.skill_rollover_04.state==1}
- advance_skillshot_05{device.shots.skill_rollover_05.state==1}
skillshot_hit: stop_mode_skillshot
playfield_active: stop_mode_skillshot|2s
shot_profiles:
skillshot_profile:
advance_on_hit: false
states:
- name: off
show: off
- name: on
show: on
- name: lit
show: flash
variable_player:
skill_rollover_lanes_lit_hit:
score: 10000
sound_player:
skill_rollover_lanes_lit_hit:
attract_voice: # pulling from a sound pool
action: play
loops: 0 # -1 will make the sound loop not need here
volume: 0.5
show_player:
skill_rollover_lanes_lit_hit:
rollover-flash:
speed: 10
loops: 5
priority: 1
shot_groups:
skill_rollover_lanes:
shots:
- skill_rollover_01
- skill_rollover_02
- skill_rollover_03
- skill_rollover_04
- skill_rollover_05
# disable_rotation_events: s_plunger_lane_inactive
# rotate_left_events: s_left_flipper_active
# rotate_right_events: s_right_flipper_active
rotate_right_events: timer_skillshot_rotate_tick
timers:
skillshot_rotate:
tick_interval: 1s # tick intervals can 0.5s, 1s, 1.5s whatever is needed for your specific mode
start_running: true
control_events:
- event: s_plunger_lane_inactive
action: stop
shots:
skill_rollover_01:
switch: s_rollover_01
advance_events: mode_skillshot_started, advance_skillshot_01
profile: skillshot_profile
show_tokens:
light: l_top_rollover_light_1
skill_rollover_02:
switch: s_rollover_02
advance_events: advance_skillshot_02
profile: skillshot_profile
show_tokens:
light: l_top_rollover_light_2
skill_rollover_03:
switch: s_rollover_03
advance_events: advance_skillshot_03
profile: skillshot_profile
show_tokens:
light: l_top_rollover_light_3
skill_rollover_04:
switch: s_rollover_04
advance_events: advance_skillshot_04
profile: skillshot_profile
show_tokens:
light: l_top_rollover_light_4
skill_rollover_05:
switch: s_rollover_05
advance_events: advance_skillshot_05
profile: skillshot_profile
show_tokens:
light: l_top_rollover_light_5
slide_player:
mode_skillshot_started:
widgets:
- type: image
image: blank-bg
widget_player:
mode_skillshot_started: ### trigger
shoot_skillshot_widget: ### widget defined on widgets yaml
action: add
widget_settings:
z: -1 # this places the widget above all other slides
skill_rollover_lanes_lit_hit: ### trigger
shoot_skillshot_widget:
action: remove
award_skillshot_widget: ### widget defined on widgets yaml
action: add
widget_settings:
z: -1 # this places the widget above all other slides
# skill_rollover_lanes_unlit_hit: ### trigger
# shoot_skillshot_widget:
# action: remove
# missed_skillshot_widget: ### widget defined on widgets yaml
# action: add
# widget_settings:
# z: -1 # this places the widget above all other slides