1 | -- Set some test variables |
---|
2 | x0 = 0 |
---|
3 | y0 = 500 |
---|
4 | z0 = 500 |
---|
5 | |
---|
6 | xo = 2000 |
---|
7 | yo = 0 |
---|
8 | zo = 0 |
---|
9 | |
---|
10 | x1 = 3000 |
---|
11 | y1 = 0 |
---|
12 | z1 = 0 |
---|
13 | |
---|
14 | x2 = 2000 |
---|
15 | y2 = 2000 |
---|
16 | z2 = 0 |
---|
17 | |
---|
18 | -- Get a local pointer to a scriptcontroller |
---|
19 | local ctrl = orxonox.ScriptController:getScriptController() |
---|
20 | |
---|
21 | -- If it worked, call its "movetoposition" function |
---|
22 | if ctrl ~= nil then |
---|
23 | |
---|
24 | ctrl:eventScheduler("idle", 1) |
---|
25 | ctrl:eventScheduler("chl", x0, y0, z0, xo, yo, zo, 2) |
---|
26 | ctrl:eventScheduler("idle", 1) |
---|
27 | ctrl:eventScheduler("mal", x2, y2, z2, xo, yo, zo, 2) |
---|
28 | ctrl:eventScheduler("mal", x1, y1, z1, xo, yo, zo, 2) |
---|
29 | ctrl:eventScheduler("idle", 1) |
---|
30 | ctrl:eventScheduler("ral", xo, yo, zo, 3, 1000, 0, 5) |
---|
31 | ctrl:eventScheduler("idle", 1) |
---|
32 | ctrl:eventScheduler("ral", xo, yo, zo, 2, 1000, 0, 5) |
---|
33 | ctrl:eventScheduler("idle", 1) |
---|
34 | ctrl:eventScheduler("ral", xo, yo, zo, 1, 1000, 0, 5) |
---|
35 | ctrl:eventScheduler("idle", 1) |
---|
36 | |
---|
37 | end |
---|