SLURL HUD

From Second Life Wiki
Revision as of 18:04, 24 January 2015 by ObviousAltIsObvious Resident (talk | contribs) (<lsl> tag to <source>)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Touch to get the SLURL.

string slurl()
{
    string regionname = llGetRegionName();
    vector pos = llGetPos();

    return "http://maps.secondlife.com/secondlife/"
        + llEscapeURL(regionname) + "/"
        + (string)llRound(pos.x) + "/"
        + (string)llRound(pos.y) + "/"
        + (string)llRound(pos.z) + "/";
}

default
{
    touch_start(integer num_detected)
    {
        // PUBLIC_CHANNEL has the integer value 0
        llSay(PUBLIC_CHANNEL, slurl() );
    }
}