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
Movement Moving_Mountains__like_in_Avatar  

Moving_Mountains__like_in_Avatar

The numbers at the top set the range the rocks will move. Just make some large prim rocks, drop this script inside, and set your max X and Y parameyers. You can set the height range as well as how close to the edge it goes. The value 20 is the amount i wanted to move. If you change this to a lower number, and change the timer to run faster, you can make rocks that move as if they are in a breeze

Category: Movement
By : Ferd Frederix
Created: 2010-07-18 Edited: 2010-07-18
Worlds: Second Life

the Zip file

Download all files for Moving_Mountains__like_in_Avatar
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Moving_Mountains__like_in_Avatar_1.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 float maxX = 150; // 255 max
2 float minXY = 10; // get no closer than 10 meters to any edge
3 float maxY= 180; // 255 max
4 float minH = 35; // go no lower than this
5 float maxH = 100; // go no higher than this
6
7 default
8 {
10 {
11 llSetTimerEvent(600.0); // every 10 minutes, move mountains
12 }
13
14 timer()
15 {
16 vector C;
17
18 C= llGetPos();
19
20 if(C.y > maxY) // N
21 C.y -= 20;
22
23 if(C.x > maxX) // E
24 C.x -= 20;
25
26 if(C.x < minXY) // W
27 C.x += 20;
28
29 if(C.y < minXY) // S
30 C.y += 20;
31
32 if(C.z > maxH) // U
33 C.z -= 20;
34
35 if(C.z < minH) // D
36 C.z += 20;
37
38
39 float sign = llFrand(2.0);
40 if(sign > 1.0)
41 C.x += llFrand(10);
42 else
43 C.x -= llFrand(10);
44
45 sign = llFrand(2.0);
46 if(sign > 1.0)
47 C.y += llFrand(10);
48 else
49 C.y -= llFrand(10);
50
51 sign = llFrand(2.0);
52 if(sign > 1.0)
53 C.z += llFrand(10);
54 else
55 C.z -= llFrand(10);
56
57
58 llSetPos(C);
59
60 }
61 }

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