What if one wants to teleport farther than 519m or more than 300m along one of the axis. The limitation posed upon by the short distance teleport is as the name suggests distance.
The script then sleeps using llSleep(float time) to make sure the simulation has reposition the avatar and then unsits the avatar.
If there is an avatar the script will result that it is the same avatar that just sat. The script then uses llAvatarOnSitTarget() function which returns the GUID value key of the avatar sitting on the primor NULL_KEY if nothing is specified. Since an avatar sitting on an object acts like an object being added to the linkset the CHANGED_LINK bit is set in the pattern, using the bitwise & operator. To know the previous values, the script needs to get these values from llGetPrimitiveParams. The argument changebits is a bit pattern that indicates exactly what has changed but doesn’t tell how that change came to be. This is invoked under many conditions, including change of color, owner and location. To notify the arrival of the avatar at the sit locaion the script is relying on the changed() event. The next two lines 9 and 10 adjust for any rotation applied on the primitive. The next line calculates the location of the target relative to the prim’s current location by subtracting the DEST variable with primCurrentPosn. llGetRot() calculates the rotation of the prim relative to the sim, while llGetPos() calculates the prim’s location. The first five lines of the state_entry() method convert DEST from sim-local to prim-local. DEST is a destination target location that is relative to the world or sim, but sit targets must be relative to the prim. The following script was inserted in both teleports with a different destination vector.Īs you can see the avatar is forcibly sent to the other teleporter by allocating the destination vector of that teleporter. The first I had to find out was the destination for my teleport and to be able to demonstrate this I created two short distance teleports each of which teleports the avatar to the other teleport. This is achieved by setting the target position to your teleport location then unsit the avatar at the destination. This same technique can be used to teleport an avatar up to 519 meters away. In the previous blog post we saw that an avatar sits down relative to the center of the prim holding the script and stands up at the sit target defined by llSitTarget. Create a short distance teleporter and an Intrasim teleport.Ĭreate object to object messaging, Prim to prim within an object using link messages and long distance communications using email and browsing web pages.