diff options
author | Justin Clarke Casey | 2009-01-12 18:00:46 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-01-12 18:00:46 +0000 |
commit | fb8faa8336ddb795ccd6840259b06a2608350a57 (patch) | |
tree | 1f4977b9918d416602af88709e15aecf9499b969 /bin/assets/ScriptsAssetSet/KanEd-Test02.lsl | |
parent | * Remove FunSLUDP code since this has moved to http://forge.opensimulator.org... (diff) | |
download | opensim-SC_OLD-fb8faa8336ddb795ccd6840259b06a2608350a57.zip opensim-SC_OLD-fb8faa8336ddb795ccd6840259b06a2608350a57.tar.gz opensim-SC_OLD-fb8faa8336ddb795ccd6840259b06a2608350a57.tar.bz2 opensim-SC_OLD-fb8faa8336ddb795ccd6840259b06a2608350a57.tar.xz |
* Apply http://opensimulator.org/mantis/view.php?id=2913
* Add the KanEd scripts to the standard library
* Thanks Fly-Man-
Diffstat (limited to 'bin/assets/ScriptsAssetSet/KanEd-Test02.lsl')
-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 | |||