Attachment Type Checker

De DigiWiki.

Version du 11 mars 2012 à 04:33 par Djphil (discuter | contributions)
(diff) ← Version précédente | Voir la version courante (diff) | Version suivante → (diff)
// Attachment Type Checker 1.0
// Is this object a HUD attachment, a regular attachment, or is it unattached?
 
checkAttachmentSlot()
{
    integer slot = llGetAttached();
    if (slot == 0)
    {
        llOwnerSay("Not attached.");
    }
 
    else if (slot > 0 && slot <= 30)
    {
        llOwnerSay("Attached to the avatar.");
    }
 
    else if (slot > 30 && slot <= 38)
    {
        llOwnerSay("Attached to the HUD.");
    }
}
 
default
{
    state_entry()
    {
        checkAttachmentSlot();
    }
 
    on_rez(integer start_param)
    {
        llResetScript();
    }
 
    attach(key id)
    {
        llResetScript();
    }
}
Outils personnels
donate
Google Ads