If it's a hat you'll either have to package the server code for when hats are mounted, or modify the server.cs
I'm leaning toward packaging the server code in the specific hatpack I want with emitters.
However, I have no idea how that should be...
And going back to the emitter on the image thing, is there any way to specify a node name?
Or does it use any node available?
Also, I tried to get the code to work for the /hattest emote just to test.
It didn't work. This is what my code looks like as a test.
datablock ShapeBaseImageData(HatTestImage)
{
shapeFile = "./Cigar.dts";
emap = true;
mountPoint = $HeadSlot;
offset = "0 0 0";
eyeOffset = "-1 0 0.4";
rotation = eulerToMatrix("0 0 0");
scale = "0.1 0.1 0.1";
doColorShift = true;
colorShiftColor = "0.392 0.196 0.0 1.000";
stateEmmiter[1]=IceBlastAmbient;
};
datablock ParticleData(IceBlastAmbient)
{
dragCoefficient = 5;
windCoefficient = 0.0;
gravityCoefficient = 0;
inheritedVelFactor = 0;
constantAcceleration = 10.0;
lifetimeMS = 600;
lifetimeVarianceMS = 0;
spinSpeed = 100.0;
spinRandomMin = 50.0;
spinRandomMax = 150.0;
useInvAlpha = false;
animateTexture = false;
textureName = "base/data/particles/chunk";
//Interpolation variables
colors[0] = "0.5 0.5 0.9 1";
colors[1] = "0.3 0.3 0.7 1";
colors[2] = "0.3 0.3 0.6 1";
sizes[0] = 0.5;
sizes[1] = 0.3;
sizes[2] = 0.00;
times[0] = 0.0;
times[1] = 0.1;
times[2] = 1.0;
};
datablock ParticleEmitterData(IceBlastAmbientEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 1;
ejectionVelocity = 0.4;
ejectionOffset = 0;
velocityVariance = 0.0;
thetaMin = 0;
thetaMax = 180;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = IceBlastAmbient;
useEmitterColors = false;
uiName = "IceBlast Normal";
};
function serverCmdHatTest(%client)
{
%player = %client.player;
if(isObject(%player))
{
if(%player.getMountedImage(2) $= nametoID(HatTestImage))
{
%player.unmountImage(2);
%client.applyBodyParts();
%client.applyBodyColors();
}
else
{
%player.unmountImage(2);
%player.mountImage(HatTestImage,2);
for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($hat[%i]);
%player.hideNode($accent[%i]);
}
}
}
}