LlMapDestination
Looking for the current API? Open the llMapDestination reference →
Wiki description
Function notes
(NOTE:
look_at currently does nothing)Caveats
- if
simnameis omitted or invalid, the map will open centered on object, butposwill 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.
Examples
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);
}
}Notes
poswill work with Region coordinates not insidesimname. (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.
See also: functions
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SVC-3455|[[llMapDestination]] ignores <code>look_at</code> parameter|type=bug}}Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SVC-1038|Throttle [[llMapDestination]] to prevent "map bombing".|type=fs|status=fixp}}Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SVC-1795|[[llMapDestination]] in attachments opens a map on owner's screen even when [[touch]]ed by someone else|type=bug|status=fixp}}Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|VWR-2060|type=bug|[[llMapDestination]] '''pos''' parameter is sometimes replaced with incorrect data (workaround included)}}Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|VWR-7331|type=bug|status=fixp|height in '''pos''' is capped to 1000m (code patch included)}}Template:LSL Function/position
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}<noinclude>
This template is to be used to specify setup the description for position like parameters (offsets, positions, points, etc.).
Right now it's pretty basic and easy to edit. I'm wondering if these functions should be in a position parameter specific category.
====TODO====
* add clamping flag and verbiage for out of region/range coordinates.
</noinclude>{{#if:
{{#if:{{{region|}}}|
{{#if:{{{local|}}}|
{{#vardefine:p_{{{1|}}}_desc|position in {{HoverLink|Viewer coordinate frames#Region|Origin is the origin of the region which {{String|owns}} the object.|region}} or [[Viewer coordinate frames#Local|local coordinates]] depending upon the situation{{{desc|}}}}}
{{#vardefine:p_{{{1|}}}_hover|position in region or local coordinates depending upon the situation{{#if:{{{hover|}}}|{{{hover|}}}|{{{desc|}}}}}}}
|
{{#ifeq:{{{1|}}}|point|
{{#vardefine:p_{{{1|}}}_desc|A point in {{HoverLink|Viewer coordinate frames#Region|Origin is the origin of the region which {{String|owns}} the object.|region-local}} space{{#ifeq:{{{region|}}}|noZ| (z component is ignored)}}{{{desc|}}}}}
{{#vardefine:p_{{{1|}}}_hover|A point in region-local space{{#ifeq:{{{region|}}}|noZ| (z component is ignored)}}{{#if:{{{hover|}}}|{{{hover|}}}|{{{desc|}}}}}}}
|
{{#vardefine:p_{{{1|}}}_desc|position in {{HoverLink|Viewer coordinate frames#Region|Origin is the origin of the region which {{String|owns}} the object.|region coordinates}}{{#ifeq:{{{region|}}}|noZ| (z component is ignored)}}{{{desc|}}}}}
{{#vardefine:p_{{{1|}}}_hover|position in region coordinates{{#ifeq:{{{region|}}}|noZ| (z component is ignored)}}{{#if:{{{hover|}}}|{{{hover|}}}|{{{desc|}}}}}}}
}}
}}
|
{{#if:{{{local|}}}|
{{#ifeq:{{{1|}}}|offset|
{{LSL Function/offset|{{{1|}}}|local={{{local}}}}}
|
{{#vardefine:p_{{{1|}}}_desc|position in [[Viewer coordinate frames#Local|local coordinates]]{{{desc|}}}}}
{{#vardefine:p_{{{1|}}}_hover|position in local coordinates{{#if:{{{hover|}}}|{{{hover|}}}|{{{desc|}}}}}}}
}}
}}
}}
}}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.