Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Location "History"

Siouxdax Matahari
Loveable Rogue
Join date: 15 Sep 2006
Posts: 27
10-28-2006 01:19
I think a helpful feature would be a location "history". Something that logs your locations, much like an internet browswer history. Sometimes I stumble upon a location, move on and forget to add a location bookmark. What would be difficult though, is to have a history of all locations visited other than teleportation points. But perhaps a map with a "trail" depicting your location history might suffice. This feature would need more to it, I'm sure, but this is just a seed on an idea.
_____________________
Kind Regards,
Daniel aka Siouxdax Matahari
siouxdax.tumblr.com
Draco18s Majestic
Registered User
Join date: 19 Sep 2005
Posts: 2,744
10-28-2006 09:52
I've had similar issues where I end up somewhere cool, crash, and log in somewhere else (my last log-out location instead of last location) and then I have to either remember what the place was called or recall how I found it in the first place.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
10-28-2006 16:03
Desk-checked, not compiled or tested:

CODE

list history = [];
float PRECISION = 16; // don't track closer than 16m. Set to 256 to track sims only.
float RATE = 300; // check every 5 minutes or after teleport

save_history()
{
vector here = llGetPos();
vector square;
square.x = llFloor(here.x/PRECISION) * PRECISION;
square.y = llFloor(here.y/PRECISION) * PRECISION;
square.z = 0;
list spot = [llGetRegionName(),square];
if (llListFindList(history, spot) == -1)
{
spot += [here];
if (llGetListLength(history) >= 30)
history = llListGetList(history, 3, -1);
history += spot;
}
}

show_history()
{
integer i;
integer n = llGetListLength(history);
for(i -= 0; i < n; i+= 3)
llOwnerSay(llList2String(history, i)+" "+(string)llList2Vector(history, i+2));
}

default
{
state_entry()
{
llSetTimerEvent(RATE);
}
changed(integer what)
{
if(what & CHANGED_TELEPORT) save_history();
}
timer()
{
save_history();
}
touch_start(integer n)
{
if(llDetectedKey(0) == llGetOwner())
show_history();
}
}