Z-sorting?

I was wondering if there was a way to Z-sort objects or make it so some objects be rendered before the others.

Also was wondering if I could change these on the fly.

Any information would be great, thanks!

See “addChild (CCNode *pChild, int zOrder)” and “reorderChild (CCNode *pChild, int zOrder)” in CCNode.

Why thank you!

This looks to be what I need.