aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2021-09-06 20:52:50 +1000
committeronefang2021-09-06 20:52:50 +1000
commite59999a43f29a120f1d9d336962b618fb2555e4f (patch)
treee3bb09bc62ebdbb86329e93e819603a1b32c7ca2
parentLeash texture, size, and length adjustments. (diff)
download1ring-e59999a43f29a120f1d9d336962b618fb2555e4f.zip
1ring-e59999a43f29a120f1d9d336962b618fb2555e4f.tar.gz
1ring-e59999a43f29a120f1d9d336962b618fb2555e4f.tar.bz2
1ring-e59999a43f29a120f1d9d336962b618fb2555e4f.tar.xz
Allow different speeds of movement.
-rw-r--r--.1AOor2.settings.txt1
-rw-r--r--.1ring.theme.txt3
-rw-r--r--1AOor2.lsl33
-rw-r--r--~1AOor2.command.data.txt10
4 files changed, 45 insertions, 2 deletions
diff --git a/.1AOor2.settings.txt b/.1AOor2.settings.txt
index bcf4439..603d6ef 100644
--- a/.1AOor2.settings.txt
+++ b/.1AOor2.settings.txt
@@ -1,5 +1,6 @@
1AO=1 1AO=1
2SUPER=0 2SUPER=0
3SPEED=1.0
3OSANIM=1 4OSANIM=1
4OSSIT=1 5OSSIT=1
5OSSPEED=1 6OSSPEED=1
diff --git a/.1ring.theme.txt b/.1ring.theme.txt
index c7ef112..0e6c330 100644
--- a/.1ring.theme.txt
+++ b/.1ring.theme.txt
@@ -73,6 +73,9 @@ MENU moves | movement menu | MORE
73TOMENU Follow | CHOOSE_ALL 73TOMENU Follow | CHOOSE_ALL
74TOMENU Go to | CHOOSE_ALL 74TOMENU Go to | CHOOSE_ALL
75TOMENU Sit | CHOOSE_ALL 75TOMENU Sit | CHOOSE_ALL
76BUTTON slower - | 1AOor2.SLOWER_-
77BUTTON normal | 1AOor2.NORMAL_SPEED
78BUTTON faster + | 1AOor2.FASTER_+
76TOGGLE free 79TOGGLE free
77BUTTON stop | STOP 80BUTTON stop | STOP
78BUTTON Stand | STAND 81BUTTON Stand | STAND
diff --git a/1AOor2.lsl b/1AOor2.lsl
index 360b702..f9cae44 100644
--- a/1AOor2.lsl
+++ b/1AOor2.lsl
@@ -269,6 +269,26 @@ integer doThing(key id, string button, string fr, string cmd, string data, integ
269 Smile = llList2String(Smiles, (integer) llFrand(2.5)); 269 Smile = llList2String(Smiles, (integer) llFrand(2.5));
270 addEvent(3.0 + llFrand(5.0), cmd); 270 addEvent(3.0 + llFrand(5.0), cmd);
271 animBegin(llGetOwner(), Smile); 271 animBegin(llGetOwner(), Smile);
272 else if ("SLOWER_-" == cmd)
273 {
274 integer sp = llListFindList(AOspeeds, [getSetting("SPEED")]);
275 if (sp > 0) sp--; else sp = 0;
276 setSetting(id, "SPEED", llList2String(AOspeeds, sp), fMENU);
277 s("Now moving at " + llList2String(AOspeedNames, sp) + " speed.");
278 }
279 else if ("NORMAL_SPEED" == cmd)
280 {
281 setSetting(id, "SPEED", "1.0", fMENU);
282 s("Now moving at normal speed.");
283 }
284 else if ("FASTER_+" == cmd)
285 {
286 integer sp = llListFindList(AOspeeds, [getSetting("SPEED")]);
287 integer l = llGetListLength(AOspeeds) - 1;
288 if (sp < l) sp++; else sp = l;
289 setSetting(id, "SPEED", llList2String(AOspeeds, sp), fMENU);
290 s("Now moving at " + llList2String(AOspeedNames, sp) + " speed.");
291 }
272 } 292 }
273 else if ("LESS_-" == cmd) 293 else if ("LESS_-" == cmd)
274 { 294 {
@@ -651,6 +671,18 @@ integer Swimming;
651integer Bobbing; 671integer Bobbing;
652float Tick = 0.2; 672float Tick = 0.2;
653float AOspeed = 1.0; 673float AOspeed = 1.0;
674list AOspeeds = ["0.1", "0.5", "1.0", "2.0", "5.0", "10.0", "20.0", "50.0"]; // Strings coz LSL can't find floats.
675list AOspeedNames =
676[
677 "snail",
678 "slow",
679 "normal",
680 "fast",
681 "light",
682 "ridiculous",
683 "ludicrous",
684 "plaid"
685];
654list flyStates; 686list flyStates;
655list initialStates; // "Taking Off", "hover_up", 687list initialStates; // "Taking Off", "hover_up",
656list ANIMATIONS; 688list ANIMATIONS;
@@ -1631,6 +1663,7 @@ checkAO()
1631 else AOspeed = 4.0; 1663 else AOspeed = 4.0;
1632 } 1664 }
1633 else AOspeed = 1.0; 1665 else AOspeed = 1.0;
1666 AOspeed = AOspeed * (float) getSetting("speed");
1634 if (0.0 < AOspeed) speed(Owner, AOspeed + ((AOspeed / 2) * (fast + (2 * (integer) getSetting("super"))))); 1667 if (0.0 < AOspeed) speed(Owner, AOspeed + ((AOspeed / 2) * (fast + (2 * (integer) getSetting("super")))));
1635 else AOspeed = 1.0; 1668 else AOspeed = 1.0;
1636 for (f = 0; f < l; f += pSTRIDE) 1669 for (f = 0; f < l; f += pSTRIDE)
diff --git a/~1AOor2.command.data.txt b/~1AOor2.command.data.txt
index 80c413b..0d40b21 100644
--- a/~1AOor2.command.data.txt
+++ b/~1AOor2.command.data.txt
@@ -58,9 +58,15 @@ h
581AOor2.MORE_+ 581AOor2.MORE_+
59 59
6031 6031
611AOor2.TEXTS 611AOor2.SLOWER_-
62 62
6331 639
641AOor2.NORMAL_SPEED
65
669
671AOor2.FASTER_+
68
699
641AOor2.SAVE 701AOor2.SAVE
65 71
669 729