Linkable Teleport Instructions

== Kimm Scripts Linkable Teleport ==

July 2012

Most teleports work on the basis of getting an avatar to “sit” on them (often, it renames the “sit” option on the menus to “teleport” or similar), move the object and avatar to a new location, unsit the avatar and then move the object back to its original position.

This works fine, except when you want a teleport to be linked to something else.  In that case, sitting on it and teleporting will move the entire object.  Also, depending on the order of your prims, the “sit” might actually be redirected to another prim, or worst still, something else that should be a real sit (a chair or something) might end up teleporting you instead.

One way around that is this linked teleport.  It works in two steps.  First, touch the master prim, which can be linked to the rest of your build. This will rez a temporary teleport at the required location, which can then be touched separately and perform the teleport.  It will then delete itself ready for the next person to touch the master prim again and rez a new teleport.

This teleport provides a single destination, in one direction.  To teleport back, create another one at the destination.  This script does not support multiple destinations from the same teleport.

To use:
1. Create a prim to be used as the master, and link this to the rest of your build.  This prim MUST have the permissions required to rez other objects (for example, it may need the same group tag that you yourself need to rez objects, etc).
2. Create a prim to be used as the slave.
3. Determine the relative coordinates for the destination of the teleport – that is the position relative to the master prim.  One way to do this is to place your avatar where you want it to land and note the position in your viewer.  Then subtrack this from the position of where the master prim will be put.  This is the value you’ll need.
4. Add the coordinates to the description of the slave in angle brackets – for example to teleport 10m higher than the master prim, use:
<0.0, 0.0, 10.0>
5. Now do this step quickly, as soon as you insert the “Linkable Teleport – Slave” script into the slave prim, the timer will start and eventually remove it.  So ensure the prim is completely as you wish it to be (size, shape, texture, etc), then add the slave script and quickly take it into your inventory.
6. Copy the “Linkable Teleport – Master” script to the master prim.
7. Copy the slave prim from your inventory to the master prim.

That is the basics of operation for my linkable teleport.  More advanced details below.


== Advanced Configuration ==

The position of the slave prim relative to the master (i.e. where the master will rez it when touched) can be set by adding it to the description of the master prim in the following format:
<pos.x, pos.y, pos.z>:<rot.x, rot.y, rot.z>

* pos is the relative position at which to rez the slave.  It is relative to the master (default: <0.0,0.5,0.0> i.e. 0.5m in the Y direction.
* rot is the rotation to use (in degrees) when rezzing the slave (default: <0.0,0.0,0.0> – i.e. no rotation).

As I say above, to get this position you need to subtract the region coordinates (i.e. what the viewer tells you when you are standing at the destination spot) of the teleport destination from the coordinates of the master prim.

Example: If the master prim is at <34.0, 83.0, 1023.0> and the teleport destination is <39.5, 82.0, 1033.0>, then the value you need will be <5.5, -1.0, 10.0>.

As well as the teleport destination, a (relative) position and rotation for the “sit” – i.e. the position the avatar will assume when sitting on the teleport ‘slave’ prim – can be set in the slave too.  The general format for the description for the slave is as follows:
<dest.x, dest.y, dest.z>:<pos.x, pos.y, pos.z>:<rot.x, rot.y, rot.z>

* dest is the relative <x,y,z> coordinates from the rezzed slave prim for the teleport – that is the different in position between the master prim and where you want the teleport to go to.
* pos is the relative <x, y, z> coordinates for the sit position – that is the position the avatar takes whilst teleporting.
* rot is the <x, y, z> rotation, in degrees, for the sit position

== Issues and Problems ==

Q: On touch, I get a message about permissions or something?
A: The master prim has to be able rez objects.  This means that it will need similar permissions to those you have when you are building.  This may mean it needs to be owned by you (or the person you give your build to) or it may mean that the object using the script needs to be in the same group that you yourself (or the person you give your build to) needs to rez objects.

For updates to this information, see:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: