|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
10-25-2008 08:31
...<vector> in region <region> because your objects are not allowed on this parcel.
Sooner, or later - probably sooner - your free movng physical objects will start complaining to you in IM that they aren't allowed on some parcel or other. At that point they will also turn non-physical and just stick in place.
Question: Does anyone know of way to avoid this message in the first place?
Something akin to: STATUS_DIE_AT_EDGE maybe? Just some way of silencing it? I'm not looking for a heavily engineered 'navigational' solution, just something that will cause the physical object to die (and die quietly) if it tries to move some place it's not allowed to enter.
If such a feature doesn't exist I think it would be useful to add one. The: 'objects are not allowed on this parcel' messages are pretty useless most of the time - and possibly more expensive than simply removing the object from the sim.
Any ideas?
|
|
Pedro McMillan
SLOODLE Developer
Join date: 28 Jul 2007
Posts: 231
|
10-25-2008 10:08
EDIT: just realised this doesn't entirely answer your question, as it won't silence the messages... doh! A slightly odd solution might be to have a timer executing relatively infrequently (maybe just every hour), which simply uses "llGetPrimitiveParams" or "llGetStatus" to check if the object is still physical. If it's not, then it deletes itself. Obviously you'd end up in a pickle if you're trying to edit your object though, and temporarily make it non-physical. The solution to that might be to make sure your timer is quite a long period, and reset it every time the object moves... then so long as you don't leave your object non-physical for too long, you should be OK. The complete script might look something like this: float timerPeriod = 3600.0;
default { state_entry() { llSetTimerEvent(0.0); llSetTimerEvent(timerPeriod); }
moving_end() { llSetTimerEvent(0.0); llSetTimerEvent(timerPeriod); }
timer() { if ( ! llGetStatus(STATUS_PHYSICS) ) llDie(); } }
I'm not sure if the "llSetTimerEvet(0.0)" bit is still necessary to properly reset a timer, but I always add it in anyway... just in case. 
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
10-25-2008 10:17
For physical objects, about the best you can do is poll with a script to check whether the next parcel in their direction of motion will allow them in, and if not, correct their direction. The current behavior for things hitting such parcels is rather unfortunate.
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
10-25-2008 11:10
@Pedro Nice try.  Unfortunately as you latter realised it's the message that I'm trying to avoid. @Tyken I'm guessing you mean: llGetParcelFlags with PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY and PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY That's rather more engineering than I was hoping for. Plus, doesn't it only work for the region you're already in... i.e. vector pos cannot cross a sim boundary? Also, for a fast moving object you'd need a manically fast timer.
|
|
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
|
10-25-2008 11:20
You could use a while loop. It totally sucks, regardless.
I think it might be worth making a JIRA request for a change in the behavior, if one doesn't already exist. When a physical object (or non-physical, moved using a position function) tries to enter a parcel it can't enter, instead of being frozen it should be pushed backed like avatars are when they try to enter banned parcels.
|