ImojenSander Posted April 30, 2016 Share Posted April 30, 2016 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 More sharing options...
Rolig Loon Posted April 30, 2016 Share Posted April 30, 2016 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 More sharing options...
ImojenSander Posted May 1, 2016 Author Share Posted May 1, 2016 ok thanks thats helped me to go in the right direction cheers Link to comment Share on other sites More sharing options...
Recommended Posts
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