Change font size
It is currently Thu Nov 22, 2018 6:02 am

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 1   [ 1 post ]
Author Message
 Post subject: Full-feature teleporter script
PostPosted: Thu May 15, 2008 11:58 am 
Furious Typer
User avatar

Joined: Sat Feb 02, 2008 10:02 pm
Posts: 104
Location: Romania, Bucharest
Many people already have such script by now but I decided to post one here anyway for those who don't. This is the full-feature and most modern teleporter script possible to make in SL, which now works on OpenSim too since the necessary lsl functions and events have been implemented. If by the time of the crude teleporter you had to sit on a prim, touch it, then stand up and wait for the prim to go back, the modern script is 1-click and instant.

{L_CODE}:
vector position = <128,128,25>;
vector destination = <128,128,50>;

default
{
    state_entry()
    {
        llSetPos(position);
        llSitTarget(<0,0,0>, <0,0,0,0>);
        llSetSitText("Teleport");
    }
   
    changed(integer change)
    {
        if((change & CHANGED_LINK) == CHANGED_LINK)
        {
            key avatar = llAvatarOnSitTarget();
            llSetPos(destination);
            llUnSit(avatar);
            llSetPos(position);
        }
    }
}


Just so everyone knows, the llSitTarget in state_entry is not something I put by mistake and it has a purpose. In the current revision, the changed event is not triggered without one. Otherwise, this simple script teleports you in a quarter second wherever you set it to (given theres no lag on your sim of course :D ).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 1 post ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net