Index: /code/branches/script_trigger/bin/levels/sample.oxw
===================================================================
--- /code/branches/script_trigger/bin/levels/sample.oxw	(revision 1382)
+++ /code/branches/script_trigger/bin/levels/sample.oxw	(revision 1383)
@@ -12,9 +12,6 @@
 <Skybox src="Orxonox/StarSkyBox" />
 <SpaceShip camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assff.mesh" maxSpeed="500" maxSideAndBackSpeed="50" maxRotation="1.0" transAcc="200" rotAcc="3.0" transDamp="75" rotDamp="1.0" />
-<Script>
-  print("****")
-  print("Hello Scripting World")
-  print("****")
-</Script>
+
+<?lua include("levels/test.oxw") ?>
 
 <NPC position="0,100,400" scale="1" mesh="razor.mesh"/>
Index: /code/branches/script_trigger/src/core/CMakeLists.txt
===================================================================
--- /code/branches/script_trigger/src/core/CMakeLists.txt	(revision 1382)
+++ /code/branches/script_trigger/src/core/CMakeLists.txt	(revision 1383)
@@ -33,5 +33,5 @@
   OUTPUT tolua/tolua_bind.cc tolua/tolua_bind.h
   COMMAND ${TOLUA_EXE} -n core -o ../../src/core/tolua/tolua_bind.cc -H ../../src/core/tolua/tolua_bind.h ../../src/core/tolua/tolua.pkg
-  DEPENDS tolua
+  DEPENDS tolua LuaBind_clean.h
   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib
 )
Index: /code/branches/script_trigger/src/orxonox/CMakeLists.txt
===================================================================
--- /code/branches/script_trigger/src/orxonox/CMakeLists.txt	(revision 1382)
+++ /code/branches/script_trigger/src/orxonox/CMakeLists.txt	(revision 1383)
@@ -25,4 +25,5 @@
   objects/WorldEntity.cc
   objects/Script.cc
+  objects/Trigger.cc
 
 #  objects/weapon/AmmunitionDump.cc
Index: /code/branches/script_trigger/src/orxonox/objects/Model.cc
===================================================================
--- /code/branches/script_trigger/src/orxonox/objects/Model.cc	(revision 1382)
+++ /code/branches/script_trigger/src/orxonox/objects/Model.cc	(revision 1383)
@@ -50,9 +50,8 @@
 
     /**
-        @brief XML loading and saving.
-    @p
-    aram xmlelement The XML-element
-        @param loading Loading (true) or saving (false)
-        @return The XML-element
+    @brief XML loading and saving.
+    @param xmlelement The XML-element
+    @param loading Loading (true) or saving (false)
+    @return The XML-element
     */
     void Model::XMLPort(Element& xmlelement, XMLPort::Mode mode)
Index: /code/branches/script_trigger/src/orxonox/objects/Script.cc
===================================================================
--- /code/branches/script_trigger/src/orxonox/objects/Script.cc	(revision 1383)
+++ /code/branches/script_trigger/src/orxonox/objects/Script.cc	(revision 1383)
@@ -0,0 +1,69 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Script.h"
+#include "core/CoreIncludes.h"
+
+#include "core/XMLPort.h"
+#include "core/LuaBind.h"
+#include "core/Debug.h"
+
+namespace orxonox
+{
+  CreateFactory(Script);
+
+  Script::Script()
+  {
+    RegisterObject(Script);
+
+    code_ = "";
+  }
+
+  Script::~Script()
+  {
+  }
+
+  /**
+  @brief XML loading and saving.
+  @param xmlelement The XML-element
+  @param loading Loading (true) or saving (false)
+   */
+  void Script::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+  {
+    BaseObject::XMLPort(xmlelement, mode);
+
+    code_ = xmlelement.GetText(false);
+  }
+
+  void Script::execute()
+  {
+    LuaBind* lua = LuaBind::getInstance();
+    lua->loadString(this->code_);
+    lua->run();
+  }
+}
Index: /code/branches/script_trigger/src/orxonox/objects/Script.h
===================================================================
--- /code/branches/script_trigger/src/orxonox/objects/Script.h	(revision 1383)
+++ /code/branches/script_trigger/src/orxonox/objects/Script.h	(revision 1383)
@@ -0,0 +1,51 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Script_H__
+#define _Script_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+  class _OrxonoxExport Script : public BaseObject
+  {
+    public:
+      Script();
+      ~Script();
+      void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+      void execute();
+
+    private:
+      std::string code_;
+  };
+}
+
+#endif /* _Script_H__ */
Index: /code/branches/script_trigger/src/orxonox/objects/SpaceShip.cc
===================================================================
--- /code/branches/script_trigger/src/orxonox/objects/SpaceShip.cc	(revision 1382)
+++ /code/branches/script_trigger/src/orxonox/objects/SpaceShip.cc	(revision 1383)
@@ -277,12 +277,12 @@
       // change camera attributes here, if you want to ;)
     }
-    
+
     void SpaceShip::getFocus(){
       COUT(4) << "requesting focus" << std::endl;
       if(network::Client::getSingleton()==0 || network::Client::getSingleton()->getShipID()==objectID)
         CameraHandler::getInstance()->requestFocus(cam_);
-      
-    }
-    
+
+    }
+
     void SpaceShip::createCamera(){
 //       COUT(4) << "begin camera creation" << std::endl;
Index: /code/branches/script_trigger/src/orxonox/objects/Trigger.cc
===================================================================
--- /code/branches/script_trigger/src/orxonox/objects/Trigger.cc	(revision 1383)
+++ /code/branches/script_trigger/src/orxonox/objects/Trigger.cc	(revision 1383)
@@ -0,0 +1,58 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Trigger.h"
+
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+  CreateFactory(Trigger);
+
+  Trigger::Trigger()
+  {
+    RegisterObject(Trigger);
+
+  }
+
+  Trigger::~Trigger()
+  {
+  }
+
+  bool Trigger::isTriggered()
+  {
+    return true;
+  }
+
+  void Trigger::addTrigger(Trigger* trig)
+  {
+    if (this != trig)
+      this->triggers_.insert(trig);
+  }
+
+}
Index: /code/branches/script_trigger/src/orxonox/objects/Trigger.h
===================================================================
--- /code/branches/script_trigger/src/orxonox/objects/Trigger.h	(revision 1383)
+++ /code/branches/script_trigger/src/orxonox/objects/Trigger.h	(revision 1383)
@@ -0,0 +1,70 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Trigger_H__
+#define _Trigger_H__
+
+#include <list>
+
+#include "OrxonoxPrereqs.h"
+
+#include "WorldEntity.h"
+#include "core/BaseObject.h"
+
+namespace orxonox {
+
+  enum TriggerMode
+  {
+    TM_EventTriggerAnd,
+    TM_EventTriggerOr,
+    TM_DelayTrigger,
+    TM_DistanceTrigger,
+    TM_DistanceEventTriggerAnd,
+    TM_DistanceEventTriggerOr,
+  };
+
+  class _OrxonoxExport Trigger : public WorldEntity
+  {
+    public:
+      Trigger();
+      ~Trigger();
+
+      bool isTriggered();
+      void addTrigger(Trigger* trig);
+      inline TriggerMode getMode() { return mode_; }
+      inline void setMode(TriggerMode mode) { this->mode_ = mode; }
+
+    private:
+      std::set<Trigger*> triggers_;
+      TriggerMode mode_;
+
+  };
+
+}
+
+#endif /* _Trigger_H__ */
