Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2015, 2:36:07 PM (9 years ago)
Author:
maxima
Message:

New XMLPort for ControllerDirector. The name of the script can now be set via XMLPort. Level scriptController plays the new Script 'presentation.lua'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationFS15/src/orxonox/controllers/ControllerDirector.cc

    r10262 r10499  
    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.