Animated Flame

Thread Started By YoungMoney

2522
0
  • 28 Vote(s) - 3.18 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
PHP Code:
integer animOn TRUE//Set to FALSE and call initAnim() again to stop the animation.

//Effect parameters: (can be put in list together, to make animation have all of said effects)

//LOOP - loops the animation
//SMOOTH - plays animation smoothly
//REVERSE - plays animation in reverse
//PING_PONG - plays animation in one direction, then cycles in the opposite direction

list effects = [SMOOTH,LOOP];

//Movement parameters (choose one):
//ROTATE - Rotates the texture 
//SCALE - Scales the texture 
//Set movement to 0 to slide animation in the X direction, without any special movement.

integer movement 0;

integer face ALL_SIDES//Number representing the side to activate the animation on.
integer sideX 1//Represents how many horizontal images (frames) are contained in your texture.
integer sideY 1//Same as sideX, except represents vertical images (frames).
float start 0.0//Frame to start animation on. (0 to start at the first frame of the texture)
float length 0.0//Number of frames to animate, set to 0 to animate all frames.
float speed 10.0//Frames per second to play.


initAnim() //Call this when you want to change something in the texture animation.
{
    if(
animOn)
    {
        
integer effectBits;
        
integer i;
        for(
0llGetListLength(effects); i++)
        {
            
effectBits = (effectBits llList2Integer(effects,i));
        }
        
integer params = (effectBits|movement);
        
llSetTextureAnim(ANIM_ON|params,face,sideX,sideY,
        
start,length,speed);
    }
    else
    {
        
llSetTextureAnim(0,face,sideX,sideY,
        
start,length,speed);
    }
}


default
{
    
state_entry()
    {
        
initAnim();
    }

Reply




Possibly Related Threads…
Thread Author Replies Views Last Post
  Jet Flame ☠ MosDef ☠ 0 1,967 02-20-2013, 09:24 PM
Last Post: ☠ MosDef ☠

Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...