1 | -- Set some test variables |
---|
2 | xm = 1000 |
---|
3 | ym = 0 |
---|
4 | zm = 0 |
---|
5 | |
---|
6 | xl = -1000 |
---|
7 | yl = 3000 |
---|
8 | zl = -1000 |
---|
9 | |
---|
10 | xr = 2000 |
---|
11 | yr = 500 |
---|
12 | zr = 2000 |
---|
13 | |
---|
14 | d = 5 |
---|
15 | Tabs = 0 |
---|
16 | |
---|
17 | pi = 3.1415 |
---|
18 | |
---|
19 | -- Get a local pointer to a scriptcontroller |
---|
20 | local ctrl = orxonox.ScriptController:getScriptController() |
---|
21 | |
---|
22 | -- If it worked, call its "movetoposition" function |
---|
23 | if ctrl ~= nil then |
---|
24 | |
---|
25 | ctrl:eventScheduler("mal", xl,yl,zl, xl,yl,zl, 2) |
---|
26 | ctrl:eventScheduler("idle", 1) |
---|
27 | ctrl:eventScheduler("ral", xl, yl, zl, 3, 0, 0, math.pi) |
---|
28 | ctrl:eventScheduler("idle", 1) |
---|
29 | ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3) |
---|
30 | ctrl:eventScheduler("idle", 1) |
---|
31 | ctrl:eventScheduler("chl", xl, yl, zl, xr, yr, zr, 2) |
---|
32 | ctrl:eventScheduler("idle", 1) |
---|
33 | ctrl:eventScheduler("mal", xr + 600,yr,zr, xr,yr,zr, 4) |
---|
34 | ctrl:eventScheduler("idle", 1) |
---|
35 | ctrl:eventScheduler("chl", xr, yr, zr, xl, yl, zl, 3) |
---|
36 | ctrl:eventScheduler("idle", 1) |
---|
37 | ctrl:eventScheduler("spi", xm,ym,zm, 0,0,0, 4) |
---|
38 | ctrl:eventScheduler("idle", 1) |
---|
39 | |
---|
40 | end |
---|
41 | |
---|
42 | -- Output the newctrlid variable we set from the C++ code |
---|
43 | if newctrlid ~= nil then |
---|
44 | orxonox.execute("orxout message test " .. newctrlid) |
---|
45 | end |
---|
46 | |
---|
47 | --orxonox.execute("setPause 1") |
---|