From 8937fffc5eb2d23fccb9d45c7cffd8474ee506b5 Mon Sep 17 00:00:00 2001 From: kobewi Date: Sat, 16 Oct 2021 13:48:38 +0200 Subject: Add a warning about infinite Tween loops --- doc/classes/Tween.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/classes') diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index f94018c96b..488a5aa340 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -146,6 +146,7 @@ Sets the number of times the tweening sequence will be repeated, i.e. [code]set_loops(2)[/code] will run the animation twice. Calling this method without arguments will make the [Tween] run infinitely, until it is either killed by [method kill] or by freeing bound node, or all the animated objects have been freed (which makes further animation impossible). + [b]Warning:[/b] Make sure to always add some duration/delay when using infinite loops. 0-duration looped animations (e.g. single [CallbackTweener] with no delay) are equivalent to infinite [code]while[/code] loops and will freeze your game. -- cgit v1.2.3