Join us in Outworldz at 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.

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
Physical simulations SL_Swarming_Script  


The swarm algorithm in its purest sense ...

Category: Physical simulations
By : Apotheus Silverman
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for SL_Swarming_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. SL_Swarming_Script_1.lsl
1 //edited by Ferd to add a rez param
2 // for objects, see
3 default {
6 }
7 timer() {
8 // Rez in a random location within a 10m cube. Don't use 5 in lieu of 5.0 or you could end up with slightly odd results due to the automatic conversion to integer instead of float.
9 vector mypos = llGetPos();
10 mypos.x += llFrand(10) - 5.0;
11 mypos.y += llFrand(10) - 5.0;
12 mypos.z += llFrand(10) - 5.0;
13 llRezObject("swarm object", mypos,<0,0,0>, <0,0,0,1>,0 );
14 }
15 }

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