Jump to content

Touch Texture Change Script


Talitha Midal
 Share

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

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

Recommended Posts

It sounds like maybe your sim is having a problem.  That sort of simple editing should always work.  I assume that you are using the script editor in your viewer, or are copying directly from an external editor like LSLEditor, not from something like your word processor.  Try standing in another sim while you do it and see what happens.

BTW, the script you just posted compiles just fine.  It really ought to be indented for clarity and I still advocate using curly brackets after that if test, even if they aren't absolutely necessary in this case.  Even if you don't do any cleanup, though, this script should perform properly now.

Link to comment
Share on other sites


Kwakkelde Kwak wrote:


Patrick Playfair wrote:

 

{

llSetTexture("textures",current_index);

if(++current_index >= textures_number)

current_index = 0;

}

 

 

I'm not sure, but  "textures" isn't specified from what I can see and current_index never changes....

Good catch!  "textures" will be interpreted as the name of a texture in the object''s inventory.  What the OP want here is llSetTexture(llList2String(textures, current_index),ALL_SIDES) , using the variable name for the global list he has defined above.  He is incrementing current_index, though.  It's right there in the if statement.

Link to comment
Share on other sites

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