tracking a lost item
|
|
Watch Coats
Registered User
Join date: 22 Aug 2006
Posts: 23
|
07-15-2008 03:23
i am sure i have seen this before somewhere , but i have looked and can not find . if my item gets lost could i get it to IM me its position , is that possible? maybe using somthing like
llInstantMessage(" with my key here '', + (string)llGetPos());
would somthing like this work?
also i dont want to just use llGetOwner because i may want the item to IM someone that is not the owner
|
|
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
|
07-15-2008 05:18
Not really sure, I have an object scanner, made by Thomas Conover. I think I got it on the exchange, not sure, way over a year ago. But it searches pretty much sim wide for objects by either UUID or partial name. It's a great lil product, always finds my lost items. It can take a bit of time, but so far has not failed. Called Advanced Object Scanner.
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
07-15-2008 05:51
That would work, and you might want to add the region name. I don't know how to get that, off the top of my head, but you can find it in the LSL Wiki. Having worked on a scripting for a couple of movable objects myself that "got away", I feel your pain.  It's a *very* good idea to put some kind of homing device. Another option for the runaway object is to make a note of it's key, have it listen for a "die" email message, and have an object to send that as an IM. If you're sure the object won't escape the current sim, you could just use llListen() and llRegionSay(), but in my experience these pesky things can wind up several sims away. Lately, I stick to stationary objects! BTW, if you ever happen to see my 20x20 physical ferris wheel that jumped its bearings and careened off into the wild blue yonder, please return it. The first time that happened, I was "lucky" enough to be seated on it, so at least I could find it when it stopped rolling 3 sims away. It still makes me dizzy to recall.
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
07-15-2008 06:42
havent tested this yet but it may lead you the right dirrection default { state_entry() { llSensorRepeat("",llGetOwner(),AGENT, 5, PI, 1); } sensor(integer num_detected) { float range = llVecDist(llGetPos(),llDetectedPos(0)); { if(range > 100) { llInstantMessage(llGetOwner(),"Help!, im lost! "+((string)llGetPos())); llSetStatus(STATUS_PHYSICS,FALSE); } } } no_sensor() { } }
|
|
Watch Coats
Registered User
Join date: 22 Aug 2006
Posts: 23
|
07-15-2008 07:41
im sure , what key i want to send it too. can i send it to a cetain key regardless of who owens it , with somthihg like llOwnerSay((string)llGetKey())?
|
|
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
|
07-15-2008 08:03
key id = (key)"xxxx-xxxxx-xxxxxx-xxxxx"; // replace x's with your key string region = .... (code to get region name, look up in LSL wiki) llInstantMessage(id, "I'm at " + region + ":" + (string)llGetPos()); This will cause it to send a message to you that you'll see regardless where you are, and others won't see it. Dispite being called "instant message", it won't appear in an IM tab, just in the chat. To find your own key, use an object like this (and look at the script to see how simple it is): http://slexchange.com/modules.php?name=Marketplace&file=item&ItemID=161158
|
|
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
|
07-15-2008 08:12
The hardest part of this seems to be how to determine when the object is 'lost'. Once you get that, and Mrc's code above may be going along the right lines, though I think checking once a second and only within 5m might need work, do something like this.. vector here = llGetPos(); integer x = (integer)here.x; integer y = (integer)here.y; integer z = (integer)here.z;
llInstantMessage (llGetOwner(), "Oi! You left me at http://slurl.com/secondlife/" + llGetRegionName() + "/" + (string)x + "/" + (string)y + "/" + (string)z);
Or replace the llGetOwner() with whoever you want to send the message to.
|
|
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
|
07-15-2008 13:43
From: Watch Coats im sure , what key i want to send it too. can i send it to a cetain key regardless of who owens it , with somthihg like llOwnerSay((string)llGetKey())? rather try llInstantMessage(llGetOwnerKey(),message); but you should not realy be distributing the object untill you have it under control. And Try what Mrc posted, that looks good to me 
|
|
Cheree Bury
ChereeMotion Owner
Join date: 6 Jun 2007
Posts: 666
|
My own version
07-15-2008 15:01
I made mine a little differently. It does work on the owner only, but that could be changed. I did go and test it in a sandbox, so I know it works. It does nothing if the owner is nearby, or it is on land owned by the prim's owner. You can click directly on the URL in your chat history to tp to it. // This script will send a message to the owner of a prim if the owner is not nearby and the // prim is not on land owned by its owner // // The message is formatted such that the owner can click on the URL and teleport directly to it // You may end up at the parcel's default entry point, but the red arrow will point to the prim // // Adjustments would have to be made to work on group-owned land, or on land owned by someoone else //
float TimerLength = 60.0; //Number of seconds between checks float SensorDistance = 96.0;
default { state_entry() { //Start a repeating sensor llSensorRepeat("", llGetOwner(), AGENT, SensorDistance, PI, TimerLength); }
sensor(integer num_detected) //I see my owner, I am happy { }
no_sensor() //Uh oh, I don't see my owner { vector Pos = llGetPos(); //Where am I in the region //Get the parcel owner's key list ParcelDetails = llGetParcelDetails(Pos, [PARCEL_DETAILS_OWNER]); if (llList2Key(ParcelDetails, 0) != llGetOwner()) // Am I not on my owner's land? { //Send my owner a message so she can teleport here to get me llInstantMessage(llGetOwner(), "I'm lost at: secondlife:///app/teleport/" + llGetRegionName() + "/" + (string)((integer)Pos.x) + "/" + (string)((integer)Pos.y) + "/" + (string)((integer)Pos.z) + "/"); } } }
|