diff options
Diffstat (limited to '')
-rw-r--r-- | bin/script1.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/script1.txt b/bin/script1.txt new file mode 100644 index 0000000..dd67c50 --- /dev/null +++ b/bin/script1.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | <Script><ScriptEngine:OpenSimJVM,Test1>public class Test1 { | ||
2 | |||
3 | public static void OnFrame() | ||
4 | { | ||
5 | int own = 0; | ||
6 | own = OpenSimAPI.GetEntityID(); | ||
7 | int avid = OpenSimAPI.GetRandomAvatarID(); | ||
8 | float x = OpenSimAPI.GetEntityPositionX(own); | ||
9 | float avx = OpenSimAPI.GetEntityPositionX(avid); | ||
10 | |||
11 | if(x> avx) | ||
12 | { | ||
13 | x = x -1f; | ||
14 | } | ||
15 | else | ||
16 | { | ||
17 | x = x+ 1f; | ||
18 | } | ||
19 | OpenSimAPI.SetEntityPosition(own, x, 0, 0); | ||
20 | } | ||
21 | |||
22 | }</Script> \ No newline at end of file | ||