Jump to content

Delete When Rezzed If The Same Object Is Already Exists


joniveehernandez
 Share

You are about to reply to a thread that has been inactive for 3625 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

But if it got deleted after being rezzed, it would be impossible to rez another one because the database would still think it's there. Of course, the db could also contain the UUID of the objects it's tracking, and the newly rezzed one could first try llGetObjectDetails() to see if it's still around (and still on the same parcel), and if not, tell the db that the new one is replacing the one that had been registered.

It all does seem like a lot of work. On the plus side, once registered, the registration script could self-delete from the rezzed object--an advantage over it keeping a listen open to be able to respond to "are you there?" queries from new rez attempts.

Another approach, more prone to error (and hideous) would be to send out sensor probes looking for anything named the same as the newly-rezzed object. That's always a real pain to be sure the entire volume of the parcel has been scanned and nothing missed due to the limit of 16 returns per sensor event.

  • Like 1
Link to comment
Share on other sites

Yeah, that's a sledgehammer.  :smileywink:  You don't need an external database. Give your object a script that calls out its name with llRegionSay on a unique channel when it is rezzed.  If it hears another object call out its name, tell it commit suicide.  Since an object cannot hear itself, each new instance of the same object will only kill off previous (listening) ones, not itself.

  • Like 2
Link to comment
Share on other sites

The only issue with all of the above solutions ( and I would recommend the llRegionSay() solution mentioned above ), is that if the user of the scripted object is smart ... and doesn't care about the scripts of an object, but only the object (such as, say, a tree that has a script only for this security purpose and not for base functionality), they can delete the script within the first object before rezzing the second.  In that case, no solution will work.

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3625 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...