Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 7, 2014, 2:03:18 PM (10 years ago)
Author:
smerkli
Message:

Fixed some more things. What works now:

  • Setting an ID for the scriptcontroller to be used from C++ in lua
  • Running a script from the controllerdirector triggered by an event
  • Getting an instance of a ScriptController object pointer from lua, and also calling a function of this object with parameters.

Next steps will be implementing different IDs per controller
object and actually swapping out controllers.

File:
1 edited

Legend:

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

    r10045 r10046  
    99
    1010local ctrl = orxonox.ScriptController:getScriptController()
    11 --orxonox.ScriptController:moveToPosition(x, y, z)
     11if ctrl ~= nil then
     12  ctrl:moveToPosition_beta(x, y, z)
     13end
     14
    1215--ctrl.moveToPosition(x,y,z)
     16--
     17if newctrlid ~= nil then
     18  orxonox.execute("orxout message test " .. newctrlid)
     19end
    1320
    1421local docks = orxonox.Dock:getNumberOfActiveDocks()
Note: See TracChangeset for help on using the changeset viewer.