diff options
author | UbitUmarov | 2015-09-01 11:43:07 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-01 11:43:07 +0100 |
commit | fb78b182520fc9bb0f971afd0322029c70278ea6 (patch) | |
tree | b4e30d383938fdeef8c92d1d1c2f44bb61d329bd /bin/assets/ScriptsAssetSet/KanEd-Test02.lsl | |
parent | lixo (diff) | |
parent | Mantis #7713: fixed bug introduced by 1st MOSES patch. (diff) | |
download | opensim-SC-fb78b182520fc9bb0f971afd0322029c70278ea6.zip opensim-SC-fb78b182520fc9bb0f971afd0322029c70278ea6.tar.gz opensim-SC-fb78b182520fc9bb0f971afd0322029c70278ea6.tar.bz2 opensim-SC-fb78b182520fc9bb0f971afd0322029c70278ea6.tar.xz |
Merge remote-tracking branch 'os/master'
Diffstat (limited to '')
-rw-r--r-- | bin/assets/ScriptsAssetSet/KanEd-Test02.lsl | 31 |
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 @@ | |||
1 | integer counter; | ||
2 | |||
3 | default | ||
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 | |||