aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/script1.txt
diff options
context:
space:
mode:
Diffstat (limited to 'bin/script1.txt')
-rw-r--r--bin/script1.txt16
1 files changed, 14 insertions, 2 deletions
diff --git a/bin/script1.txt b/bin/script1.txt
index dd67c50..63780c2 100644
--- a/bin/script1.txt
+++ b/bin/script1.txt
@@ -7,7 +7,9 @@
7 int avid = OpenSimAPI.GetRandomAvatarID(); 7 int avid = OpenSimAPI.GetRandomAvatarID();
8 float x = OpenSimAPI.GetEntityPositionX(own); 8 float x = OpenSimAPI.GetEntityPositionX(own);
9 float avx = OpenSimAPI.GetEntityPositionX(avid); 9 float avx = OpenSimAPI.GetEntityPositionX(avid);
10 10 float y = OpenSimAPI.GetEntityPositionY(own);
11 float avy = OpenSimAPI.GetEntityPositionY(avid);
12
11 if(x> avx) 13 if(x> avx)
12 { 14 {
13 x = x -1f; 15 x = x -1f;
@@ -16,7 +18,17 @@
16 { 18 {
17 x = x+ 1f; 19 x = x+ 1f;
18 } 20 }
19 OpenSimAPI.SetEntityPosition(own, x, 0, 0); 21
22 if(y > avy)
23 {
24 y= y -1f;
25 }
26 else
27 {
28 y = y +1f;
29 }
30
31 OpenSimAPI.SetEntityPosition(own, x, y, 0);
20 } 32 }
21 33
22}</Script> \ No newline at end of file 34}</Script> \ No newline at end of file