summaryrefslogtreecommitdiff
path: root/scripts/testing
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-07-21 20:01:40 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-07-21 20:01:40 +0100
commit30880e062afa0671b166f161ae7c109bfd37d38f (patch)
tree892705253eb3f2aadd08ac90e8dcf53a16a34a65 /scripts/testing
parentbbe5681d05d486d86f53d2adf3fa40b136c29df9 (diff)
SL-751, SL-691 - test lsl scripts update, better syncing between skeleton and drawable
Diffstat (limited to 'scripts/testing')
-rw-r--r--scripts/testing/lsl/axon_test_region_driver.lsl8
-rw-r--r--scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl39
2 files changed, 23 insertions, 24 deletions
diff --git a/scripts/testing/lsl/axon_test_region_driver.lsl b/scripts/testing/lsl/axon_test_region_driver.lsl
index dfcbb9871a..dcf146a9cf 100644
--- a/scripts/testing/lsl/axon_test_region_driver.lsl
+++ b/scripts/testing/lsl/axon_test_region_driver.lsl
@@ -1,4 +1,4 @@
-list buttons = ["anim start", "anim stop", " ", "verbose on", "verbose off", " "];
+list buttons = ["anim start", "anim stop", "step", "verbose on", "verbose off", " "];
string dialogInfo = "\nPlease make a choice.";
key ToucherID;
@@ -20,7 +20,7 @@ default
llListenRemove(listenHandle);
listenHandle = llListen(dialogChannel, "", ToucherID, "");
llDialog(ToucherID, dialogInfo, buttons, dialogChannel);
- llSetTimerEvent(60.0); // Here we set a time limit for responses
+ //llSetTimerEvent(60.0); // Here we set a time limit for responses
}
listen(integer channel, string name, key id, string message)
@@ -35,7 +35,7 @@ default
// stop timer since the menu was clicked
llSetTimerEvent(0);
- llOwnerSay("Sending message " + message + " on channel " + (string)commandChannel);
+ //llOwnerSay("Sending message " + message + " on channel " + (string)commandChannel);
llRegionSay(commandChannel, message);
}
@@ -45,7 +45,7 @@ default
llSetTimerEvent(0);
llListenRemove(listenHandle);
- llWhisper(0, "Sorry. You snooze; you lose.");
+ //llWhisper(0, "Sorry. You snooze; you lose.");
}
}
diff --git a/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl b/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl
index 5303b6f4f5..fa12ab0588 100644
--- a/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl
+++ b/scripts/testing/lsl/move_in_circle_using_llSetRegionPos.lsl
@@ -1,6 +1,6 @@
integer listenHandle;
integer verbose;
-integer num_steps = 50;
+integer num_steps = 12;
float circle_time = 5.0;
integer circle_step;
vector circle_pos;
@@ -14,12 +14,21 @@ start_circle(vector center, float radius)
circle_radius = radius;
circle_step = 0;
llSetTimerEvent(circle_time/num_steps);
+ llTargetOmega(<0.0, 0.0, 1.0>, TWO_PI/circle_time, 1.0);
}
stop_circle()
{
llSetTimerEvent(0);
- llSetRegionPos(circle_center);
+ llTargetOmega(<0.0, 0.0, 1.0>, TWO_PI/circle_time, 0.0);
+ integer i;
+ for (i=0; i<10; i++)
+ {
+ vector new_pos = circle_center;
+ new_pos.x += llFrand(0.01);
+ llSetRegionPos(new_pos);
+ llSleep(0.1);
+ }
}
next_circle()
@@ -32,34 +41,19 @@ next_circle()
circle_step = (circle_step+1)%num_steps;
}
-circle_path(vector center, float radius)
-{
- integer i;
- integer num_steps = 50;
- float circle_time = 5.0; // seconds
- for (i=0; i<num_steps; ++i)
- {
- float rad = (i * TWO_PI)/num_steps;
- float x = center.x + llCos(rad)*radius;
- float y = center.y + llSin(rad)*radius;
- float z = center.z;
- llSetRegionPos(<x,y,z>);
- llSleep(circle_time/num_steps);
- }
-}
-
default
{
state_entry()
{
- llSay(0, "Hello, Avatar!");
+ //llSay(0, "Hello, Avatar!");
listenHandle = llListen(-2001,"","","");
verbose = 0;
+ circle_center = llGetPos();
}
listen(integer channel, string name, key id, string message)
{
- llOwnerSay("got message " + name + " " + (string) id + " " + message);
+ //llOwnerSay("got message " + name + " " + (string) id + " " + message);
list words = llParseString2List(message,[" "],[]);
string command = llList2String(words,0);
string option = llList2String(words,1);
@@ -85,6 +79,11 @@ default
verbose = 0;
}
}
+ if (command=="step")
+ {
+ llSetTimerEvent(0);
+ next_circle();
+ }
}
timer()