I'm starting now to learn lsl and I have a "big" problem. Thanks in advance for your time and help!
I'm trying to build a bar that rotates when you push 1 of two buttons. A total of 3 prims, linked togheter:
bar= root
button ON= child
button OFF= child
But when I click on 1 button, all the linkset is rotating...How can I make the 2 buttons fixed and only the bar rotating? Is it possible? Below my simple code (I know that I have to add something else, but I don't know very well...)
CODE
default
{
touch_start(integer X)
{
string button = llGetLinkName(llDetectedLinkNumber(0));
if (button=="ON")
{
llSetText("I'm rotating!", <0,1,0>, 1.5);
llTargetOmega(<0,10,0>,PI/6,1);
}
else if (button=="OFF")
{
llSetText("Stopped",<1,0,0>, 1.5);
llTargetOmega(<0,0,0>,PI/6,1.0);
}
}
}
Thank you very much for your help and your time !
Ludo