self.machine.extra_ball_controller¶
-
class
mpf.core.extra_balls.
ExtraBallController
(machine)¶ Bases:
mpf.core.mpf_controller.MpfController
Tracks and manages extra balls at the global level.
Accessing the extra_ball_controller in code
There is only one instance of the extra_ball_controller in MPF, and it's accessible via
self.machine.extra_ball_controller
.Methods & Attributes
The extra_ball_controller has the following methods & attributes available. Note that methods & attributes inherited from base classes are not included here.
-
award
(**kwargs)¶ Immediately awards an extra ball.
This event first checks to make sure the limits of the max extra balls have not been exceeded.
-
award_lit
(**kwargs)¶ Awards a lit extra ball.
If the player does not have any lit extra balls, this method does nothing.
-
light
(**kwargs)¶ Lights the extra ball.
This method also increments the player's extra_balls_lit count.
-
relight
(**kwargs)¶ Relights the extra ball when a player's turn starts.
This event does not post the "extra_ball_lit_awarded" event so you can use it to not show the extra ball awards when a player starts their turn with an extra ball lit.
-