summaryrefslogtreecommitdiff
path: root/scripts/testing
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-06-30 21:59:39 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-06-30 21:59:39 +0100
commit2af5332e46b3917d6dce211e576a92d04c3eda8b (patch)
tree1d0774f2b04127c095d588de31c79e669e9bbd5e /scripts/testing
parenta09cc5f4bb9ccf93db7233d0b1fd0142803b2f23 (diff)
Added cycle_object_animations.lsl. Also change to test.cpp to see if it affects a g++ internal compiler error.
Diffstat (limited to 'scripts/testing')
-rw-r--r--scripts/testing/lsl/cycle_object_animations.lsl53
1 files changed, 53 insertions, 0 deletions
diff --git a/scripts/testing/lsl/cycle_object_animations.lsl b/scripts/testing/lsl/cycle_object_animations.lsl
new file mode 100644
index 0000000000..95fa99a191
--- /dev/null
+++ b/scripts/testing/lsl/cycle_object_animations.lsl
@@ -0,0 +1,53 @@
+cycle_animations()
+{
+ list AnimationList;
+ integer count = llGetInventoryNumber(INVENTORY_ANIMATION);
+ string ItemName;
+ string NowPlaying;
+ while (count--)
+ {
+ ItemName = llGetInventoryName(INVENTORY_ANIMATION, count);
+ if (NowPlaying != "")
+ {
+ llSay(0, "Stopping " + NowPlaying);
+ llStopObjectAnimation(NowPlaying);
+ }
+ llSay(0, "Starting " + ItemName);
+ llStartObjectAnimation(ItemName);
+ NowPlaying = ItemName;
+ llSleep(10);
+ }
+ if (NowPlaying != "")
+ {
+ llSay(0, "Stopping " + NowPlaying);
+ llStopObjectAnimation(NowPlaying);
+ llSleep(10);
+ }
+}
+
+default
+{
+ state_entry()
+ {
+ llSay(0, "Animated Object here");
+ }
+
+ touch_start(integer total_number)
+ {
+ llSay(0, "Touch started.");
+ while (1)
+ {
+ cycle_animations();
+ }
+
+ }
+
+ touch_end(integer total_number)
+ {
+ llSay(0, "Touch ended.");
+ }
+}
+
+// Local Variables:
+// shadow-file-name: "$SW_HOME/axon/scripts/testing/lsl/cycle_object_animations.lsl"
+// End: