Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 8, 2014, 10:16:23 AM (10 years ago)
Author:
smerkli
Message:

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:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ScriptableController/data/gui/scripts/testscript.lua

    r10046 r10047  
    33--orxonox.execute("orxout message test " .. k)
    44
     5-- Set some test variables
    56x = 1.1
    67y = 2.2
    78z = 3.3
    89
     10--os.execute("sleep " .. 2)
    911
     12-- Get a local pointer to a scriptcontroller
    1013local ctrl = orxonox.ScriptController:getScriptController()
     14
     15-- If it worked, call its "movetoposition" function
    1116if ctrl ~= nil then
    1217  ctrl:moveToPosition_beta(x, y, z)
    1318end
    1419
    15 --ctrl.moveToPosition(x,y,z)
    16 --
     20-- Output the newctrlid variable we set from the C++ code
    1721if newctrlid ~= nil then
    1822  orxonox.execute("orxout message test " .. newctrlid)
    19 end
    20 
    21 local docks = orxonox.Dock:getNumberOfActiveDocks()
    22 local docklist = {}
    23 for i = 0, docks-1 do
    24   table.insert(docklist, orxonox.Dock:getActiveDockAtIndex(i))
    25 end
    26 local dock = docklist[1]
    27 if dock ~= nil then
    28     dock:dock()
    2923end
    3024
Note: See TracChangeset for help on using the changeset viewer.