Let’s say I want a object to be set at a current rotation but when I turn a second prim and click it, it will turn the same rotation but not change the beginning rotation it begins at.
The two basic scripts below is an attempt try to understand rotation, but I am unsure where to start. If someone could give the formula needed to make this work I can play with the script and learn from it.
The part that needs to be changed is “NewRot = (vector)message;”. I need to get the objects llGetRot and somehow apply the rotation to it.
Script that listens to turn according to the second prim
CODE
vector NewRot;
default
{
state_entry()
{
llListen(222,"","","");
}
listen(integer channel, string name, key id, string message)
{
NewRot = (vector)message;
llSetRot(llEuler2Rot(NewRot));
}
}
Script that tells second prim it's roation.
CODE
default
{
state_entry()
{
}
touch_start(integer total_number)
{
llSay(222, (string)llGetRot());
}
}
PS: I think I am using
CODE
wrong. It has been a long time since I posted. There is a way to make scripts appear in script form I think?

