blob: dd67c5027fccb5fa50d6061ca0bef41e0e05afa7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<Script><ScriptEngine:OpenSimJVM,Test1>public class Test1 {
public static void OnFrame()
{
int own = 0;
own = OpenSimAPI.GetEntityID();
int avid = OpenSimAPI.GetRandomAvatarID();
float x = OpenSimAPI.GetEntityPositionX(own);
float avx = OpenSimAPI.GetEntityPositionX(avid);
if(x> avx)
{
x = x -1f;
}
else
{
x = x+ 1f;
}
OpenSimAPI.SetEntityPosition(own, x, 0, 0);
}
}</Script>
|