I have an object that rezzes another object, on rezzing the object it sends a message stating to kill the first object, (which is listening) and replace it with another from its inventory (which is cpyable). That part is simple and is working fine.
The problem is when i have multiple rezzers and I click any of them it KILLS all of the objects listening when what I want it do to is kill only its own object.
here is the code I have now
IN THE REZZER::
default
{
touch_start(integer total_number) { if (llDetectedKey( 0 ) == llGetOwner()) state open; }}state open { state_entry()
{
llSay(-50000,llGetKey());
llRezObject(llGetInventoryName(INVENTORY_OBJECT,0), llGetPos()+<0,-.112,1.142>,ZERO_VECTOR,llGetRot()+<-25,0,0,1.0>,0);
state default;
}
}
IN THE OBJECT::
integer rezzer_key;
integer listen_handle;
default
{
state_entry()
{ rezzer_key = llListen(-50000, "", "", ""
; listen_handle = llListen(-8675309, "", "rezzer_key", ""
; }
listen( integer channel, string name, key id, string message )
{
llListenRemove(listen_handle);
llDie();
}
}
I was trying to play with it but multiple copies of the rezzer still do not work. I want to be able to rez from inventory several rezzers and have them only take to the objects in there own inventory.
Thanks for any suggestions