Difference between revisions of "LlMapDestination"

From Second Life Wiki
Jump to navigation Jump to search
m (duplicates most of the caveat)
Line 10: Line 10:
|spec
|spec
|caveats=
|caveats=
* if '''simname''' is omitted, map will open centered on object, but '''pos''' will not be highlighted
* if '''simname''' is {{HoverText|omitted|an empty string: {{String}}}} 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.
|constants
|constants
|examples=<lsl>//Click the object this script is in and your map opens up in the middle of Oasis.
|examples=<lsl>//Click the object this script is in and your map opens up in the middle of Oasis.
Line 28: Line 28:
|notes=
|notes=
* '''pos''' will work with [[Viewer_coordinate_frames#Region|Region]] coordinates not inside '''simname'''. (like those returned by [[llRequestInventoryData]])
* '''pos''' will work with [[Viewer_coordinate_frames#Region|Region]] coordinates not inside '''simname'''. (like those returned by [[llRequestInventoryData]])
* if called from an event other than touch, it only works for the owner.
* if called from non {{LSLGC|Touch|touch}} events, it only works for the {{LSLGC|Owner|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 from touch, it may only work for the first or last touch in the event queue (example: num_touched > 1)
* if called inside an attached object, it only works for the owner
* if called inside an [[attachment]], it only works for the owner.
* if '''simename''' and '''coords''' are not valid map opens centered on object. No script error is noted and script carries on running.
|permission
|permission
|inventory
|inventory

Revision as of 22:37, 15 May 2009

Summary

Function: llMapDestination( string simname, vector pos, vector look_at );

Opens world map centered on simname with pos highlighted.
Only works for scripts attached to avatar, or during touch events.

• string simname Region name
• vector pos Region coordinates
• vector look_at not used

(NOTE: look_at currently does nothing)

Caveats

  • This function causes the script to sleep for 1.0 seconds.
  • 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.

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   llMapDestination in attachments opens a map on owner's screen even when touched by someone else
   llMapDestination pos parameter is sometimes replaced with incorrect data (workaround included)
   height in pos is capped to 1000m (code patch included)

Examples

<lsl>//Click the object this script is in and your map opens up in the middle of Oasis. default {

    touch_start(integer num)
    {
         llMapDestination("Oasis", <128, 128, 0>, ZERO_VECTOR);
    }
}</lsl>

Notes

  • 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.

See Also

Functions

•  llRequestInventoryData

Deep Notes

All Issues

~ Search JIRA for related Issues
   Throttle llMapDestination to prevent "map bombing".
   llMapDestination in attachments opens a map on owner's screen even when touched by someone else
   llMapDestination pos parameter is sometimes replaced with incorrect data (workaround included)
   height in pos is capped to 1000m (code patch included)

Signature

function void llMapDestination( string simname, vector pos, vector look_at );