Join us in Outworldz at http://www.outworldz.com:9000 or follow us:

[Table of Contents]

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
Dance Dance Hud  

Dance Hud

Dance Hud. Add animations to this and wear it as a HUD

Category: Dance
By : Anonymous
Created: 2019-04-04 Edited: 2019-04-03
Worlds: Second Life

the Zip file

Download all files for Dance Hud
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Back Button Script.lsl
Get file # 2. cherished-f.bvh
Get file # 3. cherished-m.bvh
Get file # 4. eternal-f-wait.bvh
Get file # 5. eternal-f.bvh
Get file # 6. eternal-m-wait.bvh
Get file # 7. eternal-m.bvh
Get file # 8. magicmoment-f-wait.bvh
Get file # 9. magicmoment-f.bvh
Get file # 10. magicmoment-f2.bvh
Get file # 11. magicmoment-m-wait.bvh
Get file # 12. magicmoment-m.bvh
Get file # 13. magicmoment-m2.bvh
Get file # 14. Next Button Script.lsl
Get file # 15. Root Prim Script.lsl
Get file # 16. Stop Button Script.lsl
Get file # 17. underyourspell-f-wait.bvh
Get file # 18. underyourspell-f.bvh
Get file # 19. underyourspell-m-wait.bvh
Get file # 20. underyourspell-m.bvh
Get file # 21. underyourspell2-f.bvh
Get file # 22. underyourspell2-m.bvh
1
2 // To build this, make a small prim. Add Button sized prims for Stop, Next and Previous. Put the scripts in the Buttons.
3 // Put the Root Prim script in the main body.
4 // Select the three buttons and select the root prim last,. and link them
5 // Add animations to the root and wear it as a HUD.
6
7 list dances;
8 integer activedance = 0;
9 integer lastdance = 0;
10 integer total = 0;
11 integer perms = 0;
12 integer interval = 60;
13 integer timercount = 60;
14 integer active = FALSE;
15 integer paused = FALSE;
16 string title = "Modern";
17
18 getDances()
19 {
20 integer i = 0;
21 for (i = 0; i < 100; i++) {
23 if(dance != "") {
24 dances += [dance];
25 } else {
26 i = 100;
27 }
28 }
29 }
30
31 stopAllAnims()
32 {
34 {
36 integer len = llGetListLength(anims);
37 integer i = 0;
38 for (i=0; i<len; ++i) {
39 llStopAnimation(llList2Key(anims, i));
40 }
41 llStartAnimation("stand");
42 }
43 }
44
45 startDance()
46 {
47 perms = llGetPermissions();
49 {
50 llStartAnimation(llList2String(dances, activedance));
51 llStopAnimation(llList2String(dances, activedance - 1));
52 }
53 }
54
55 showStatus()
56 {
57 if(active) {
58 if(!paused) {
59 llSetText(title + "\n" +
60 "Dancing the " + llList2String(dances, activedance) + "\n" +
61 "Seconds remaining: " + (string)timercount, <1,1,1>, 1);
62 } else {
63 llSetText(title + "\n" +
64 "Dancing the " + llList2String(dances, activedance) + "\n" +
65 "Seconds remaing: Paused!", <1,1,1>, 1);
66 }
67 } else {
68 llSetText(title + "\n" +
69 "Currently Off", <1,1,1>, 1);
70 }
71 }
72 default
73 {
75 {
76 llOwnerSay("Dance HUD loading...");
77 getDances();
78 total = llGetListLength(dances) - 1;
79 llOwnerSay("Dances found: " + (string)(total + 1));
81 llSetTimerEvent(1.0);
83 llListen(0, "", llGetOwner(), "");
84 showStatus();
85 }
86
87 on_rez(integer sparam)
88 {
90 }
91
92 attach(key attached)
93 {
94 if(attached) {
96 } else {
97 if(active != FALSE) { stopAllAnims(); }
99
100 }
101 }
102
103 timer()
104 {
105 {
106 if(active == TRUE)
107 {
108 --timercount;
109 if(timercount == 0) {
110 activedance++;
111 if(activedance > total)
112 {
113 activedance = 0;
114 }
115 startDance();
116 showStatus();
117 timercount = interval;
118 } else {
119 showStatus();
120 }
121
122 }
123 }
124 }
125
126 link_message(integer sender_num, integer num, string message, key id)
127 {
128 if(id == NULL_KEY)
129 {
130 if(message == "doff")
131 {
132 active = FALSE;
133 stopAllAnims();
134 timercount = interval;
135 paused = FALSE;
137 showStatus();
138 } else if(active == FALSE && message == "don")
139 {
141 {
143 }
144 llSetTimerEvent(1.0);
145 showStatus();
146 startDance();
147 active = TRUE;
148 } else if((active == TRUE) && (message == "dnext")) {
149 activedance++;
150 if(activedance > total)
151 {
152 activedance = 0;
153 }
154 timercount = interval;
155 startDance();
156 showStatus();
157 } else if((active == TRUE) && (message == "dprev")) {
158 activedance--;
159 if(activedance < 0)
160 {
161 activedance = total;
162 }
163 timercount = interval;
164 startDance();
165 showStatus();
166 } else if((active == TRUE) && (message == "dpause")) {
167 if(paused) {
169 llSetTimerEvent(1.0);
170 paused = FALSE;
171 } else {
173 llSetTimerEvent(0.0);
174 paused = TRUE;
175 showStatus();
176 }
177 }
178 }
179 }
180 }

Dance Hud

Dance Hud Next Button

Category: Dance
By : Anonymous
Created: 2019-04-04 Edited: 2019-04-03
Worlds: Second Life

1
2 default
3 {
4 touch_start(integer total_number)
5 {
7 }
8 }

Dance Hud

Dance Hud Prev

Category: Dance
By : Anonymous
Created: 2019-04-04 Edited: 2019-04-03
Worlds: Second Life

1 default
2 {
3 touch_start(integer total_number)
4 {
6 }
7 }

Dance Hud

Dance Hud Stop Button

Category: Dance
By : Anonymous
Created: 2019-04-04 Edited: 2019-04-03
Worlds: Second Life

1 integer active = FALSE;
2
3 default
4 {
6 {
7 llSetColor(<1,0,0>, ALL_SIDES);
8 }
9
11 {
12 if(active) {
14 active = FALSE;
15 llSetColor(<1,0,0>, ALL_SIDES);
16 } else {
18 active = TRUE;
19 llSetColor(<0,1,0>, ALL_SIDES);
20 }
21 }
22
23 on_rez(integer sparam)
24 {
26 }
27 }

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