Jump to content

Dissable multiple rezzing


steph Arnott
 Share

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

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

Recommended Posts

You could certainly make it valid, Steph.  For example:

integer start_param;default{    touch_start(integer num)    {        if (!start_param)        {            llRezAtRoot("MyObject",llGetPos(),ZERO_VECTOR,ZERO_ROTATION,start_param);        }        else if (start_param > 0)        {            llSay(0,"Sorry, I have already rezzed the object once.");        }        ++start_param;    }}

 EDIT: Of course, you could also just make the rezzable object no-copy. That is, make the object no-copy, give it to your alt, and have her put it in the rezzer. Once that copy is rezzed, there's nothing left in the rezzer to rez a second time.

  • Like 1
Link to comment
Share on other sites

Hi Steph!

 

The start_param of the on_rez event is the value passed by the llRezObject or llRezAtRoot function. Its not reliable to check if the object already exist in-world either by function or manual rez. If an object gets rezzed manually, start_param will return 0, no matter if its the first or second object in-world.

  • Like 1
Link to comment
Share on other sites

Not sure how the start_parameter will help you since the rezzed object gets that info from the rezzer.

The "object_rez" event is triggered in the rezzer when it rezzes an object.
It delivers the uuid of that rezzed object. Store that in a global variable.

On next rez you use llGetObjectDetails with that uuid.
If you get an empty list the object is not in sim and you can rez it. If you get the requested value the object is already there and you don't rez it again.

  • Like 1
Link to comment
Share on other sites

Aha!  If that's the idea, then what you do is script the rezzed object to listen to the rezzer.  When you decide to rez a new object, send a DIE! message to the rezzed copy first.  Then rez the new one. You don;t need to keep track of the rezzed object's UUID or do any internal counting in your rezzer.  Just send a llRegionSay message each time you are about to rez a new object.

  • Like 1
Link to comment
Share on other sites

Yes, but I'm not sure why you'd want to do it.  If you clear the contents of the list each time you rez a new object, it will never have more than the one new object UUID that you enter in the object_rez event. You might as well just save the UUID as a single key variable and be done with it.

In this particular case, though you don't truly need to save the UUID at all. If you only plan to allow one copy of your object to be rezzed at a time, all you have to do is yell, "Die!" with llRegionSay on a unique channel and have whatever was rezzed before hear it and die.  You don't need to know its UUID.  It's the only thing that will be listening on your channel.  Just be sure to yell it before you rez the next one.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2591 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...