Material Box

Material Box

WEB Design & Material Images

Godot - Implement processing at Tween finish with await

Godot

Code example to implement processing at Tween finish using await in GDScript.


The code example creates a Tween, and adds processing to execute at Tween finish using await.
By using "await tween_name.finished", subsequent processes will execute after the Tween finishes.

func _ready():
	var tween = create_tween()
	tween.tween_property(self, "scale", Vector2(3, 3), 1)
	tween.play()
	# Execute at Tween finish
	await tween.finished
	print("Tween Finished")

Godot

TitleGodot - Implement processing at Tween finish with await

CategoryGodot

Created

Update

AuthorYousuke.U