Make multiple instances of a single AnimatedSprite2D start to play randomly

The scene has ~14 objects of the same sprite and all play in sync, i.e., all go through the frames at the same speed at the same time, from the first to the last. The speed is fine but starting each randomly or at least staggered would be much better.

With tiles, it is simple to have them start each randomly. But these are not tiles.

So, how is this done with AnimatedSprite2D?

Should I use AnimationPlayer instead?

This is a very simple sprite, btw, just two frames that swap every 0.25 seconds. So the start delay would be something like randf_range( 0.05, 0.2 )

Thank you all.

1 Like

In case anyone has the same problem.

Two options:

  1. Give each sprite a slightly different speed (~0.01s). Soon they will be out of sync.
  2. Turn ‘autoplay’ off and stagger the start of each sprite with an await and some small random value.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.