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
Water Animation L63wavingwaters  

L63wavingwaters

L6.03-waving-waters.lsl

Category: Water Animation
By : Dana Moore
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for L63wavingwaters
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. L63wavingwaters_1.lsl
1
2 // Copyright (c) 2008, Scripting Your World
3 // All rights reserved.
4 //
5 // Scripting Your World
6 // By Dana Moore, Michael Thome, and Dr. Karen Zita Haigh
7 // http://syw.fabulo.us
8 // http://www.amazon.com/Scripting-Your-World-Official-Second/dp/0470339837/
9 //
10 // You are permitted to use, share, and adapt this code under the
11 // terms of the Creative Commons Public License described in full
12 // at http://creativecommons.org/licenses/by/3.0/legalcode.
13 // That means you must keep the credits, do nothing to damage our
14 // reputation, and do not suggest that we endorse you or your work.
15
16 // Listing 6.3: Waving Waters
17 vector gFullWest = <98.500, 188.700, 113.00>; // substitute your coordinates here
18 vector gFullEast = <99.325, 188.700, 113.00>; // substitute your own coordinates
19 vector gCurrentPos; // will vary between full west and full east
20 float gAdjuster;
21
22 move_on()
23 {
24 if(gCurrentPos.x <= gFullWest.x){ gAdjuster = 0.01; }
25 if(gCurrentPos.x >= gFullEast.x){ gAdjuster = -0.01; }
26 gCurrentPos.x += gAdjuster;
27
28 // uncomment this line only when you know that the gFullWest and gFullEast
29 // are correct
30 // llSetPos(gCurrentPos);
31 }
32
33 default
34 {
35 state_entry() {
36 gCurrentPos = gFullWest;
37 llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 1.0, 1.0, 0.05);
38 llSetTimerEvent(1.0);
39 }
40 timer() {
41 move_on();
42 }
43 }
44 // END //

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