Kwakkelde Kwak Posted November 29, 2011 Share Posted November 29, 2011 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.... Link to comment Share on other sites More sharing options...
Rolig Loon Posted November 29, 2011 Share Posted November 29, 2011 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 More sharing options...
Rolig Loon Posted November 29, 2011 Share Posted November 29, 2011 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 More sharing options...
Kwakkelde Kwak Posted November 30, 2011 Share Posted November 30, 2011 Ah the ++ ...I'm not that experienced with scripting 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