Here's the object's script:
attach( key id )
{
if (id)
{
llWhisper(-642, "Holding"
;}
else
{
llSay(-642, "Detached"
;}
}
Here's where the AO listens for a report from the object:
listen(integer channel, string name, key id, string msg)
{
if (llGetOwnerKey(id) == llGetOwner())
{
if (msg == "Holding"
{
helditem = TRUE;
}
if (msg == "Detach"
{
helditem = FALSE;
}
And where it changes the running action according to the helditem integer:
if (animstate == "Running"

{
if (aostate != 2)
{
StopAll();
llStartAnimation(run);
aostate = 2;
if (helditem)
{
llWhisper(-742,"fold"
;}
if (!helditem)
{
llWhisper(-742,"unfold"
;}
}
}
No matter what I do, the detach message is never recognized by the AO script. I've tried different types of if statements, Mono/not Mono, etc, and it just doesn't work. The helditem integer always gets stuck on TRUE even when the command for making it FALSE has been sent. Any ideas?
