Use instance variable call it ID , and then for each sprite (or instance of same sprite) add 1. Add array plugin, and add the following: On start of layout ==> set array XY : X = sprite.ID Y: 1
X value: sprite.X
Y value : Sprite.Y
Hope it helps, try it out