Delete child images assigned to parent image?
by amaranthia · in Torque Game Builder · 03/05/2008 (12:32 pm) · 2 replies
I've run into a little problem...
In my game, I have a parent image that can have up to 100 children images mounted to it. I've figured out how to mount an image to another image through scripting, but I'm not sure how to delete a bunch of child images assigned parent image without deleting the parent image.
Is there an easy way to delete a bunch of images that are mounted to a parent image?
In my game, I have a parent image that can have up to 100 children images mounted to it. I've figured out how to mount an image to another image through scripting, but I'm not sure how to delete a bunch of child images assigned parent image without deleting the parent image.
Is there an easy way to delete a bunch of images that are mounted to a parent image?
Torque Owner Dan Maruschak
%objList = %mainObject.getAllMountedChildren(); for (%i=0; %i < getWordCount(%objList); %i++) { %child = getWord(%objList, %i); %child.delete(); }