Jump to content

remote texture switcher


ImojenSander
 Share

You are about to reply to a thread that has been inactive for 2915 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 2915 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...