Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 4, 2015, 11:51:01 AM (9 years ago)
Author:
landauf
Message:

merged r10499 from presentationFS15 into this branch

Location:
code/branches/SciptableControllerFS15
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SciptableControllerFS15

  • code/branches/SciptableControllerFS15/src/orxonox/controllers/ControllerDirector.cc

    r10262 r10609  
    4141    {
    4242        SUPER(ControllerDirector, XMLPort, xmlelement, mode);
     43        XMLPortParam(ControllerDirector, "scriptname", setScriptName, getScriptName, xmlelement, mode).defaultValues("testscript");
    4344
    4445        orxout(verbose)<< "ControllerDirector::XMLPort "
     
    8384       else
    8485         return;
    85        
     86
    8687       /* Set up a luastate to use for running the scripts */
    8788       LuaState * ls = new LuaState();
     
    9899        * variable "newctrlid" defined, which means it can make use of it.
    99100        */
    100 
    101        ls->doFile("testscript.lua");
     101       std::string scr = this->scriptname_ + ".lua";
     102       ls->doFile(scr);
    102103
    103104       /* Increase the controller ID so we have a different one for
Note: See TracChangeset for help on using the changeset viewer.