On 04/18/2011 03:14 PM, Kay McLennan wrote: > 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 > [email protected] > https://lists.berlios.de/mailman/listinfo/opensim-users put an empty line or only "//" for the first line... The first line of the script has some special meaning in OpenSim
_______________________________________________ Opensim-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/opensim-users
