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
Bee Bee_and_Beehive  

Bee_and_Beehive

The eye script

Category: Bee
By : Ferd Frederix
Created: 2012-03-11 Edited: 2012-03-11
Worlds: Second Life

the Zip file

Download all files for Bee_and_Beehive
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Bee_and_Beehive_1.lsl
Get file # 2. Bee_and_Beehive_2.lsl
Get file # 3. Bee_and_Beehive_3.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 default
2 {
4 {
7
8 list data = llParseString2List(texture1,[";"],[]);
9 string X = llList2String(data,1);
10 string Y = llList2String(data,2);
11 string Z = llList2String(data,3);
12
13 integer sideX = (integer) X;
14 integer sideY = (integer) Y;
15 float speed = (float) Z;
16
17
18 llSetTextureAnim(ANIM_ON|LOOP,ALL_SIDES,sideX,sideY,0,4,speed);
19 llSetTexture(texture1,ALL_SIDES);
20 }
21 }

Bee_and_Beehive

The wing script

Category: Bee
By : Ferd Frederix
Created: 2012-03-11 Edited: 2012-03-11
Worlds: Second Life


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 default
2 {
4 {
6 }
7 }

Bee_and_Beehive

The bee script

Category: Bee
By : Ferd Frederix
Created: 2012-03-11 Edited: 2012-03-11
Worlds: Second Life


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
2 // Simple Bee script to locate and gather pollen from all prims named "Flower" then returns to the Beehive"
3 // Requires 2 sounds buzz1 and buzz2
4
5 string FLOWER_NAME = "Flower";
6 string HIVE_NAME = "Beehive";
7 vector offset = <0,.10,.1>;
8 vector hive_offset = <0,.5,0>;
9
10
11 // This is an OpenSim compatible llLookAt()!
12 face_target(vector lookat)
13 {
14 rotation rot = llGetRot() * llRotBetween(<0.0 ,0.0 ,1.0 > * llGetRot(), lookat - llGetPos());
15 llSetRot(rot);
16 }
17
18
19 default
20 {
22 {
23 llSetTimerEvent(5); // move every 5 seconds
24 }
25
27 {
28 llSetTimerEvent(5); // move every 5 seconds
29 }
30
31 timer()
32 {
33 llSensor(FLOWER_NAME, NULL_KEY, ACTIVE|PASSIVE, 15.0,PI);
35 }
36
37 sensor(integer numDetected)
38 {
39
40 integer i;
41 string name = llDetectedName(0);
42
43
44 if(name == FLOWER_NAME)
45 {
46 for (i = 0; i < numDetected; i++)
47 {
48 llPlaySound("buzz1",1.0);
49
50 vector new = <90,0,0> * DEG_TO_RAD;
51 rotation r = llEuler2Rot(new);
52
53 face_target(llDetectedPos(i));
54
55 llSetPos(llDetectedPos(i) + <0,0.1,0>);
56 llSetRot(llDetectedRot(i) * r);
57 llSleep(4);
58 }
59 llSensor(HIVE_NAME,NULL_KEY,ACTIVE|PASSIVE,15.0,PI);
60
61 } else {
62 llPlaySound("buzz2",1.0);
63 vector pos = llDetectedPos(0);
64 face_target(llDetectedPos(0)); // face beehive
65
66 llSetPos(pos + hive_offset);
67 vector new = <90,0,0> * DEG_TO_RAD;
68 rotation r = llEuler2Rot(new);
69
70 llSetRot(llDetectedRot(0) * r); // orient to it
71 llSleep(1);
72 llSetPos(pos ); // move in
73
74 llSleep(10);
76 llSetPos(pos + hive_offset); //move out
77 llSleep(1);
78 }
79 }
80
81 no_sensor()
82 {
84 }
85 }

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