AS Texture Animation

From Second Life Wiki
Revision as of 11:02, 18 June 2012 by Silent Mole (talk | contribs) (Created page with "<lsl> →‎Animate the texture showing on all prims in the linkset named "EYE": // internal values list LinkIDs = []; list LinkedList(string Needle) { list Needles; …")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<lsl>

/*

 Animate the texture showing on all prims
 in the linkset named "EYE"
  • /

// internal values list LinkIDs = [];

list LinkedList(string Needle) {

   list Needles;
   integer Hay = 1;
   integer Stacks = llGetNumberOfPrims();
   for(; Hay <= Stacks; ++Hay ) if(llGetLinkName(Hay) == Needle) Needles += Hay;
   return Needles;

}

default {

   state_entry() {
       LinkIDs = LinkedList( "EYE" );
       
       integer x = llGetListLength(LinkIDs);
       integer y = 0;
       for ( ; y < x; ++y )
       {
           llSetLinkTextureAnim( llList2Integer(LinkIDs,y), ANIM_ON | LOOP | PING_PONG, ALL_SIDES, 2, 2, 0, 4, 10.0 );
       }
   }

}

</lsl>