Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 15, 2014, 2:18:08 PM (11 years ago)
Author:
mkronig
Message:
 
Location:
code/branches/ScriptableController
Files:
4 edited

Legend:

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

    r10048 r10057  
    1515-- If it worked, call its "movetoposition" function
    1616if ctrl ~= nil then
    17   ctrl:eventScheduler("moveToPosition_beta", x, y, z, 5)
     17  ctrl:eventScheduler("moveToPosition_beta", x, y, z, 0.01)
    1818end
     19
     20
    1921
    2022-- Output the newctrlid variable we set from the C++ code
  • code/branches/ScriptableController/data/levels/levelTry.oxw

    r10037 r10057  
    7272
    7373
    74     <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=100 />
     74    <Billboard position="500,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=10 />
    7575    <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
    7676      beaconMode="exclude" targetname="bcnDestroyer" name="takeControl"
  • code/branches/ScriptableController/src/orxonox/controllers/ControllerDirector.cc

    r10047 r10057  
    2727
    2828        // output a message to ensure we know the constructor was run
    29         orxout()<<"hello universe constructor"<< endl;
     29        orxout()<<"hello universe constructor blablub"<< endl;
     30
     31
    3032
    3133        // Initialize member variables
     
    9698        * variable "newctrlid" defined, which means it can make use of it.
    9799        */
     100
    98101       ls->doFile("testscript.lua");
    99102
  • code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc

    r10056 r10057  
    3636namespace orxonox
    3737{
    38     float scTime=0;  /*initialise time, to coordinate eventTime*/
     38    float scTime=0;  /*initialize time, to coordinate eventTime*/
    3939
    4040
     
    117117        if(ev.fctName=="moveToPosition_beta")
    118118        {
     119
    119120            moveToPosition_beta(ev.xCoord,ev.yCoord,ev.zCoord);
    120121        }
     
    137138            /*TO DO: execute the function: eventList[0].fctName*/
    138139
    139 
     140            execute(eventList[0]);
    140141            eventList.erase(eventList.begin());
    141142        }
     
    167168    void ScriptController::eventScheduler(std::string instruction, float x, float y, float z, float executionTime)
    168169    {
     170
    169171        /*put data (from LUA) into time-sorted eventList*/
    170172        /*nimmt den befehl und die argumente aus luascript und ertellt einen struct pro event, diese structs werden sortiert nach eventTime*/
     
    195197        }
    196198       
     199       
    197200    }
    198201
Note: See TracChangeset for help on using the changeset viewer.