Topic was automatically imported from the old Question2Answer platform.
Asked By
OgGhostJelly
I have a variable attached to a setter function and I want to be able to change the variable’s value without calling the setter. they had this functionality in Godot 3 but removed it in Godot 4.
example:
var my_variable: set = _my_variable_setter
func _my_variable_setter(value) -> void:
my_variable = value
print("Hello World")
func _ready() -> void:
my_variable = 12
>>> Hello World!
# prints 'Hello World!' when I don't want it to.