import node; //util to generate and init a child node of a given parent fn makeChild(parent: opaque, fname: string) { var child: opaque = loadNode(fname); parent.pushNode(child); child.initNode(); return child; } fn onInit(node: opaque) { for (var i = 0; i < 20; i++) { node.makeChild("scripts:/tilemap/tile.toy"); } node.freeChildNode(10); var n = node.getChildNode(10); for (var i = 0; i < 20; i++) { //this would originally prune tombstones... node.makeChild("scripts:/tilemap/tile.toy"); } print node.getChildNodeCount(); var m = node.getChildNode(10); print n; print m; }