Running Godot 4.4.1
Heya, I have a Tween set up as usual, but I want its random values to re-roll every loop.
AS you see, I have a randf_range() call in there. This seems to be rolled only once, when the tween is called for the first time, and after that, the target value never changes. So: did I make a mistake here or is this expected behavior? And can I work around it?
func do_lighting() -> void:
var light = $PointLight2D
var t_light: Tween = create_tween().bind_node(spacelight).set_loops().set_parallel(true)
t_light.tween_property(self, "progress_ratio", 1.0, 10.0)
t_light.tween_property($PointLight2D, "energy", randf_range(1.60, 2.0), 5.0)
t_light.chain().tween_callback(reset_light)
func reset_light() -> void:
progress_ratio = 0.0