Material Box

Material Box

WEB Design & Material Images

Godot - Create Tween finished signal

Godot

Code example to create Tween finished signal in GDScript.


Create Tween finished signal.
Create a new Tween with create_tween() and play it with play().

Specify "finished" in connect() to emit signal when Tween finishes.
Code example creates _on_tween_finished() function.

func _ready():
	var tween = create_tween()
	tween.tween_property(self, "scale", Vector2(3, 3), 1)
	tween.play()
	# Create Tween finished signal
	tween.connect("finished", _on_tween_finished)

func _on_tween_finished():
	print("Tween Finished")

Godot

TitleGodot - Create Tween finished signal

CategoryGodot

Created

Update

AuthorYousuke.U