06-16-2008 08:34
Im trying to learn LSL but its written in greek to me, so mostly I open free scripts and try to twist them to what I want. Right now for build Im making I need a object to "hinge" on touch. I grabbed a open/close script and removed some the sounds and automatic closer.

problem Im having is I want it to flip 180 but its only going 90 degrees.

Im assumming this line is what needs changed?

llSetRot(llEuler2Rot(<0, 0, direction * PI_BY_TWO>;) * llGetRot());


Heres whats left of the script I butchered
**********************************************

float direction = 1.0;
float volume = 0.5;







default {


state_entry() {
state open;
}
}



state closed {


state_entry() {

llSetRot(llEuler2Rot(<0, 0, direction * PI_BY_TWO>;) * llGetRot());

}



touch_start(integer total_number) {
state open;
}


{
state open;
}



timer()
{
llSetTimerEvent(0.0);
}
}



state open {


state_entry() {

llSetRot(llEuler2Rot(<0, 0, -direction * PI_BY_TWO>;) * llGetRot());

llSetTimerEvent(delay);
}



on_rez(integer start_param) {
state closed;
}



touch_start(integer total_number) {
state closed;
}



collision_start(integer total_number)
{

}



timer()
{
llSetTimerEvent(0.0);
state closed;
}
}