Jump to content

Texture swap on window


You are about to reply to a thread that has been inactive for 3532 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

You just replace ALL_SIDES with the number of the face you want to affect.  So, for example, if your script currently says

llSetTexture ("My_window_texture", ALL_SIDES);

and you only want to change face #4, change it to

llSetTexture ("My_window_texture", 4);

Link to comment
Share on other sites

Thank you for your patience with me, as a non-skilled-scripter, Rolig :)

I did this...and now the script will not work anymore, at all:

 

////Add script and up to 100 textures to object///

integer number;
string name;
integer choice = 0;

default
{
    state_entry()
    {
        number = llGetInventoryNumber(INVENTORY_TEXTURE);
        number -= 1;
        name = llGetInventoryName(INVENTORY_TEXTURE, choice);
        if (name != "")
        {
            llSetTexture(name, 4);
            choice = choice + 1;
        }
    }

    touch_start(integer total_number)
    {
        if (choice < number)
        {
            name = llGetInventoryName(INVENTORY_TEXTURE, choice);
            if (name != "")
            {
                llSetTexture(name, 4);
                choice = choice + 1;
            }
        }
        else
        {
            name = llGetInventoryName(INVENTORY_TEXTURE, choice);
            if (name != "")
            {
                llSetTexture(name, 4);
                choice = 0;
            }
        }
    }
   
    changed(integer change)
    {
        if (change & CHANGED_INVENTORY)
        {
            llResetScript();
        }
    }
}

Link to comment
Share on other sites

I did as shown in my copy-paste of the changed script in my former reply. But something must have gone wrong, because the window does not react at all anymore, when I click on it to change texture.

Sorry, but I don't even know, where to look for the proper face number in the editor...I just replaced with the number 4, as you told me before.

I can use scripts, which are created by others, but I have absolutely no knowledge of how to change scripts myself, sorry.

Link to comment
Share on other sites

It's probably changing the texture on face #4, but that's not the right one for YOUR window.  It was only an example, after all.  The script should be fine.  Open it and take a look.  If the Running box is checked, it's good.

To get the right face number, look at the top part of your Edit window and click the Select Face button. Then click on the face you're interested in.  The face number should be indicated in your edit tool.  That is a semi-reliable feature of the Edit tool.

Face 2.jpg

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3532 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...