Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Randpmly teleporting objects

Zaplok Riggles
Registered User
Join date: 25 Feb 2008
Posts: 119
03-15-2008 12:32
I have a need to randomly teleport objects to any valid location within a single region. I have the code working using the warppos concept (llSetPrimitiveParams with multiple prim_position settings to get it to go in one shot and avoid the 10m limit of llsetpos)

The problem:

If the location I am trying to randomly port to is restricted in some way (someones personal parcel that doesn't allow object entry or a restricted area of a sandbox for example), the object moves to the edge of the problem area. That's actually fine for my purposes but I get a warning (and then it tells me notifications are temporarily disabled)

What I need to be able to do is to turn off the warning before the fact. I KNOW I may get one and don't care. Can I somehow turn off those warnings before doing my warppos?

If not, is there any way anyone can think of to move an object to a random unknown location in a region and avoid bad parcels (stop before it tries to go into one?)

I am in the final stages of building a pretty cool scavenger hunt game and all is working except the gremlins which spawn and run around rezzing the items needed to be found (they port away randomly on a timer, temp rez a scavenger hunt item, then wait a minute and do it again)

I'd rather not have to force the game operator to pick locations for the objects to randomly spawn. That would require a lot of work to run the game. The idea of the ranomly moving/spawning gremlins seemed to make much more sense.

Is there a client setting to turn off parcel warnings perhaps that I could tell game operators to switch off when running the game?
Anthony Hocken
Registered User
Join date: 16 Apr 2006
Posts: 121
03-15-2008 15:53
When you randomize a position in the sim you could try checking the parcel flags for that location to see if it allows object entry and whether it has enough prims free to accomodate yours etc. And if not, randomize another location instead. See llGetParcelFlags or llGetParcelDetails. If some parcels inbetween are causing you issues you could try moving the object straight up, then to the correct X,Y, then back down.
_____________________