I have 1 sprite with 9 copies on the layer with UIDs 0-8. They are displaying on the Grid, each grid is of width 200.
I want to shuffle their positions on the start of the layout.
Please let me know how can I do it.
offhand, a foreach for the sprites, and the position being set to some x of floor(random(3)) * 200, and y of same, offset from your origin x,y position for the grid. Tweak as necessary.
EDIT: Umm, yeah, don't do this. Follow Magistross' reply below, which is what I intended but somehow completely spaced. Blaming Canada.
aerger Thank you, I will try it
You ought to remove the random element from the positionning events, otherwise you'll most likely end up with sprites occupying the same spot. What you need is random picking and fixed positionning. Here's an example.
Magistross that is brilliant thank you very much. It does exactly what I was trying to do.
Develop games in your browser. Powerful, performant & highly capable.
When I went to reply, random picking what I was thinking/planning, but when I wrote it out, something else came out. It was late. Good catch.