CODE
{
benchname = "Big Bench";
llSay(killchannel, (string)killoffset);
// killchannel is defined elsewhere as an integer = 3657 and killoffset = 10
llOwnerSay((string)killchannel + (string)killoffset);
// This debug statement yields the result 365710, as it should
llRezObject(benchname, llGetPos() + <2, 0, 0> + kvector, ZERO_VECTOR, ZERO_ROTATION, killoffset);
}
and the object to be rezzed has a script in it that looks like this ......
CODE
integer channel;
string tag;
default
{
on_rez(integer start_param)
{
tag = (string)start_param;
llSetObjectName(llGetObjectName() + tag);
llSay(0,"Hello! I am your new bench. Please take a seat.");
// The script works fine to this point. The object is created with name =Big Bench10.
}
state_entry()
{
channel = 3657 + (integer)tag;
llListen(channel,"",NULL_KEY,"");
}
listen(integer channel, string name, key id, string message)
{
string kill = llGetSubString(llGetObjectName(), -2, -1);
if(message == kill)
{
llDie();
}
}
}
If I only wanted to rez one object once, I would be happy. The script does that. If I run the script a second time, though, it SHOULD delete the object that I rezzed the first time. It doesn't. HOWEVER, if I type "/3667 10" in chat, the previously rezzed object dies beautifully. I really don't understand what's going on. Because it understands the command when I type it, the rezzed object obviously knows what channel to listen on, and it knows how to make the variable "kill" properly. So why won't it listen to the same command when the parent object says it on that channel?
EDIT: Hold on.... I may have found the mistake..... IF someone else sees what I do, don't hesitate to tell me.

Thanks.
