Don't click here unless you want to be banned.

LSL Wiki : LibraryListenTexture

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org
This script, when placed into an object, will listen for "text *", where * is the key of the texture to use.
It can get annoying if you place it into a lot of prims, so don't use it a lot.

//Listening Texturer script by Aldar Rayner
default
{
    state_entry()
    {
        //Listen to my owner.
        llListen(0,"",llGetOwner(),"");
    }

    listen(integer chan, string name, key id, string msg)
    {
        //Figure out what the key is and use it.
        list parsed = llParseString2List(msg,[" "],[]);
        string text = llList2String(parsed,0);
        string texture = llList2String(parsed,1);
        //Edit the word text in quotes to change the trigger keyword.
        if(text == "text")
        {
            llSetPrimitiveParams([PRIM_TEXTURE,ALL_SIDES,(key)texture,<1,1,0>,<0,0,0>,0.0]);
        }
    }
}

Script Library | Examples | ClientAssetKeys
There is no comment on this page. [Display comments/form]