Jump to content

Trying to Trigger 3 llsetlinktextureanim items in sequence


Samual Wetherby
 Share

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

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

Recommended Posts

Have 3 animated cell textures on a  light beams in a link set.

Trying to trigger 3 to fire one at a time in sequence.

Currently using 1 script to call to each beam to fire it's llsetlinktextureanim.

Need them to repeat from start to end on a loop until a stop is called.


I have everything else I need working. Calling named prims in a linkset for each beam to run it's llsetlinktextureanim and stop.

Just not figuring out how to trigger the llsetlinktextureanim nicely from one to the next and repeat.

Tried everything from llsleep to fire to next beam and start the llsetlinktextureanim, to adjust the starting cell of the animation texture and it's frames per second.


The llSleep works okay on 1sec or .05 second delay between firing each beam and gives the look of a sequence, but anything faster and doesn't work., Need a nice fast triggering of the 3 light beams from one to the other and back.

 

 

Link to comment
Share on other sites

use a timer & loop thru them?..kinda like so...

// send on / off command..... llSetTimerEvent(0.1) or llSetTimerEvent(0.0)

 

timer()

{

   integer n;

    llSetLinkTextureAnim(n, FALSE, ALL_SIDES, 0, 0, 0.0, 0.0, 1.0);
    ++n;
    if(n >3){n = 1;}
   llSetLinkTextureAnim(n, ANIM_ON | SMOOTH , ALL_SIDES, 1, 1, 1, 1, 1);
   llSetTimerEvent(0.1)

}

Link to comment
Share on other sites

Or, somewhat better, since your counter (n) needs to be global so that it doesn't reset on every timer cycle ....

timer(){
llSetLinkTextureAnim(n,FALSE,ALL_SIDES,0,0,0,0,0); n = (++n)%3; // Where you have defined n as a global integer variable llSetLinkTextureAnim(n,ANIM_ON|SMOOTH, ALL_SIDES,1,1,1,1,1);}

 Again, using a toggle in your touch_start event to turn the timer on/off.

 

Link to comment
Share on other sites

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