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 Nyterave_Anim8_Ball_2  

Nyterave_Anim8_Ball_2

Nyterave Anim8 Ball 2.lsl

Category: Animation
By : Sitting Lightcloud
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Nyterave_Anim8_Ball_2
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Nyterave_Anim8_Ball_2_1.lsl
1
2 //*****************************************
3 //* Nyterave animation ball script! *
4 //* FREE TO USE V2.1 *
5 //* by Sitting Lightcloud *
6 //******************************************/
7
8 // * * * * * * * MODIFY BELOW * * * * * * *//
9
10
11 // position to sit on the ball e.g <0.0, 0.00, 0.95>
12 // sit 0.5 meter above the ball
13 vector POSITION=<0.0, 0.00, -0.5>;
14
15 // hovertext above ball. "" for none.
16 // add '\n ' at the end to move text up i.e.
17 // string HOVERTEXT="Sit Here\n ";
18 string HOVERTEXT="Sit Here";
19
20 // Pie Menu Sit Text. Will only work for the
21 // main prim but included it anyway. If no text
22 // is entered between "" it won't be used.
23 string SIT_TEXT="";
24
25
26 // hovertext color 'r,g,b' e.g. "255,255,255" (white)
27 string HOVER_RGB="255,255,255";
28
29 // LISTEN sets if this ball should listen for voice commands
30 // or not. You only need to enable this for 1 ball if you
31 // link several balls to an object. (to reduce lagg).
32 // Change to TRUE to enable FALSE to disable.
33 integer LISTEN=FALSE;
34
35 // What channel to listen for hide/show on. If you want to
36 // listen to normal conversation (hide/show), set channel
37 // to 0 otherwise the command will be /channel hide, show
38 integer CHANNEL=9;
39
40 // * * * * * * * STOP MODIFY * * * * * * * *//
41
42
43
44
45 set_text()
46 {
47 if(llStringLength(HOVERTEXT)>0)
48 {
49 rgb=llCSV2List(HOVER_RGB);
50 llSetText(HOVERTEXT,<llList2Float(rgb,0)*0.003921568627450980392156862745098,llList2Float(rgb,1)*0.003921568627450980392156862745098,llList2Float(rgb,2)*0.003921568627450980392156862745098>,1.0);
51
52 }
53 else
54 llSetText("",<0,0,0>,0.0);
55 }
56 start_listen()
57 {
58 llListenRemove(listener);
59 if(LISTEN==TRUE)
60 listener=llListen(CHANNEL,"","","");
61 }
62 hide_me()
63 {
65 llSetText("",<0,0,0>,0.0);
66 }
67 show_me()
68 {
70 set_text();
71 }
72 list rgb;
73 string animation;
74 integer listener;
75 default
76 {
78 {
79 if(llStringLength(SIT_TEXT)>0)
80 llSetSitText(SIT_TEXT);
81 llSitTarget(POSITION, ZERO_ROTATION);
82 set_text();
83 start_listen();
84 }
85
87 {
88 start_listen();
89 }
90
91 listen(integer channel, string name, key id, string msg)
92 {
93 if(msg=="hide")
94 {
95 hide_me();
97 }
98 else if(msg=="show")
99 {
100 show_me();
102 }
103 }
104
105 changed(integer change)
106 {
107 if(change & CHANGED_LINK)
108 {
109
111 {
113 }
114 else
115 {
117 if((perm & PERMISSION_TRIGGER_ANIMATION) && llStringLength(animation)>0)
118 llStopAnimation(animation);
120 set_text();
121 animation="";
122 }
123 }
124 }
126 {
128 {
129 llStopAnimation("sit");
131 llStartAnimation(animation);
133 llSetText("",<0,0,0>,0.0);
134 }
135 }
136
137 link_message(integer sender_num, integer num, string str, key id)
138 {
139 if(str=="hide")
140 {
141 hide_me();
142 }
143 else if(str=="show")
144 {
145 show_me();
146 }
147 }
148 }// END //

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