BuildSlurl (NewAge)
Revision as of 18:44, 24 January 2015 by Lady Sumoku (talk | contribs) (Replaced old <LSL> block with <source lang="lsl2">)
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
}
}