Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | MaaaxiKing |
I have a Scene with a Button and this Button has a Script. The Button is connected to its script via the signal function _on_Button_pressed(mode)
. mode
is the extra call argument and of type String. Now, the problem is that I’ve set a default value for mode
and I have 5 instances of the Button in another scene. Unfortunately, I want one of these buttons to have a different value for mode
but everytime I start the game, this value will be overriden because all Scenes are going to be saved.
Is there an easier way than changing its value after the game start through one line of script ($Button.connect("pressed", self, "_on_Button_pressed", [other_value_than_default]
)?