Jump to content

remote texture switcher


ImojenSander
 Share

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

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

Recommended Posts

hi i got a script that when clicked on changes texture on the object, however this object i want to be a button you click and the texture changes on a object next to it. iv seen the swashbucklers script but couldnt get it to work.

any help would be aperciated 

integer choice;
default
{
//   state_entry()
//    {
//            llSetTimerEvent(Timer);
//    }
    
//     timer()
    touch_start(integer total_number)
    {
        integer number = llGetInventoryNumber(INVENTORY_TEXTURE);
        choice ++;
        if (choice == number)
            choice = 0;
            
        string name = llGetInventoryName(INVENTORY_TEXTURE, choice);
        
        if (name != "")
            llSetTexture(name, ALL_SIDES);
    }
}
Link to comment
Share on other sites

The texture changing script has to be in the object that changes textures.  The script with a button on it is nothing more than a communicator.  Its only job is to tell the texture changing script that somebody pushed a button.  So take your script, replace its touch_start event with a listen event that does mostly the same thing, and write a new script that sends a trigger message when you touch it.

Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...