Difference between revisions of "LlMapDestination"

From Second Life Wiki
Jump to navigation Jump to search
m (added notes=, also=)
(added caveat, notes, minor minor wording changes. moved comment to prevent page scrolling)
Line 2: Line 2:
|func_id=309|func_sleep=1.0|func_energy=10.0
|func_id=309|func_sleep=1.0|func_energy=10.0
|func=llMapDestination|sort=MapDestination
|func=llMapDestination|sort=MapDestination
|p1_type=string|p1_name=simname
|p1_type=string|p1_name=simname|p1_desc=Region name
|p2_type=vector|p2_name=pos
|p2_type=vector|p2_name=pos|p2_desc=[[Viewer_coordinate_frames#Global|Global]] or [[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)
|func_desc=Opens world map centered on region with '''pos''' highlighted.<br />Only works for scripts [[attach]]ed to avatar, or during {{LSLGC|Touch|touch}} events.
|func_desc=Opens world map centered on '''simname''' with '''pos''' highlighted.<br />Only works for scripts [[attach]]ed to avatar, or during {{LSLGC|Touch|touch}} events.
|return_text
|return_text
|spec
|spec
|caveats=
|caveats=
if '''simname''' is ommited map open centered on user, but destination will not be higlighted
* if '''simname''' is ommited, map will open centered on object, but '''pos''' will not be higlighted
* '''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>
//Click the object this script is in and your map opens up in the middle of Oasis.
default
default
{
{
     touch_start(integer num)
     touch_start(integer num)
     {
     {
           llMapDestination("Oasis", <128, 128, 0>, ZERO_VECTOR); //Click the object this script is in and your map opens up in the middle of Oasis.
           llMapDestination("Oasis", <128, 128, 0>, ZERO_VECTOR);
     }
     }
}
}
Line 28: Line 30:
|also_articles
|also_articles
|notes=
|notes=
'''pos''' may be fed grid coordinates from [[llRequestInventoryData]]
* '''pos''' will work with [[Viewer_coordinate_frames#Global|Global]] coordinates. (eg. as 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)
|permission
|permission
|inventory
|inventory

Revision as of 01:47, 25 November 2007

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 Global or 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 ommited, map will open centered on object, but pos will not be higlighted
  • pos is sometimes replaced with incorrect data. See VWR-2060 for details/workaround.
All Issues ~ Search JIRA for related Bugs

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 Global coordinates. (eg. as 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

Search JIRA for related Issues

Signature

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