Author Topic: Sims Crystal Hat  (Read 852 times)

Ok so a long time ago i began to work on a hat script using the form of a sims crystal..after getting help from the forums and a few friends i could never seem to get it to work so i relaced all the name of everything in the sims crystal script with the greek helmet one to test it.



Ok so heres my dillema... the hat shows up just its wedged in your head.. how do i raise it higher.. :$


Heres code

Code: [Select]
datablock ShapeBaseImageData(greekhelmetImage)
{
shapeFile = "./GreekHelmet.dts";
emap = true;
mountPoint = $HeadSlot;
offset = "0 0 0.1";
eyeOffset = "0 0 10";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = false;
colorShiftColor = "50.000 50.000 50.000 255.000";
};

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

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

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


Easy fix. Move the joint down on the model :/

Doesn't raising the third value (offset on z-axis) of offset do the same thing?

Doesn't raising the third value (offset on z-axis) of offset do the same thing?

Not sure?

I hope so

Off-Topic: I looked up Sims Crystal and one of the pictures it gave me research :/

Off-Topic: I looked up Sims Crystal and one of the pictures it gave me research :/

Code: [Select]

rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = false;
colorShiftColor = "50.000 50.000 50.000 255.000";
Just wondering, are these lines really required?
I mean, wouldn't "eulertomatrix" (0,0,0) output just (0,0,0) again?
Wouldn't scale (1,1,1) be default?
Wouldn't colorshift be off by default?
And if it's off, why do you give the color to color shift to, if colorshift is false?

I mean, wouldn't "eulertomatrix" (0,0,0) output just (0,0,0) again?
Euler is a set of 3d rotation/angle values (example "90 45 180" rotates 90 on the x, 45 on the y, 180 on the z or xzy if you're a crazy german). A matrix is basically a table (or a spreadsheet as I was taught it) of points. In this case it's a rotation matrix, which always involve trigonometry.
EDIT: I have no idea how matrices are represented in Torque though.. not on my windows install at the moment.
Ok so heres my dillema... the hat shows up just its wedged in your head.. how do i raise it higher.. :$
To move it up, set the 3rd value of the offset variable higher.
So probably try setting offset to "0 0 1" to start with, then moving that last value up or down to make it look how you want it.

To move it up, set the 3rd value of the offset variable higher.
So probably try setting offset to "0 0 1" to start with, then moving that last value up or down to make it look how you want it.

Yay.
I was right. :3

Euler is a set of 3d rotation/angle values (example "90 45 180" rotates 90 on the x, 45 on the y, 180 on the z or xzy if you're a crazy german). A matrix is basically a table (or a spreadsheet as I was taught it) of points. In this case it's a rotation matrix, which always involve trigonometry.
EDIT: I have no idea how matrices are represented in Torque though.. not on my windows install at the moment.To move it up, set the 3rd value of the offset variable higher.
So probably try setting offset to "0 0 1" to start with, then moving that last value up or down to make it look how you want it.

I understand what the function is, but is it required in that context?