aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/bin/script1.txt
diff options
context:
space:
mode:
authorMW2007-04-11 12:23:33 +0000
committerMW2007-04-11 12:23:33 +0000
commit6d48c639771ad66e1b6cbdd959b1470292300a98 (patch)
tree14f92f37ddb15b732fe33a085c31d24694c765e2 /bin/script1.txt
parentFirst basic test script now works in the jvm scripting engine. (diff)
downloadopensim-SC_OLD-6d48c639771ad66e1b6cbdd959b1470292300a98.zip
opensim-SC_OLD-6d48c639771ad66e1b6cbdd959b1470292300a98.tar.gz
opensim-SC_OLD-6d48c639771ad66e1b6cbdd959b1470292300a98.tar.bz2
opensim-SC_OLD-6d48c639771ad66e1b6cbdd959b1470292300a98.tar.xz
added missing files
Diffstat (limited to '')
-rw-r--r--bin/script1.txt22
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