Jump to content

General Curiosity


Britlan
 Share

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

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

Recommended Posts

I was reading a review where someone was suggesting needed updates to a club floor and I was curious if most were even possible? I have only done a few scripts including the generic texture animation but some of these ideas sound impossible or maybe just adding too many buttons to a menu? I would like to do a picture in a similar way though.

The first seems simple enough to just add an on and off button to stop any of the floor animations running=

llSetTextureAnim(FALSE, ALL_SIDES, 0, 0, 0.0, 0.0, 1.0);

The second idea was making the menu stay up after making a choice rather than touching the floor to bring up a menu again. I have seen this before in some menus, but I thought this was a script error. Useful in some respects I guess, but not really sure why this would be needed though.

Ideas 3 and 4 seem like a lot of extra scripting and menu buttons to me unless there is a 1 button option that could be used on 20 or so texture animations.

Speed control for each effect

I guess "if" every texture has the same number of cells (16 for example)in an image this could be done in maybe 3 buttons after the effect is chosen?

Slow=

llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 4, 4, 0.0, 16.0, 4.0 );

Medium=

llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 4, 4, 0.0, 16.0, 8.0 );

Fast=

llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 4, 4, 0.0, 16.0, 12.0 ); 

If every effect or most has a different number of cells however, wouldn't you then need 3 buttons per effect? 3 speed buttons x 20 choices = 60 buttons. I hope I am wrong on that, that would be like over 6 menu pages just for speed. lol

The last idea was creating an auto feature for the effects. Possible I guess but this option sounds like it would be rather laggy.

Anyway, I was just curious how most would see these issues. My limited experience in scripting probably causes me to miss simple tricks or ideas that may be more obvious to others who have been doing this longer of course. lol 

 

Link to comment
Share on other sites

Speed button could be just two for all, ie + and - as in a add or subtract counter. a+1 or a-1 being the speed variable.

Menu could stay open all the time, have no idea why any one would want that but normaly a timer is started and when reaches zero closes the listeners and sets the scriprt at the begining  Could set the timer to 3600 if you wanted to, that be an hour.

In short,

main menu,  texture,  speed

sub menu texture list     buttons for all your textures

sub menu speed             two buttons  that say + and -

ADDED you could have three button in the speed  slow medium fast with the variables set to a = 4 a = 8 a =12

Link to comment
Share on other sites

No great scripter myself but I made a picture like this once before and you can stop the texture animation as you said. I had 10 picture options, 9 animated and 1 just normal texture. Most of the animated pictures had a different number of frames so each button choice set a texture as well as the texture animation to the image.

1) On-Off as you mentioned should work. My off option was just a normal image with no animation.

2) No reason to keep the menu open after a choice to me. Easy to reopen as needed.

3) I did not have a speed option on the animated pics but I would have thought you were right there too. As Steph explains, it sounds simple enough. just changing the actual speed of the texture animation without altering the rest of the code in another menu. I'll have to research how that is done though

4) No clue on what you mean by an auto feature

Link to comment
Share on other sites

 

1. use a variable ...  and set the state like so,

integer switch = 0;

  if (button == "On/Off")
{  llSetTextureAnim(switch=switch^0x01 | SMOOTH | LOOP, ALL_SIDES, 0, 0, 0.0, 0.0, 1.0);

}

 

2.  all you do is RE-add the Dialog call in your button handling event.

  if (button == "Fast")
{  llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, X, Y, 0.0, 16.0, 12.0 ); 

  llDialog( toucher, "\n \nPick an option...",["Speed","On/Off"], channel );

}

 

3. make a list of textures and their X and Y (horiz and vert frames)  and when the texture changes,

  change the variables for the X and Y ?

integer X;

integer Y:

list textures =  ["texture #1 UUID here",4,4,"texture #2 UUID here",8,8]       // etc etc and use strides or List2Integer to get the X and Y amounts.

llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, X, Y, 0.0, 16.0, 12.0 ); 

 

// now all you need is a speed variable

integer Speed;

and the button handling event changes the variable...

 if ( button = "Fast")

{   Speed = 12;

    llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, X, Y, 0.0, 16.0, Speed);

   // you may need float variables for start and length too?

}

 

4. auto feature sounds like you need a timer event to change the texture & speed.

Link to comment
Share on other sites

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