LlSetObjectName

De DigiWiki.

// WARNING:
//
//      llSetObjectName(string name); sets the name of the prim containing the script.
//
//      to set the name of a linkset's root prim use
//      llSetLinkPrimitiveParamsFast(LINK_ROOT, [PRIM_NAME, string name]); instead
 
default
{
    touch_start(integer total_number)
    {
        // store owner's legacy name in the name
        // field of the prim containing the script
 
        string ownerLegacyName = llKey2Name(llGetOwner());
 
        if (llGetSubString(ownerLegacyName, -1, -1) == "s")
            llSetObjectName(ownerLegacyName + "' prim");
        else
            llSetObjectName(ownerLegacyName + "'s prim");
    }
}
Outils personnels
  • Cette page a été consultée 544 fois.
donate
Google Ads