Child Sprites

Sprites can have children which are assigned in the sprite's "having" clause.
You do not need to launch a child sprite. Child sprites are automatically launched when their parent sprite is launched.
To assign multiple children to a sprite, list them inside parenthesis. "where children=(c1,c2,c3)"
NOTE: if there is only one child sprite, do NOT use paranthesis for the list. Children sprites are subject to all the alterations and mutations of their parents.

One child


editable

2 children


editable

Children of children


editable

Assigning a parent


editable

Default parent


editable

Attaching Children

Normally when you add or remove a sprite from a parent, the child sprite is mapped to and from the parent's local coordinate system. This may show the child sprite jump on the canvas from its original position to the same coordinates on the parent's system.

To insert or remove a child sprite from a parent, but to retain its same position on the canvas, use "attach" and "detach".


editable