Skip to content
lsl.devlsl.devLSL Dev

llMapDestination

function
Function syntax
llMapDestination(
  1. string simname,// Name of the target simulator region.
  2. vector pos,// Position vector in region coordinates to highlight.
  3. vector look_at// Position in local coordinates (currently unused/ignored).
);
Delay
1 s
Energy
10

Opens the world map for the avatar touching or wearing the object, centered on simname with pos highlighted. Only works for attached scripts or during touch events. Note: look_at currently has no effect.

Opens world map centered on simname with pos highlighted.

Only works for scripts attached to avatar, or during touch events.

(NOTE: look_at currently does nothing)

How to use
llMapDestination("", ZERO_VECTOR, ZERO_VECTOR);
  • if simname is omitted or invalid, the map will open centered on object, but pos will not be highlighted. Since this function requests the client to perform a task, there is no way for script to know if it has failed.
Example 1
24 collapsed lines
string simName = "Help Island Public";
vector tpDest = <128.0, 128.0, 24.0>;
vector lookAt = ZERO_VECTOR;
default
{
state_entry()
{
// set white, opaque floattext with teleport destination
llSetText("click to teleport\nto '" + simName + "'", <1.0, 1.0, 1.0>, (float)TRUE);
}
touch_start(integer num_detected)
{
key id = llDetectedKey(0);
string oldSlurlPrefix = "http://slurl.com/secondlife/";
string newSlurlPrefix = "http://maps.secondlife.com/secondlife/";
string slurlSuffix = llEscapeURL(simName)
+ "/" + (string)llRound(tpDest.x)
+ "/" + (string)llRound(tpDest.y)
+ "/" + (string)llRound(tpDest.z);
llInstantMessage(id, oldSlurlPrefix + slurlSuffix);
llInstantMessage(id, newSlurlPrefix + slurlSuffix);
llMapDestination(simName, tpDest, lookAt);
}
}
  • pos will work with Region coordinates not inside simname. (like those returned by llRequestInventoryData)
  • if called from non touch events, it only works for the owner.
  • if called from touch, it may only work for the first or last touch in the event queue (example: num_touched > 1)
  • if called inside an attachment, it only works for the owner.

From the issue templates included by the wiki article:

  • SVC-3455 (bug): llMapDestination ignores look_at parameter
  • SVC-1038 (fs): Throttle llMapDestination to prevent “map bombing”.
  • SVC-1795 (bug): llMapDestination in attachments opens a map on owner’s screen even when touched by someone else
  • VWR-2060 (bug): llMapDestination pos parameter is sometimes replaced with incorrect data (workaround included)
  • VWR-7331 (bug): height in pos is capped to 1000m (code patch included)
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.