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

drwhiet at spacefriends.de drwhiet at spacefriends.de
Mon Apr 18 20:38:14 UTC 2011


for me this also worked on latest osgrid recommended .. 

 
vector target=<91,155,50>;
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");
    }
}

 
best regards
Wordfromthe Wise

  _____  

Von: opensim-users-bounces at lists.berlios.de
[mailto:opensim-users-bounces at lists.berlios.de] Im Auftrag von Gary Beck
Gesendet: Montag, 18. April 2011 21:52
An: opensim-users at lists.berlios.de
Betreff: Re: [Opensim-users] Using a teleport script in the OS


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  <mailto:mclennan.kay at gmail.com> 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/2c99b0cf/attachment.html>


More information about the Opensim-users mailing list