How to initialise player values with a setting ? #153
Replies: 2 comments
-
Mmm, yes initial values are not setup with placeholders, unfortunately. The easiest workaround would be to use a variable player and hook into the player_added event to set the value, if that's your approach. The more conventional way would be to use a counter to track how many bashes the player has hit, and then compare if that value is greater than the machine setting for how many bashes are required. If the mode is disabled, you could either set the value impossibly high (32767) or set it to |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer. I'm sorry that placeholder cannot be used. But I will try your solution. Thank you ! |
Beta Was this translation helpful? Give feedback.
-
I would like to initialise a player variable with a value stored in the settings.
I tried to have the player_vars in the config file this way:
And a settings:
But Unfortunately, mpf crashes at start:
It appears that players_vars -> initial_value can not use placeholder value.
So how can I do to initialise the values I want the user can customise ?
I though of a "proxy" mode that do all the initialisation, is it the way to go ?
Beta Was this translation helpful? Give feedback.
All reactions