CrashCat Luchador
Registered User
Join date: 23 Apr 2004
Posts: 4
|
12-16-2009 13:41
Is it at all possible to get a region name or any usable info, given a global coordinate? I have come across plenty of script examples allowing me to get a global coordinate given the region name or the position of the current object, but nothing in the opposite direction. It seems almost pointless to even HAVE the global coordinate if all I can use it for is simple math.
I'm sure I'm not the only one to have that quibble but it's frustrating to be that close to something useful and not be able to figure out how to use it. Generating a random global coordinate would be awesome for exploring, but the best I could do with said coordinate from what I gather is pointing myself to which direction it is, and I wouldn't even know if the place I came up with was at all valid. I've done the whole 'grab a random name from a list of sims' thing but it's burdensome and only as good and up-to-date as the set of notecards I feed it.
Am I running toward a well-known dead end here? I am guessing I must be since I've never seen a script (in-world or source) to do something like that and my forum search turned up empty.
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
12-16-2009 14:26
I think this came up recently but I can't find the thread now. Don't remember the details but I suspect you'll have to jump through some hoops to get the info - maybe something using the map api...
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
CrashCat Luchador
Registered User
Join date: 23 Apr 2004
Posts: 4
|
12-16-2009 14:34
Actually think I found something digging around even deeper in the search:
http://forums.secondlife.com/showthread.php?t=104939
The post near the end suggests referencing llMapDestination with the current sim but simply going ahead and using the difference of the global coordinate and region corner. I would think that would bomb since it would pick a coordinate outside the region, though. I'll have to fiddle with it anyway, but I expect a script error going at it that way.
|
Pete Olihenge
Registered User
Join date: 9 Nov 2009
Posts: 315
|
12-16-2009 15:42
It came up in this thread: /54/58/354561/1.html (which in turn refers to /54/52/340479/1.html). The bad news it that you need to use a proxy server to do it.
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
12-16-2009 16:12
it all depends on why you want the region name... if it's for MapDestination, you don't need it, simply use the global coordinates, and the current sim name much like I did in this example https://wiki.secondlife.com/wiki/User:Void_Singer/Programs#v7-D_Enh._Landmark-2-Map.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
CrashCat Luchador
Registered User
Join date: 23 Apr 2004
Posts: 4
|
12-16-2009 16:38
From: CrashCat Luchador Actually think I found something digging around even deeper in the search: /54/6f/104939/1.htmlThe post near the end suggests referencing llMapDestination with the current sim but simply going ahead and using the difference of the global coordinate and region corner. I would think that would bomb since it would pick a coordinate outside the region, though. I'll have to fiddle with it anyway, but I expect a script error going at it that way. This works like a charm! Even though I specify the current region via llGetRegionName() it will let me go past the sim border with the coordinate passed to it. It basically just treats anything as a vector from the region corner and it'll display the destination region name if it maps and finds one, or Invalid Location if you point it off-world.
|