spawn cloned sprites, each playing a different animation?

Hey all,

How could I populate my game's screen with several instances of a Sprite object?
Either scattered randomly or in incremental positions like 200,30 200,60 200,90 200,120..

Another problem: Say the Sprite has 3 variations of an "idle" animation. I'd like each of these spawned sprites to randomly play one of the idle anims, not all the same one.

Any help is greatly appreciated.

:sad: 😉 :crazy: 😉 😉
Try this .capx and see if it helps. It has contains two examples. First one creates sprites at a random location on screen and set animation to a choice at random of three. And an organized column and row version that also sets the animation to a choice at random of three. Tweaking the X and Y of the system create action can get you pretty much any organized or disorganized pattern you wish.


Example .CAPX download
Image
Thank you so much onzephyr, it is suddenly so clear how to use the loopindex..

I will use this in my Skeletor in Space game (you can find it on the "in Development" Forum).

:dead: 😀 😀 🙂 :grin:

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=76506