Sprite creation auto depthing

Can i just use createSprites in a specific order so I don’t have to assign a depth to them manually? Like:

var frontground = createSprite(600, 600);
var stage = createSprite(600, 600);
var background = createSprite(600, 600);

and their depths would be so:

frontground.depth == 3
stage.depth == 2
background depth == 1

Hi @azurirou,

Correct. The first sprite created is automatically placed 1st in “layers” so it is all the way in the back in terms of order of sprites. So if you place them in the code in the order you want them to appear, you are good!! I honestly didn’t know there was a depth property. Cool :sunglasses:!!

~Michelle

wow thanks! i felt like assigning it manually was weird :slight_smile: