[Orxonox-commit 5346] r10009 - in code/branches/ScriptableController: data/levels src/orxonox/controllers

mkronig at orxonox.net mkronig at orxonox.net
Thu Mar 27 16:13:16 CET 2014


Author: mkronig
Date: 2014-03-27 16:13:16 +0100 (Thu, 27 Mar 2014)
New Revision: 10009

Modified:
   code/branches/ScriptableController/data/levels/levelTry.oxw
   code/branches/ScriptableController/src/orxonox/controllers/ScriptController_00.cc
Log:
edited comments in levelTry.oxw file and scriptableController_00.cc

Modified: code/branches/ScriptableController/data/levels/levelTry.oxw
===================================================================
--- code/branches/ScriptableController/data/levels/levelTry.oxw	2014-03-27 14:52:59 UTC (rev 10008)
+++ code/branches/ScriptableController/data/levels/levelTry.oxw	2014-03-27 15:13:16 UTC (rev 10009)
@@ -1,4 +1,4 @@
-<!--  -->
+<!-- First levelFile of mkronig and samuezu. It was copied from dockingToASpaceStation.oxw and modified a little bit -->
 <LevelInfo
  name = "Fancy orxout tests"
  description = "Docking into a spacestation."
@@ -94,6 +94,8 @@
         <attached>
 	<!-- Trigger for docking with billboard -->
 
+		<!-- removed -->
+
 	<!-- Trigger for undocking with billboard -->
 	    <!-- <Billboard position="-2630,-19970,150" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 /> -->
 	    <DistanceTrigger position="-2630,-19970,150" distance="50" target="Pawn"
@@ -108,7 +110,7 @@
     />
 
 
-
+<!-- Object, which orxouts the message "hello Universe!". EVENT NOT WORKING  -->
     <ScriptController_00 position="0,0,0">
         <events>
             <party>

Modified: code/branches/ScriptableController/src/orxonox/controllers/ScriptController_00.cc
===================================================================
--- code/branches/ScriptableController/src/orxonox/controllers/ScriptController_00.cc	2014-03-27 14:52:59 UTC (rev 10008)
+++ code/branches/ScriptableController/src/orxonox/controllers/ScriptController_00.cc	2014-03-27 15:13:16 UTC (rev 10009)
@@ -1,29 +1,5 @@
 /*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
+First try of a scriptController. Target: An event occurs in the levelTry.oxw file, which is "heard" by an object of the type of this class. It then SHOULD (because it is not working) execute the party function.
  */
 
 #include "ScriptController_00.h"
@@ -35,12 +11,14 @@
 
     ScriptController_00::ScriptController_00(Context* context) : ArtificialController(context)
     {
+	//Working
         RegisterObject(ScriptController_00);
         orxout()<<"hello universe constructor"<< endl;
     }
 
     bool ScriptController_00::party(bool bTriggered, BaseObject* trigger)
        {
+	   //XMLPortEventSink seems not to execute the party function
            orxout()<<"hello universe party"<< endl;
            return true;
        }
@@ -49,6 +27,8 @@
     void ScriptController_00::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
         SUPER(ScriptController_00, XMLPort, xmlelement, mode);
+
+	//WORKING
     	XMLPortEventSink(ScriptController_00, BaseObject, "party", party, xmlelement, mode);
         orxout()<<"hello universe xmlport"<< endl;
     }




More information about the Orxonox-commit mailing list