Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Detecting llSetPos movement

Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
09-15-2005 16:35
... on a non-physical object. Are sensors or says/listens the only way to do this? I tried setting up a 'tripwire', a long prim that my object would definitely intersect with while it's moving. I was hoping to get collision detection to work so I wouldn't need to use a sensor. I tried various combinations of physics, phantom and llVolumeDetect on the trip wire object (the moving object needs to be non-physics and non-phantom). Nothing worked. I searched through the forums, but all I found were suggestions to make the moving object physical.

So I ended up using a sensor, which of course works. I'm just wondering if there's some other way of doing this that I missed. The end result I'm trying to achieve is a monitor that verifies that the object is still running. And for that matter, what's more expensive - use a sensor that pings for my object every minute or so, or use a listener and have my moving object report its position? I assumed the sensor would be the lesser evil, since a listener is 'always on' in some senses, even if it's on a non-zero channel. Was that a reasonable assumption? Hmm... can the vehicle send IM to the detector? I thought you could only send IM to an agent, and an object couldn't receive IM.. OK, I guess email might be a better solution here instead of the sensor.

And a related question - does anyone know how time spent on protected (no-build) land is calculated? I can't rez an object when I'm on say a Linden road, but I can rez it on a parcel beside the road and drag it out onto the road. Of course, it gets returned after a while, depending on the settings of the protected land (I guess). What I have is an automated vehicle moving in and out of protected land. The land is on a 5 minute return (according to Live Help). I know that the object never spends 5 contiguous minutes on protected land. However, it gets returned randomly. Live Help suggested that perhaps lag was causing the clock calculation to be off. Which may be the case, or maybe the timer doesn't reset the instant you leave protected land, and it's more of an averaging kind of thing? If anyone knows the details and can tell me, maybe I could adjust my vehicle's path to spend the right amount of time on non-Linden land to ensure that the return timer does get cleared.

Thanks,
Ziggy
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
09-15-2005 19:31
Were you using the collision event, and not the collision_start one? That MIGHT work, but otherwise, I'd say that sensors are a good choice.

Why exactly are you doing this anyways? Non-physical movement can't be stopped.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
09-15-2005 20:23
From: someone
Were you using the collision event, and not the collision_start one?


Nope, I was using collision start. That's an interesting idea... since llSetPos doesn't move the object *from* point A *to* point B, maybe the collision start doesn't get triggered, but once it's interpenetrating, it might generate the collision event? I'd have one problem with that though - people will be walking through there too, so even if I made it invisible, they could bump into it. And if I made it phantom or used llVolumeDetect, then I don't think I'll get the collision event.

From: someone
Why exactly are you doing this anyways? Non-physical movement can't be stopped.


Like I said, the path traversed spends a lot of time on land not owned by the object's owner (it's an automated shuttle from the telehub to the owner's venue, it loops around a preset path). So yes, no one can stop it, but intermittently the sim decides that the object has spent too much time on the protected road parcel, and returns it back to the owner's inventory. So I wanted something that would detect when that happened and automatically rez a new shuttle. I don't think there's a reliable 'you're about to get killed' event, or I could use that to make the dying shuttle rez a successor :)
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
09-16-2005 03:11
As a last resort - is the trip time more-or-less regular? If so, you could have the shuttle die when it gets back home, as well as a minutes after expected trip round time. Also the station on your end rezzes a new one in every exprected round time plus 1 minute. If the shuttle gets bounced, at least you are guarenteed to get another within a few minutes.

As I said: last resort, though.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
09-16-2005 08:10
Barring lag, it should be totally regular. That's a good idea, thanks. If my sensor idea doesn't work, I may have to resort to something like this.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
09-16-2005 08:54
I think I'm right in saying all non-physical objects don't generate collision events, they're allowed to interpenetrate and do other real world silly things (like hover) although physical objects (including avies) can 'strike' non-physical ones so you can walk on the floor.

That means llVolumeDetect certainly won't work - nothing would be physical, nothing generates a collision.

I'd say, although I've not tested it, that a 60s repeat sensor isn't too dire, especially since it can search for a specific entity which does seem to make things better on the sensor front in my limited testing.

That said maybe the rezzing a new shuttle should be your first option? The object takes a known time, gives any passengers a time to disembark and then dies. 30s or whatever before the next trip a new one is rezzed, announces its time of departure then goes and dies. Rezzing objects has some impact on the sim, but I suspect a rez every 60s is less than a sensor every 60s.

As for returning, the rules aren't clear cut. If you're sat in a vehicle over linden land and then log (what am I saying, nothing ever goes wrong forcing you to log when using a vehicle!) and sit on it when reentering the world the object will sometimes get autoreturned from under you...

I've also had an object that wasn't wholely over Linden Land returned, not 5 minutes later, but about 4 days and 5 minutes... It didn't move in that time.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
09-16-2005 09:58
From: someone
I'd say, although I've not tested it, that a 60s repeat sensor isn't too dire, especially since it can search for a specific entity which does seem to make things better on the sensor front in my limited testing.


I did set it to scan just for the name of the shuttle. I could go a step further and rez the first trolley from the scanner too, save the key from the object_rez event, and scan for a single key each time, but I'm not sure that will gain me anything, unless the server can access an object by key much faster than by name. Even then I'm not sure it's worth it, and it means the owner can't manually create a shuttle any more.

From: someone
Rezzing objects has some impact on the sim, but I suspect a rez every 60s is less than a sensor every 60s.


Really? That surprises me. This 'vehicle' is about 40 - 50 prims, IIRC, with lights.

From: someone
As for returning, the rules aren't clear cut.


OK. I'm glad I'm not the only one confused by this behavior :)