Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Can't trigger attach event

Dominus Skye
Bug Magnet
Join date: 31 Oct 2004
Posts: 54
12-08-2004 01:53
I'm having trouble using the attach event. Created a prim, and dropped the following sample wiki code into it:

default
{
attach(key attached)
{
if (attached != NULL_KEY) // object has been attached
{
llWhisper( 0, "I'm stuck on you, " + llKey2Name(attached) );
// etc.
}
else // object has been detached
{
llWhisper( 0, "Why hast thou forsaken me?" );
// etc.
}
}
}

but no matter how I try to wear or attach the object, it seems that the attach event never gets triggered. Any clues? Thanks.

Dominus
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
12-08-2004 03:10
did you make sure the script was running? btw attach only fire on attach or detach, teleport, and login, detach, and on rez.
Water Rogers
Registered User
Join date: 1 May 2003
Posts: 286
12-08-2004 03:18
code looks fine.

Are you in a no-script zone by any chance?

--Water
_____________________
From: Philip Linden

For the more technically minded - the problem is actually NOT the asset server (or 'asshat' as you prefer to affectionately call it herein).
Dominus Skye
Bug Magnet
Join date: 31 Oct 2004
Posts: 54
12-08-2004 08:56
oh no, must have been a long night lol - I was about to answer glibly 'of course I made sure the script was running....' but then when I *really* made sure .....

well, suffice to say it works now lol - thx for your help.
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
12-08-2004 12:13
This might be just me, but what I think i've noticed is if you close the script window while it's compiling some time the script seems to turn it self off.
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
12-08-2004 17:44
From: Kurt Zidane
This might be just me, but what I think i've noticed is if you close the script window while it's compiling some time the script seems to turn it self off.

I've noticed that too Kurt, and sometimes it doesn't save at all (only when saving a few times before closing the script have i seen this, where the most recent save doesn't work). I'd bug report it but it's only hapenned a very few times.