Configuring Teleport Scripts

The following scripts are available for you to use in your Sansar experiences:

Teleport local

Teleports any user that collides with the scripted object to a set of given coordinates within the same experience.

To change the destination coordinates:

  1. Select the scripted object.
  2. Click the Properties button on the scripted object to open the Properties panel.
  3. Make sure IsDynamic is set to On so that the object can trigger script events upon collision.
  4. (Optional) Set the object's Density to maximum.  This makes the object harder to move when another object or avatar collides with it.
  5. Under Script Settings, enter values for Destination XDestination Y, and Destination Z.
  6. De-select the object in order to save the destination values.

teleport_local.png

Teleport remote

Teleports any user that collides with the scripted object to another experience.

To change the destination experience:

  1. Select the scripted object.
  2. Click the Properties button on the scripted object to open the Properties panel.
  3. Make sure IsDynamic is set to On so that the object can trigger script events upon collision.
  4. (Optional) Set the object's Density to maximum.  This makes the object harder to move when another object or avatar collides with it.
  5. Under Script Settings, enter values for DestinationPersonaHandle and DestinationLocationHandle.
  6. De-select the object in order to save the destination values.

You can find an experience's Destination and Persona handles by copying and analyzing the destination experience's URL.

  • If the destination is listed in the Atlas, you can obtain its URL by clicking the experience's portrait to see more information, then clicking the Copy URL button to copy the experience's URL to your computer's clipboard.
  • If the destination experience is one of your projects that is not listed in the Atlas, you can access its URL in My Projects by clicking More Options  and then choosing Copy URL to copy the experience's URL to your computer's clipboard.

Once you have the destination experience's URL, you can figure out the persona and destination handles.  The persona handle appears in the URL after "https://atlas.sansar.com/experiences/", and the destination handle appears after the persona handle.  

For example, if an experience's URL is: "https://atlas.sansar.com/experiences/jeremy-fbcb/jeremy-s-sandbox", the persona handle is "jeremy-fbcb", and the destination handle is "jeremy-s-sandbox".

teleport_remote.png

 

How to add a script to one of your objects

For information about adding a script to an object, see Uploading and Adding Scripts.

Was this article helpful?
5 out of 6 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.