Author Topic: Hat Scripts  (Read 1079 times)

I'm looking for a hat script that mounts via /examplehat and makes the head disappear, also one that mounts a hat and doesn't make the head disappear. Links to add-ons that have this are just as good.


Also to hide the head why not just hide that node right it into the code.

Does not remove head

Is this what you are looking for?
Yes, this will do. Thank you., though I'll leave the thread open in case.

dude they have hats...

dude they have hats...

You do not script, or not well at least, get out of this section.

dude they have hats...
Hur Derp.

This script is exactly the one I was looking for, works great :D

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)
Code: [Select]
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]);
}
}
}
}

I think it is "headskin" or something similar, not "head".

I think it is "headskin" or something similar, not "head".
It is "headskin",yes.

Already tried headskin 12 times, nothing D:


You tried:
Code: [Select]
%player.hideNode("headskin");?

You tried:
Code: [Select]
%player.hideNode("headskin");?
Yes it hides the head but never comes back after unmounting the hat :( Probably should of mentioned that...
* Packer facepalms.

Yes it hides the head but never comes back after unmounting the hat :( Probably should of mentioned that...
* Packer facepalms.
Did you added this to the part of the script where the hat unmounts?
Code: [Select]
%player.unhideNode("headskin");
« Last Edit: December 01, 2009, 04:11:58 AM by lordician »