I can't get the head to disappear, I had it working for a while then all of a sudden I can't remember how I did it.
This is what I got. (HAT is just to cover up the real name)
datablock ShapeBaseImageData(HATImage)
{
shapeFile = "./HAT.dts";
emap = true;
mountPoint = $HeadSlot;
offset = "0 0 0";
eyeOffset = "0 0 0";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = true;
colorShiftColor = "0.9 0.9 0.9 1.000";
};
function serverCmdHAT(%client)
{
%player = %client.player;
if(isObject(%player))
{
if(%player.getMountedImage(2) $= nametoID(HATImage))
{
%player.unmountImage(2);
%client.applyBodyParts();
%client.applyBodyColors();
}
else
{
%player.unmountImage(2);
%player.mountImage(HATImage,2);
for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($hat[%i]);
%player.hideNode($accent[%i]);
%player.hideNode($head[%i]);
}
}
}
}