This is the documentation the latest work-in-progress version of MPF!

This is the documentation for MPF 0.56, which is the “dev” (next) release of MPF that is a work-in-progress. This is probably ok, and means you’ll be on the latest, cutting-edge version of MPF.

However, if you want a more stable version, select the v:stable version from the lower-left corner of this page, which is the most recent version that is not getting new updates.

If you are new to MPF, we have recently rewritten the installation process which only applies to this “latest” 0.56, so you probably want to stay here because the prior installation process doesn’t work on the latest OS and Python versions.

Timed Switches

Related Config File Sections

MPF includes functionality to manage “timed_switches” which are scenarios when a single switch is continuously active (or inactive, depending on the settings) for a set period of time.

A classic example of this is the flipper “cradling” where a player holds a flipper button in for a few seconds. In almost all modern machines, this is used to trigger a “player info” screen that shows the player’s score, how much bonus they have built up, high scores, etc.

Flipper cradling is also used to reset (and pause) the ball search timer, since a player could be holding a ball and drinking a beer, meaning no switch hits will happen, but the ball search should not start.

In fact MPF’s default config file (which is automatically used in all games) includes a timed_switches: section for flipper cradling and automatically creates flipper_cradle and flipper_cradle_release events (as long as you tag your flipper switches with left_flipper and right_flipper).

Note that timed switches are similar to, but not the same as combo switches.

Monitorable Properties

For dynamic values and conditional events, the prefix for timed switches is device.timed_switches.<name>.

List of switches that are currently active past the time that this timed_switches: section is set for.