aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/assets/ScriptsAssetSet/KanEd-Test02.lsl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test02.lsl31
1 files changed, 31 insertions, 0 deletions
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test02.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test02.lsl
new file mode 100644
index 0000000..2506d95
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test02.lsl
@@ -0,0 +1,31 @@
1integer counter;
2
3default
4{
5 state_entry()
6 {
7 llSay( 0, "Hello, Avatar! Touch to change color and size.");
8 counter = 0;
9 }
10
11 touch_start(integer total_number)
12 { // do these instructions when the object is touched.
13 counter = counter + 1;
14
15 // choose three random RGB color components between 0. and 1.0.
16 float redness = llFrand( 1.0 );
17 float greenness = llFrand( 1.0 );
18 float blueness = llFrand( 1.0 );
19
20 // combine color components into a vector and use that vector
21 // to set object color.
22 vector prim_color = < redness, greenness, blueness >;
23 llSetColor( prim_color, ALL_SIDES ); // set object color to new color.
24
25 // choose a random number between 0. and 10. for use as a scale factor.
26 float new_scale = llFrand(10.0) + 1.0;
27 llSetScale(< new_scale, new_scale, new_scale > ); // set object scale.
28 llSay( 0, "Touched by angel number " + (string)counter);
29 }
30}
31