Don't click here unless you want to be banned.
LSL Wiki :
attach
HomePage
::
PageIndex
::
RecentChanges
::
RecentlyCommented
::
UserSettings
:: You are crawling22.us.archive.org
**##attach([[key]] id)##** This [[events event handler]] is triggered whenever the [[object]] is attached (which makes it an [[attachment]]) or detached from the [[agentandavatar avatar]]. If it is attached, **##id##** contains the [[key]] of the avatar it is attached to, otherwise **##id##** contains ##[[NULL_KEY]]##. Example: %%(lsl) 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. } } }%% Note: if both ##[[on_rez]]## and ##attach## are used, ##on_rez## will //always// be triggered first. Note: when the object is detached to inventory, it will be given a limited amount of CPU cycles to run its ##attach## event before it is derezed. There is no guarantee that all of the code within the ##attach## event will complete before the derez occurs. In particular, expensive operations such as ##[[llSetPos]]## may cause the script to be descheduled early, preventing timely execution of subsequent code. Does not fire in child prims, only in root of linked objects. Use the ##[[llAttachToAvatar]]##, ##[[llDetachFromAvatar]]## and ##[[llGetAttached]]## functions to play with attachments. ---- [[Events]] | [[agentandavatar Agent/Avatar]] | [[Attachment]]
Valid XHTML 1.0 Transitional
::
Valid CSS
:: Powered by
WakkaWiki 0.1.2