[Opensim-users] Using a teleport script in the OS

Gary Beck gab4gab at gmail.com
Mon Apr 18 19:51:54 UTC 2011


Kay,

Your script worked for me in opensim.   I got the message about selected engine not available until I added a blank comment line at the top.   Worked with and without that comment though.   What problem are you having?
- Gary
  ----- Original Message ----- 
  From: Kay McLennan 
  To: opensim-users at lists.berlios.de 
  Sent: Monday, April 18, 2011 15:14
  Subject: [Opensim-users] Using a teleport script in the OS


  I would like to use the simple teleport script (below) as kind of an elevator script (to transport avatars from one floor of a building to another floor).  In turn, while the script works in SL I cannot get it to work in the OS.  Any suggestions?  

  Thank you in advance.

  Best,
  Kay

  // From the book:
  //
  // Scripting Recipes for Second Life
  // by Jeff Heaton (Encog Dod in SL)
  // ISBN: 160439000X
  // Copyright 2007 by Heaton Research, Inc.
  //
  // This script may be freely copied and modified so long as this header
  // remains unmodified.
  //
  // For more information about this book visit the following web site:
  //
  // http://www.heatonresearch.com/articles/series/22/
  vector target=<65,191,32>;
  vector offset;
  default
  {    
      moving_end()
      {
          offset = (target- llGetPos()) * (ZERO_ROTATION / llGetRot());
          llSitTarget(offset, ZERO_ROTATION); 
      }
      state_entry()
      {
          llSetText("Right click & touch teleport to go to the 2nd floor",<1,1,1>,1.0);
          offset = (target- llGetPos()) * (ZERO_ROTATION / llGetRot());
          llSetSitText("Teleport");
          llSitTarget(offset, ZERO_ROTATION);      
      }
      changed(integer change) 
      { 
          if (change & CHANGED_LINK) 
          { 
              llSleep(0.5); 
              if (llAvatarOnSitTarget() != NULL_KEY) 
              { 
                  llUnSit(llAvatarOnSitTarget()); 
              }
          }
      }
      
      touch_start(integer i)
      {
          llSay(0, "Please right-click and select Teleport");
      }
  }




------------------------------------------------------------------------------


  _______________________________________________
  Opensim-users mailing list
  Opensim-users at lists.berlios.de
  https://lists.berlios.de/mailman/listinfo/opensim-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20110418/a0f88c0e/attachment.html>


More information about the Opensim-users mailing list