Author Topic: Mount point?  (Read 780 times)

What is this things mount point in script, like hats are mounted to "$HeadSlot;"


Im gona test that, thank you.

It didnt work im trying to hide that like this:

Code: [Select]
datablock ShapeBaseImageData(testImage)
{
shapeFile = "./Shapes/Test2.dts";
emap = true;
mountPoint = $HeadSlot;
offset = "0 0 0.1";
eyeOffset = "0 0 0.4";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = false;
colorShiftColor = "0 0 0 255";
};

datablock HiddingHeadStuff(testHidding)
{
shapeFile = "./Shapes/blank.dts";
emap = true;
mountPoint = $VisorSlot;
offset = "0 0 0.1";
eyeOffset = "0 0 0.4";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = false;
colorShiftColor = "0 0 0 255";
};

function serverCmdtest(%client)
{
%player = %client.player;

if(isObject(%player))
{
if(%player.getMountedImage(2) $= nametoID(testImage))
{
%player.unmountImage(2);
%client.applyBodyParts();
%client.applyBodyColors();
}
else
{
%player.unmountImage(2);
%player.mountImage(testImage,2);

for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($hat[%i]);
}
}
}
}

};

function serverCmdtest(%client)
{
%player = %client.player;

if(isObject(%player))
{
if(%player.getMountedImage(2) $= nametoID(testHidding))
{
%player.unmountImage(2);
%client.applyBodyParts();
%client.applyBodyColors();
}
else
{
%player.unmountImage(2);
%player.mountImage(testHidding,2);

for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($hat[%i]);
}
}
}
}

Its a custom hat in BETA 00000000.1

Why do you have the same function twice?
Code: [Select]
datablock ShapeBaseImageData(testImage)
{
shapeFile = "./Shapes/Test2.dts";
emap = true;
mountPoint = $HeadSlot;
offset = "0 0 0.1";
eyeOffset = "0 0 0.4";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = false;
colorShiftColor = "0 0 0 255";
};

datablock HiddingHeadStuff(testHidding)
{
shapeFile = "./Shapes/blank.dts";
emap = true;
mountPoint = $VisorSlot;
offset = "0 0 0.1";
eyeOffset = "0 0 0.4";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = false;
colorShiftColor = "0 0 0 255";
};

function serverCmdtest(%client)
{
%player = %client.player;

if(isObject(%player))
{
if(%player.getMountedImage(2) $= nametoID(testImage))
{
%player.unmountImage(2);
%client.applyBodyParts();
%client.applyBodyColors();
}
else
{
%player.unmountImage(2);
%player.mountImage(testImage,2);

for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($hat[%i]);
}
}
}
}
Try that.

Other was for the second datablock that replaces the object in visorSlot.

You do know when you make the same function, it overwrites the previous one?

Its not the same

Code: [Select]
if(%player.getMountedImage(2) $= nametoID(testImage))
Code: [Select]
if(%player.getMountedImage(2) $= nametoID(testHidding))

Exactly... one overwrites the other one.

Okay, what about this:
Code: [Select]
%player.hideNode($hat[%i]);Can it be used to hide like:
Code: [Select]
%player.hideNode($visor[%i]);?!?

Its the same.
Code: [Select]
function serverCmdtest(%client)
{
Code: [Select]
function serverCmdtest(%client)
{

Okay i belive and i was wrong sorry...