Thanks. This is what I was initially looking for.
Le 20/09/2025 à 18:54, Dan - aka BorgDog a écrit :
> I use this in yaml to end a game. basically posting the event end_game
> ends the game. it does not automatically plunge a ball in the shooter
> lane, but I'm sure I could add something to make it do that.
>
> timed_switches:
> game_cancel:
> switch_tags: start
> time: 5 s
> events_when_active: end_game
>
> On Saturday, September 20, 2025 at 8:19:30 AM UTC-7 Philip Dixon wrote:
>
> in python I use this:
> def kill_game(self, **kwargs):
>
self.machine.events.post <http://
>
self.machine.events.post>('autolaunch') # this fires any ball in
> the shooterlane, I have it set in my ball device to do this.
> self.machine.modes.game.end_game()
> self.machine.ball_controller.collect_balls(target='home,
> trough')
> self.machine.reset()
>
> On Saturday, September 20, 2025 at 4:02:34 PM UTC+1
mre...@gmail.com
> wrote:
>
> Hello. I did not find a way to force a game to end. In the time
> being, I did a small fix in modes/game/game.py to use a key
> tagged "reset" on top of a start request. Shall I push it to the
> project ?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "MPF Users" group.
> To unsubscribe from this topic, visit
https://groups.google.com/d/topic/
> mpf-users/wRshAvnTAYk/unsubscribe <
https://groups.google.com/d/topic/
> mpf-users/wRshAvnTAYk/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to mpf-
>
users+un...@googlegroups.com <mailto:
mpf-
>
users+un...@googlegroups.com>.
> To view this discussion visit
https://groups.google.com/d/msgid/mpf-
> users/f965d1e5-0331-4f75-8963-feec6b97c63en%
40googlegroups.com <https://
>
groups.google.com/d/msgid/mpf-users/f965d1e5-0331-4f75-8963-
> feec6b97c63en%
40googlegroups.com?utm_medium=email&utm_source=footer>.