Difference between revisions of "BuildSlurl (NewAge)"
Jump to navigation
Jump to search
Fred Gandt (talk | contribs) (Added delete template. I feel mean but the content isn't what I would call helpful but the page name (with the "ll" prefix) seems to suggest one will find a Linden Library function.) |
Lady Sumoku (talk | contribs) m (Replaced old <LSL> block with <source lang="lsl2">) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LSL Header}} | ||
A way of creating SLURL's by using a pre-made function; | A way of creating SLURL's by using a pre-made function; | ||
BuildSlurl(string region_name, vector pos); | |||
''Pre-made Function'' | ''Pre-made Function'' | ||
< | <source lang="lsl2"> | ||
string | string BuildSlurl(string region_name, vector pos){ | ||
{ | return "secondlife://" + llEscapeURL(region_name) | ||
+ "/"+ (string)((integer)pos.x) | |||
+ "/"+ (string)((integer)pos.y) | |||
+ "/"+ (string)(llCeil(pos.z)); | |||
}</source> | |||
} | |||
</ | |||
---- | ---- | ||
Line 43: | Line 17: | ||
''Example Script'' | ''Example Script'' | ||
< | <source lang="lsl2"> | ||
string | string BuildSlurl(string region_name, vector pos){ | ||
{ | return "secondlife://" + llEscapeURL(region_name) | ||
+ "/"+ (string)((integer)pos.x) | |||
+ "/"+ (string)((integer)pos.y) | |||
+ "/"+ (string)(llCeil(pos.z)); | |||
} | } | ||
Line 77: | Line 29: | ||
touch_start(integer x) | touch_start(integer x) | ||
{ | { | ||
llWhisper(0, | llWhisper(0, BuildSlurl(llGetRegionName(), llGetPos())); | ||
//Returns slurl like this; | //Returns slurl like this; | ||
// secondlife://Phoenix%20Rising/214/160/24 | // secondlife://Phoenix%20Rising/214/160/24 | ||
} | } | ||
} | } | ||
</ | </source> |
Latest revision as of 18:44, 24 January 2015
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
A way of creating SLURL's by using a pre-made function;
BuildSlurl(string region_name, vector pos);
Pre-made Function
string BuildSlurl(string region_name, vector pos){
return "secondlife://" + llEscapeURL(region_name)
+ "/"+ (string)((integer)pos.x)
+ "/"+ (string)((integer)pos.y)
+ "/"+ (string)(llCeil(pos.z));
}
Example Script
string BuildSlurl(string region_name, vector pos){
return "secondlife://" + llEscapeURL(region_name)
+ "/"+ (string)((integer)pos.x)
+ "/"+ (string)((integer)pos.y)
+ "/"+ (string)(llCeil(pos.z));
}
default
{
touch_start(integer x)
{
llWhisper(0, BuildSlurl(llGetRegionName(), llGetPos()));
//Returns slurl like this;
// secondlife://Phoenix%20Rising/214/160/24
}
}