event_player:

Config file section

Valid in machine config files YES
Valid in mode config files YES
Valid in shows YES

Note

This section can also be used in a show file in the events: section of a step.

You can use the event_player: section of your config files to cause additional events to be automatically posted when a specific event is posted. The event_player can be thought of as a really simple way to implement game logic. (e.g. “When this happens, do this.”)

If you add this section to your machine-wide config file, the entries here will always be active. If you enter it into a mode-specific config file, entries will only be active while that mode is active.

This is an example:

event_player:
    ball_starting:
        - show_ball_start_animation
        - play_start_sound
        - start_first_mode
    ball_ending:
        - show_ball_ending_animation
        - play_drain_sound
This example is tested to be valid MPF config. However, it is not integration tested.
event_player:
    ball_starting:
        - show_ball_start_animation
        - play_start_sound
        - start_first_mode
    ball_ending:
        - show_ball_ending_animation
        - play_drain_sound

See Event player for details.