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

Kay McLennan mclennan.kay at gmail.com
Mon Apr 18 19:14:57 UTC 2011


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");
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20110418/e29800d7/attachment.html>


More information about the Opensim-users mailing list