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