Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ScriptableController/data/gui/scripts/testscript.lua @ 10047

Last change on this file since 10047 was 10047, checked in by smerkli, 11 years ago

Controller switching works now, however lua script
execution is blocking, which means we can only schedule
stuff in them, not leave them running in realtime

File size: 536 bytes
Line 
1--k = 1.2
2
3--orxonox.execute("orxout message test " .. k)
4
5-- Set some test variables
6x = 1.1
7y = 2.2
8z = 3.3
9
10--os.execute("sleep " .. 2)
11
12-- Get a local pointer to a scriptcontroller
13local ctrl = orxonox.ScriptController:getScriptController()
14
15-- If it worked, call its "movetoposition" function
16if ctrl ~= nil then
17  ctrl:moveToPosition_beta(x, y, z)
18end
19
20-- Output the newctrlid variable we set from the C++ code
21if newctrlid ~= nil then
22  orxonox.execute("orxout message test " .. newctrlid)
23end
24
25--orxonox.execute("setPause 1")
26
27
Note: See TracBrowser for help on using the repository browser.