Opens world map centered on simname with pos highlighted.
Only works for scripts attached to avatar, or during touch events.
void llMapDestination( string simname, vector pos, vector look_at );
Forced delay: 1.0 seconds. Energy: 10.0.
(NOTE: look_at currently does nothing)
string simName = "Help Island Public";
vector tpDest = <128.0, 128.0, 24.0>;
vector lookAt = ZERO_VECTOR;
default
{
state_entry()
{
// set white, opaque floattext with teleport destination
llSetText("click to teleport\nto '" + simName + "'", <1.0, 1.0, 1.0>, (float)TRUE);
}
touch_start(integer num_detected)
{
key id = llDetectedKey(0);
string oldSlurlPrefix = "http://slurl.com/secondlife/";
string newSlurlPrefix = "http://maps.secondlife.com/secondlife/";
string slurlSuffix = llEscapeURL(simName)
+ "/" + (string)llRound(tpDest.x)
+ "/" + (string)llRound(tpDest.y)
+ "/" + (string)llRound(tpDest.z);
llInstantMessage(id, oldSlurlPrefix + slurlSuffix);
llInstantMessage(id, newSlurlPrefix + slurlSuffix);
llMapDestination(simName, tpDest, lookAt);
}
}
num_touched > 1)