Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
ANimation Flame  

Flame

Flame.lsl

Category: ANimation
By : Anonymous
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Flame
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Flame_1.lsl
1
2 integer animOn = TRUE; //Set to FALSE and call initAnim() again to stop the animation.
3
4 //Effect parameters: (can be put in list together, to make animation have all of said effects)
5
6 //LOOP - loops the animation
7 //SMOOTH - plays animation smoothly
8 //REVERSE - plays animation in reverse
9 //PING_PONG - plays animation in one direction, then cycles in the opposite direction
10
11 list effects = [SMOOTH,LOOP];
12
13 //Movement parameters (choose one):
14 //ROTATE - Rotates the texture
15 //SCALE - Scales the texture
16 //Set movement to 0 to slide animation in the X direction, without any special movement.
17
18 integer movement = 0;
19
20 integer face = ALL_SIDES; //Number representing the side to activate the animation on.
21 integer sideX = 1; //Represents how many horizontal images (frames) are contained in your texture.
22 integer sideY = 1; //Same as sideX, except represents vertical images (frames).
23 float start = 0.0; //Frame to start animation on. (0 to start at the first frame of the texture)
24 float length = 0.0; //Number of frames to animate, set to 0 to animate all frames.
25 float speed = 10.0; //Frames per second to play.
26
27
28 initAnim() //Call this when you want to change something in the texture animation.
29 {
30 if(animOn)
31 {
32 integer effectBits;
33 integer i;
34 for(i = 0; i < llGetListLength(effects); i++)
35 {
36 effectBits = (effectBits | llList2Integer(effects,i));
37 }
38 integer params = (effectBits|movement);
39 llSetTextureAnim(ANIM_ON|params,face,sideX,sideY,
40 start,length,speed);
41 }
42 else
43 {
44 llSetTextureAnim(0,face,sideX,sideY,
45 start,length,speed);
46 }
47 }
48
49
50 default
51 {
53 {
54 initAnim();
55 }
56 }
57 // END //

Back to the Best Free Tools in Second Life and OpenSim.