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
Clothing Flexi_Skirt_Changer  

Flexi_Skirt_Changer


HOW TO USE
[UPDATE] For some sill...

Category: Clothing
By : Gwyneth Llewelyn
Created: 2010-07-18 Edited: 2010-07-18
Worlds: Second Life

the Zip file

Download all files for Flexi_Skirt_Changer
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Flexi_Skirt_Changer_1.lsl
1
2
3 list FlexiState;
4
5 integer isSit;
6
7
8
9 default
10
11 {
12
14
15 {
16
17 // save current state
18
19 FlexiState = llGetPrimitiveParams([PRIM_FLEXIBLE]);
20
21 }
22
23
24
25 changed(integer what)
26
27 {
28
29 // if someone is tweaking the flexi settings, you better reset!
30
31 if(what & CHANGED_SHAPE)
32
34
35 }
36
37
38
39 touch_start(integer total_number)
40
41 {
42
44
45 if(!isSit)
46
47 {
48
49 isSit = TRUE;
50
51 llOwnerSay("Skirt in sit mode");
52
53
54
55 // ok, we know the rotation. Now we need to figure out the bloody angle in the XY plane!
56
57 rotation avatarRotation = llGetRot();
58
59
60
61 vector PointForward = <1.0, 0.0, 0.0>; // get a unit vector!
62
63
64
65 PointForward *= avatarRotation; // do vector rotation
66
67 PointForward.z = 0.0; // clean Z as well, you never know; now this vector should be on the XY plane
68
69
70
71 // amplify magnitude!
72
73
74
75 PointForward.x *= 10.0;
76
77 PointForward.y *= 10.0;
78
79
80
81 llSetLinkPrimitiveParams(LINK_SET, [PRIM_FLEXIBLE] + llListReplaceList(FlexiState, [PointForward], 6, 6));
82
83 }
84
85 else
86
87 {
88
89 isSit = FALSE;
90
91 llOwnerSay("Skirt in walk mode");
92
93
94
96
97 }
98
99 }
100
101 }

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