Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Mode Starting Order

41 views
Skip to first unread message

Laurent Maillard

unread,
Jan 25, 2025, 9:26:31 AMJan 25
to MPF Users
Hi guys,

Quick question :
At ball start, does the modes start in a random order or is there some king of order ?
And if there is an order, can you precise what it is ?

Thank you all

Laurent (FR)

Anthony van Winkle

unread,
Jan 25, 2025, 3:18:51 PMJan 25
to MPF Users
Everything in MPF is driven by events, and those are handled in the order given. If you want to specify one event handler to be processed ahead of another, you can use the priority to guarantee (higher priority happens first) by adding a number to the event

event_player:
  mode_base_started.100: start_first_mode
  mode_base_started.60: start_second_mode

Note that each mode has its own startup routines that can take a number of cycles, so while the first mode will begin starting up before the second one, they will still be doing startup stuff at the same time. If you want to ensure that one mode is started before starting another, use the first mode's events to trigger the second.

event_player:
  mode_base_started: start_first_mode
  mode_first_mode_started: start_second_mode

Using specific events is the surest way to guarantee that one thing has happened before another starts.

Laurent Maillard

unread,
Jan 27, 2025, 5:48:38 AMJan 27
to MPF Users
Ok anthony, so there is no default start order based on the mode priority or something like that.

Thank you for the tips

Laurent
Reply all
Reply to author
Forward
0 new messages