I'm tring to tween a bunch of sprites (about a hundred) to appear on screen. I wan't them to appear one by one, with a small interval inbetween. This is easily done:
for sprite in sprites:
tween.tween_callback(sprite.show)
tween.tween_interval(0.1)
I also want to scale them as they appear, using something like this:
tween.tween_property(sprite, "scale:x", 1.0, 1).from(0.0)
But I haven't found a way to do this without it increasing the interval inbetween each sprite. The interval should stay at 0.1, but instead it takes much longer because it is waiting for the scaling tweener to finish. I tried various combinations using .parallel()
and .chain()
but the delay is always there.
I did fix it by using .set_delay()
like this:
tween = create_tween().set_parallel()
var delay := 0.1
for i in sprites.size():
tween.tween_callback(sprites[i].show).set_delay(i * delay)
tween.tween_property(sprites[i], "scale:x", 1.0, 1).from(0.0).set_delay(i * delay)
But then I'm just manually setting each tweener's delay and not actually using any chaining.
So is it even possible to chain them like this?