[Orxonox-commit 5394] r10057 - in code/branches/ScriptableController: data/gui/scripts data/levels src/orxonox/controllers

mkronig at orxonox.net mkronig at orxonox.net
Thu May 15 14:18:08 CEST 2014


Author: mkronig
Date: 2014-05-15 14:18:08 +0200 (Thu, 15 May 2014)
New Revision: 10057

Modified:
   code/branches/ScriptableController/data/gui/scripts/testscript.lua
   code/branches/ScriptableController/data/levels/levelTry.oxw
   code/branches/ScriptableController/src/orxonox/controllers/ControllerDirector.cc
   code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc
Log:


Modified: code/branches/ScriptableController/data/gui/scripts/testscript.lua
===================================================================
--- code/branches/ScriptableController/data/gui/scripts/testscript.lua	2014-05-15 09:12:30 UTC (rev 10056)
+++ code/branches/ScriptableController/data/gui/scripts/testscript.lua	2014-05-15 12:18:08 UTC (rev 10057)
@@ -14,9 +14,11 @@
 
 -- If it worked, call its "movetoposition" function
 if ctrl ~= nil then
-  ctrl:eventScheduler("moveToPosition_beta", x, y, z, 5)
+  ctrl:eventScheduler("moveToPosition_beta", x, y, z, 0.01)
 end
 
+
+
 -- Output the newctrlid variable we set from the C++ code
 if newctrlid ~= nil then
   orxonox.execute("orxout message test " .. newctrlid)

Modified: code/branches/ScriptableController/data/levels/levelTry.oxw
===================================================================
--- code/branches/ScriptableController/data/levels/levelTry.oxw	2014-05-15 09:12:30 UTC (rev 10056)
+++ code/branches/ScriptableController/data/levels/levelTry.oxw	2014-05-15 12:18:08 UTC (rev 10057)
@@ -71,7 +71,7 @@
     </StaticEntity>
 
 
-    <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=100 />
+    <Billboard position="500,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=10 />
     <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
       beaconMode="exclude" targetname="bcnDestroyer" name="takeControl"
     />

Modified: code/branches/ScriptableController/src/orxonox/controllers/ControllerDirector.cc
===================================================================
--- code/branches/ScriptableController/src/orxonox/controllers/ControllerDirector.cc	2014-05-15 09:12:30 UTC (rev 10056)
+++ code/branches/ScriptableController/src/orxonox/controllers/ControllerDirector.cc	2014-05-15 12:18:08 UTC (rev 10057)
@@ -26,8 +26,10 @@
         RegisterObject(ControllerDirector);
 
         // output a message to ensure we know the constructor was run
-        orxout()<<"hello universe constructor"<< endl;
+        orxout()<<"hello universe constructor blablub"<< endl;
 
+
+
         // Initialize member variables
         this->player_ = NULL;
         this->entity_ = NULL;
@@ -95,6 +97,7 @@
        /* Now run the script on this controller. This will still have the above
         * variable "newctrlid" defined, which means it can make use of it.
         */
+
        ls->doFile("testscript.lua");
 
        /* Increase the controller ID so we have a different one for

Modified: code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc
===================================================================
--- code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc	2014-05-15 09:12:30 UTC (rev 10056)
+++ code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc	2014-05-15 12:18:08 UTC (rev 10057)
@@ -35,7 +35,7 @@
 
 namespace orxonox
 {
-    float scTime=0;  /*initialise time, to coordinate eventTime*/
+    float scTime=0;  /*initialize time, to coordinate eventTime*/
 
 
 
@@ -116,6 +116,7 @@
     {
         if(ev.fctName=="moveToPosition_beta")
         {
+
             moveToPosition_beta(ev.xCoord,ev.yCoord,ev.zCoord);
         }
     }
@@ -136,7 +137,7 @@
         {
             /*TO DO: execute the function: eventList[0].fctName*/
 
-
+            execute(eventList[0]);
             eventList.erase(eventList.begin());
         }
 
@@ -166,6 +167,7 @@
 
     void ScriptController::eventScheduler(std::string instruction, float x, float y, float z, float executionTime)
     {
+
         /*put data (from LUA) into time-sorted eventList*/ 
         /*nimmt den befehl und die argumente aus luascript und ertellt einen struct pro event, diese structs werden sortiert nach eventTime*/
         struct event tmp;
@@ -194,6 +196,7 @@
 
         }
         
+        
     }
 
 




More information about the Orxonox-commit mailing list