source:
code/branches/ScriptableController/data/gui/scripts/testscript.lua
@
10058
| Last change on this file since 10058 was 10057, checked in by mkronig, 12 years ago | |
|---|---|
| File size: 562 bytes | |
| Rev | Line | |
|---|---|---|
| [10037] | 1 | --k = 1.2 |
| [10035] | 2 | |
| [10037] | 3 | --orxonox.execute("orxout message test " .. k) |
| [10035] | 4 | |
| [10047] | 5 | -- Set some test variables |
| [10037] | 6 | x = 1.1 |
| 7 | y = 2.2 | |
| 8 | z = 3.3 | |
| [10035] | 9 | |
| [10047] | 10 | --os.execute("sleep " .. 2) |
| [10037] | 11 | |
| [10047] | 12 | -- Get a local pointer to a scriptcontroller |
| [10045] | 13 | local ctrl = orxonox.ScriptController:getScriptController() |
| [10047] | 14 | |
| 15 | -- If it worked, call its "movetoposition" function | |
| [10046] | 16 | if ctrl ~= nil then |
| [10057] | 17 | ctrl:eventScheduler("moveToPosition_beta", x, y, z, 0.01) |
| [10046] | 18 | end |
| 19 | ||
| [10057] | 20 | |
| 21 | ||
| [10047] | 22 | -- Output the newctrlid variable we set from the C++ code |
| [10046] | 23 | if newctrlid ~= nil then |
| 24 | orxonox.execute("orxout message test " .. newctrlid) | |
| 25 | end | |
| [10037] | 26 | |
| [10045] | 27 | --orxonox.execute("setPause 1") |
| [10037] | 28 | |
| [10045] | 29 |
Note: See TracBrowser
for help on using the repository browser.










