All code in root.

this is kinda fun


import bge


cont=bge.logic.getCurrentController()


own=cont.owner


if own.children!=None:
    for objects in own.childrenRecursive:
        X=0
        for objects in objects.children:
            X=X+1
        if X==0:
            if 'prop' not in objects:
                objects['prop']=100
            else:
                ##print(objects['prop'])
                objects['prop']=objects['prop']-1
                objects.applyMovement((0,0,.05),1)
                objects.applyRotation((0,0,1),1)
                objects.localScale.x*=1.001
                objects.localScale.z*=.95
                objects.localScale.x*=1.001 
                if objects['prop']<0:
                    scene=bge.logic.getCurrentScene()
                    add=scene.addObject("Sphere",objects,10)
                    objects.endObject()      
            

Here be an example…

Yar.

Attachments

RecursiveDestruction.blend (890 KB)