Changeset 10057 for code/branches/ScriptableController
- Timestamp:
- May 15, 2014, 2:18:08 PM (11 years ago)
- Location:
- code/branches/ScriptableController
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ScriptableController/data/gui/scripts/testscript.lua
r10048 r10057 15 15 -- If it worked, call its "movetoposition" function 16 16 if ctrl ~= nil then 17 ctrl:eventScheduler("moveToPosition_beta", x, y, z, 5)17 ctrl:eventScheduler("moveToPosition_beta", x, y, z, 0.01) 18 18 end 19 20 19 21 20 22 -- Output the newctrlid variable we set from the C++ code -
code/branches/ScriptableController/data/levels/levelTry.oxw
r10037 r10057 72 72 73 73 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 /> 75 75 <DistanceTrigger position="0,0,0" distance="200" target="Pawn" 76 76 beaconMode="exclude" targetname="bcnDestroyer" name="takeControl" -
code/branches/ScriptableController/src/orxonox/controllers/ControllerDirector.cc
r10047 r10057 27 27 28 28 // 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 30 32 31 33 // Initialize member variables … … 96 98 * variable "newctrlid" defined, which means it can make use of it. 97 99 */ 100 98 101 ls->doFile("testscript.lua"); 99 102 -
code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc
r10056 r10057 36 36 namespace orxonox 37 37 { 38 float scTime=0; /*initiali se time, to coordinate eventTime*/38 float scTime=0; /*initialize time, to coordinate eventTime*/ 39 39 40 40 … … 117 117 if(ev.fctName=="moveToPosition_beta") 118 118 { 119 119 120 moveToPosition_beta(ev.xCoord,ev.yCoord,ev.zCoord); 120 121 } … … 137 138 /*TO DO: execute the function: eventList[0].fctName*/ 138 139 139 140 execute(eventList[0]); 140 141 eventList.erase(eventList.begin()); 141 142 } … … 167 168 void ScriptController::eventScheduler(std::string instruction, float x, float y, float z, float executionTime) 168 169 { 170 169 171 /*put data (from LUA) into time-sorted eventList*/ 170 172 /*nimmt den befehl und die argumente aus luascript und ertellt einen struct pro event, diese structs werden sortiert nach eventTime*/ … … 195 197 } 196 198 199 197 200 } 198 201
Note: See TracChangeset
for help on using the changeset viewer.