Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/SciptableControllerFS15/data/gui/scripts/testscript.lua @ 10448

Last change on this file since 10448 was 10448, checked in by rgraczyk, 9 years ago

Various changes, see comments in cpp file

  • Property svn:eol-style set to native
File size: 1.1 KB
RevLine 
[10065]1-- Set some test variables
2xm = 1000 
3ym = 0
4zm = 0
[10035]5
[10065]6xl = -1000 
7yl = 3000 
8zl = -1000
[10035]9
[10075]10xr = 2000
11yr = 500
12zr = 2000
13
[10065]14d = 5
15Tabs = 0
[10035]16
[10065]17pi = 3.1415
[10037]18
[10047]19-- Get a local pointer to a scriptcontroller
[10045]20local ctrl = orxonox.ScriptController:getScriptController()
[10047]21
22-- If it worked, call its "movetoposition" function
[10046]23if ctrl ~= nil then
[10065]24
[10448]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", 600)
[10065]39
[10046]40end
41
[10047]42-- Output the newctrlid variable we set from the C++ code
[10046]43if newctrlid ~= nil then
44  orxonox.execute("orxout message test " .. newctrlid)
45end
[10037]46
[10448]47--orxonox.execute("setPause 1")
Note: See TracBrowser for help on using the repository browser.