Here are my body removal functions, this should show you the variables containing the part names.
function clearPlayerNodes(%player)
{
if (isObject(%player))
{
for (%i = 0; $accent[%i] !$= ""; %i++) %player.hideNode($accent[%i]);
for (%i = 0; $chest[%i] !$= ""; %i++) %player.hideNode($chest[%i]);
for (%i = 0; $hat[%i] !$= ""; %i++) %player.hideNode($hat[%i]);
for (%i = 0; $hip[%i] !$= ""; %i++) %player.hideNode($hip[%i]);
for (%i = 0; $LArm[%i] !$= ""; %i++) %player.hideNode($LArm[%i]);
for (%i = 0; $LHand[%i] !$= ""; %i++) %player.hideNode($LHand[%i]);
for (%i = 0; $LLeg[%i] !$= ""; %i++) %player.hideNode($LLeg[%i]);
for (%i = 0; $pack[%i] !$= ""; %i++) %player.hideNode($pack[%i]);
for (%i = 0; $RArm[%i] !$= ""; %i++) %player.hideNode($RArm[%i]);
for (%i = 0; $RHand[%i] !$= ""; %i++) %player.hideNode($RHand[%i]);
for (%i = 0; $RLeg[%i] !$= ""; %i++) %player.hideNode($RLeg[%i]);
for (%i = 0; $secondPack[%i] !$= ""; %i++) %player.hideNode($secondPack[%i]);
}
}
function clearAllPlayerNodes(%player)
{
if (isObject(%player))
{
clearPlayerNodes(%player);
%player.hideNode("headSkin");
%player.hideNode("LSki");
%player.hideNode("RSki");
%player.hideNode("skirtTrimLeft");
%player.hideNode("skirtTrimRight");
}
}
I didn't notice it at the time but for each list of objects, there is numPref, so you could get the number of variables stored in the $LArm array by using $numLArm.
Someone else please explain this if someone doesn't understand. Also, please don't do something cheap with this info.