Difference between revisions of "LlGetRegionName"
Jump to navigation
Jump to search
m (<lsl> tag to <source>) |
|||
(15 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LSL_Function | ||
|func_id=226|func_sleep=0.0|func_energy=10.0 | |||
|func=llGetRegionName|sort=GetRegionName | |||
|return_type=string | |||
|func_footnote | |||
|func_desc | |||
|return_text=that is the current [[Viewer coordinate frames#Region|region]] name | |||
|spec | |||
|caveats | |||
|constants | |||
|examples=<source lang="lsl2"> | |||
// Say what would be said by "Copy SLURL to clipboard" in the Map of the standard client | |||
string wwGetSLUrl() | |||
{ | |||
string globe = "http://maps.secondlife.com/secondlife"; | |||
string region = llGetRegionName(); | |||
vector pos = llGetPos(); | |||
string posx = (string)llRound(pos.x); | |||
string posy = (string)llRound(pos.y); | |||
string posz = (string)llRound(pos.z); | |||
return (globe + "/" + llEscapeURL(region) +"/" + posx + "/" + posy + "/" + posz); | |||
} | |||
default | |||
{ | |||
state_entry() | |||
{ | |||
llOwnerSay( wwGetSLUrl() ); | |||
} | |||
} | |||
</source> | |||
|helpers | |||
|also_functions= | |||
{{LSL DefineRow||[[llRequestSimulatorData]]|}} | |||
{{LSL DefineRow||[[llGetSimulatorHostname]]|}} | |||
{{LSL DefineRow||[[llGetParcelDetails]]|}} | |||
{{LSL DefineRow||[[llEscapeURL]]|}} | |||
|also_tests | |||
|also_events | |||
|also_articles | |||
|notes | |||
|cat1 | |||
|cat2=Region | |||
|cat3 | |||
|cat4 | |||
}} |
Revision as of 02:47, 22 January 2015
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: string llGetRegionName( );226 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a string that is the current region name
Caveats
Examples
// Say what would be said by "Copy SLURL to clipboard" in the Map of the standard client
string wwGetSLUrl()
{
string globe = "http://maps.secondlife.com/secondlife";
string region = llGetRegionName();
vector pos = llGetPos();
string posx = (string)llRound(pos.x);
string posy = (string)llRound(pos.y);
string posz = (string)llRound(pos.z);
return (globe + "/" + llEscapeURL(region) +"/" + posx + "/" + posy + "/" + posz);
}
default
{
state_entry()
{
llOwnerSay( wwGetSLUrl() );
}
}
See Also
Functions
• | llRequestSimulatorData | |||
• | llGetSimulatorHostname | |||
• | llGetParcelDetails | |||
• | llEscapeURL |