Jump to content
Amigo Uriza

Map Teleport on Touch

Recommended Posts

This script only works when an avatar clicks on something, like an object.

It also requires that the item contains a landmark. You have to replace the landmark name and add the name of the region and the coordinates using this estructure:  "name, region (x, y, z)"

 

default
{
     touch_start(integer num)
     {
          list lstTemp = llParseString2List(llGetInventoryName(
               INVENTORY_LANDMARK,0),[","],[]);
          integer intElement = llGetListLength(lstTemp)-3;
          string strSimname = llStringTrim(llGetSubString(llList2String(lstTemp,
               intElement),0,llSubStringIndex(llList2String(lstTemp,intElement),"(")-1),
               STRING_TRIM);    
          vector vecVector = (vector)("<"+llGetSubString(llGetInventoryName(
               INVENTORY_LANDMARK,0),llSubStringIndex(llGetInventoryName(
               INVENTORY_LANDMARK,0),"(")+1,-2)+">"); 
          llMapDestination(strSimname,vecVector,ZERO_VECTOR);
     }
}

 

When the avata clicks on an object, the map opens with the coordinates and the user can use the "teleport" button on the map.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.