self.machine.kickbacks.*

class mpf.devices.kickback.Kickback(self_inner, *args, **kwargs)

Bases: mpf.devices.autofire.AutofireCoil

A kickback device which will fire a ball back into the playfield.

Accessing kickbacks in code

The device collection which contains the kickbacks in your machine is available via self.machine.kickbacks. For example, to access one called "foo", you would use self.machine.kickbacks.foo. You can also access kickbacks in dictionary form, e.g. self.machine.kickbacks['foo'].

You can also get devices by tag or hardware number. See the DeviceCollection documentation for details.

Methods & Attributes

Kickbacks have the following methods & attributes available. Note that methods & attributes inherited from base classes are not included here.

disable(**kwargs)

Remove switch handler and call parent.

enable(**kwargs)

Add switch handler and call parent.