Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | DaddyMonster |
Got a really weird issue, my setget methods aren’t being called:
var turn = 0.0 setget set_turn, get_turn
func set_turn(value):
print("set_turn called")
turn = clamp(value, -0.01, 0.01)
func get_turn():
print("get_turn called")
return turn
Nothing prints, my clamp isn’t run. The instance variable updates, but it doesn’t call the setter and getter methods.
The odd thing is I’ve got setgets in a singleton and they’re working fine but when I add them to node scripts they just don’t run. This is the second node script this has happened on now. I’ve got no errors or warnings in my project.
Am I missing something obvious here?