Jump to content
  • 0

I require a script for a opening door


ThomasG81
 Share

You are about to reply to a thread that has been inactive for 4428 days.

Please take a moment to consider if this thread is worth bumping.

Question

I need a script that enables me to build an opening and closing door. I've tried the following script I used from a youtube tutorial, but nothing is happening. Where am I going wrong?

 

default

 {
      touch_start(integer total_number)     

{

 rotation rot = llGetLocalRot();
         if (rot.z ==0)     

 {              rot.z = -0.707107;   

               rot.s = 0.707107;
         }          

else         

{           

rot.z = 0;           

rot.s = 1;         

 }             

   llSetLocalRot(rot);      

   }

}

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Too many things to count, but don't get discouraged.  You are just getting started. Take a look at any of the basic LSL tutorials at https://wiki.secondlife.com/wiki/LSL_Tutorial to get a feel for the way that events are stuctured.

Meanwhile, here's a door script that works very well  >>>> http://community.secondlife.com/t5/LSL-Library/Simple-Hinge-Action/td-p/875331 .  It's one of the simpelst and most widely-used ones in SL.  Study it carefully, take it apart and modify it if you wish, and have fun.  As you get more scripting questions, feel free to post them in the LSL scripting forum.  That's a place speciifically designed for scripters who are learning or have insights to share.

  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4428 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...