Difference between revisions of "LlMapDestination"

From Second Life Wiki
Jump to navigation Jump to search
(added caveat, notes, minor minor wording changes. moved comment to prevent page scrolling)
Line 3: Line 3:
|func=llMapDestination|sort=MapDestination
|func=llMapDestination|sort=MapDestination
|p1_type=string|p1_name=simname|p1_desc=Region name
|p1_type=string|p1_name=simname|p1_desc=Region name
|p2_type=vector|p2_name=pos|p2_desc=[[Viewer_coordinate_frames#Global|Global]] or [[Viewer_coordinate_frames#Region|Region]] coordinates
|p2_type=vector|p2_name=pos|p2_desc=[[Viewer_coordinate_frames#Region|Region]] coordinates
|p3_type=vector|p3_name=look_at|p3_desc=not used
|p3_type=vector|p3_name=look_at|p3_desc=not used
|func_footnote=(NOTE: '''look_at''' currently does nothing)
|func_footnote=(NOTE: '''look_at''' currently does nothing)
Line 10: Line 10:
|spec
|spec
|caveats=
|caveats=
* if '''simname''' is ommited, map will open centered on object, but '''pos''' will not be higlighted
* if '''simname''' is omitted, map will open centered on object, but '''pos''' will not be highlighted
* '''pos''' is sometimes replaced with incorrect data. See [https://jira.secondlife.com/browse/VWR-2060 VWR-2060] for details/workaround.
|constants
|constants
|examples=<pre>
|examples=<pre>
Line 30: Line 29:
|also_articles
|also_articles
|notes=
|notes=
* '''pos''' will work with [[Viewer_coordinate_frames#Global|Global]] coordinates. (eg. as 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 an event other than touch, 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 from touch, it may only work for the first or last touch in the event queue (example: num_touched > 1)
Line 40: Line 39:
|cat3=Avatar
|cat3=Avatar
|cat4=Touch
|cat4=Touch
|bugs={{LSL DefineRow|Unresolved|{{JIRA|VWR-2060}}|'''pos''' is sometimes replaced with incorrect data}}
}}
}}

Revision as of 03:41, 25 November 2007

Summary

Function: llMapDestination( string simname, vector pos, vector look_at );
1.0 Forced Delay
10.0 Energy

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, map will open centered on object, but pos will not be highlighted

Examples

//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);
     }
}

Notes

  • pos will work with 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 touch, it may only work for the first or last touch in the event queue (example: num_touched > 1)

See Also

Functions

•  llRequestInventoryData

Deep Notes

Signature

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