Index: branches/script_engine/src/lib/script_engine/Makefile.am
===================================================================
--- branches/script_engine/src/lib/script_engine/Makefile.am	(revision 8199)
+++ branches/script_engine/src/lib/script_engine/Makefile.am	(revision 8202)
@@ -15,5 +15,5 @@
                 script.cc\
                 script_manager.cc\
-		scriptable.cc \
+		script_class.cc \
                 script_trigger.cc
 
@@ -24,5 +24,5 @@
                 script.h\
                 script_manager.h\
-		scriptable.h \
+		script_class.h \
                 script_trigger.h
 
Index: branches/script_engine/src/lib/script_engine/script.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/script.cc	(revision 8199)
+++ branches/script_engine/src/lib/script_engine/script.cc	(revision 8202)
@@ -1,4 +1,6 @@
 #include "script.h"
-#include "scriptable.h"
+#include "script_class.h"
+#include "luaincl.h"
+
 
 #include "loading/load_param.h"
@@ -90,13 +92,13 @@
  void Script::addObject(const std::string& className, const std::string& objectName)
  {
-   BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPTABLE);
+   BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS);
    if (scriptClass != NULL)
    {
-     static_cast<Scriptable*>(scriptClass)->registerClass(this);
+     static_cast<ScriptClass*>(scriptClass)->registerClass(this);
      
      BaseObject* object = ClassList::getObject(objectName, className);
      if (object != NULL)
      {
-        static_cast<Scriptable*>(scriptClass)->insertObject(this, object, false);
+        static_cast<ScriptClass*>(scriptClass)->insertObject(this, object, false);
      }
    }
Index: branches/script_engine/src/lib/script_engine/script.h
===================================================================
--- branches/script_engine/src/lib/script_engine/script.h	(revision 8199)
+++ branches/script_engine/src/lib/script_engine/script.h	(revision 8202)
@@ -5,6 +5,5 @@
 #include "base_object.h"
 
-#include "luaincl.h"
-
+struct lua_State;
 
 class Script : public BaseObject
Index: branches/script_engine/src/lib/script_engine/script_class.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/script_class.cc	(revision 8202)
+++ branches/script_engine/src/lib/script_engine/script_class.cc	(revision 8202)
@@ -0,0 +1,41 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: ...
+   co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+
+#include "script_class.h"
+
+using namespace std;
+
+
+/**
+ * standard constructor
+ * @todo this constructor is not jet implemented - do it
+*/
+ScriptClass::ScriptClass(const std::string& name, ClassID classID)
+ : BaseObject(name)
+{
+   this->setClassID(CL_SCRIPT_CLASS, "ScriptClass");
+   this->classID = classID;
+}
+
+
+/**
+ * standard deconstructor
+*/
+ScriptClass::~ScriptClass ()
+{
+  // delete what has to be deleted here
+}
Index: branches/script_engine/src/lib/script_engine/script_class.h
===================================================================
--- branches/script_engine/src/lib/script_engine/script_class.h	(revision 8202)
+++ branches/script_engine/src/lib/script_engine/script_class.h	(revision 8202)
@@ -0,0 +1,69 @@
+/*!
+ * @file script_class.h
+ * @brief Definition of ...
+*/
+
+#ifndef _SCRIPT_CLASS_H
+#define _SCRIPT_CLASS_H
+
+#include "base_object.h"
+
+#include "script.h"
+#include "lunar.h"
+
+// FORWARD DECLARATION
+
+
+/**
+ * Creates a factory to a Loadable Class.
+ * this should be used at the beginning of all the Classes that should be loadable (in the cc-file)
+ */
+#define CREATE_SCRIPTABLE_CLASS(CLASS_NAME, CLASS_ID) \
+    tScriptable<CLASS_NAME> global_##CLASS_NAME##_ScriptableClass(#CLASS_NAME, CLASS_ID)
+
+
+
+//! A class for ...
+class ScriptClass : protected BaseObject
+{
+
+public:
+  ScriptClass(const std::string& name, ClassID classID);
+  virtual ~ScriptClass();
+
+  bool operator==(const std::string& name) { return (this->getName() == name); }
+  bool operator==(ClassID classID) { return (this->classID == classID); }
+  
+  virtual void registerClass(Script* script) = 0;
+  virtual int insertObject(Script* L, BaseObject* obj, const std::string& name, bool gc=false) = 0;
+
+private:
+  ClassID             classID;
+};
+
+
+
+
+template <class T>
+class tScriptable : public ScriptClass
+{
+  tScriptable(const std::string& name, ClassID classID)
+  : ScriptClass(name, classID)
+  { }
+
+  virtual void registerClass(Script* script)
+  {
+    Lunar<T>::Register(script);
+  }
+  virtual int insertObject(Script* L, BaseObject* obj, bool gc=false) 
+  {
+    Lunar<T>::insertObject(L, dynamic_cast<T*>(obj), obj->getName(), gc);
+  }
+  
+
+
+}
+;
+
+
+#endif /* _SCRIPT_CLASS_H */
Index: branches/script_engine/src/lib/script_engine/script_manager.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/script_manager.cc	(revision 8199)
+++ branches/script_engine/src/lib/script_engine/script_manager.cc	(revision 8202)
@@ -2,7 +2,16 @@
 #include <list>
 
-#include "script.h"
+
 #include "script_manager.h"
 #include "lunar.h"
+
+#include "class_list.h"
+
+#include "script.h"
+#include "script_trigger.h"
+#include "luaincl.h"
+#include "loading/load_param.h"
+#include "parser/tinyxml/tinyxml.h"
+
 
 
@@ -23,18 +32,7 @@
   //BaseObject::loadParams(root);
 
-  const TiXmlElement* scripttrigger= root->FirstChildElement("ScriptTrigger");
-
-  while( scripttrigger != NULL)
-   {
-     //TODO: generate script trigger in factory and let them load their params.
-      scripttrigger = scripttrigger->NextSiblingElement("ScriptTrigger");
-   }
-
-   
-   LoadParamXML(root, "Scripts", this, ScriptManager, createScriptList);
-}
-
-void ScriptManager::tick(float timestep)
-{
+  LoadParamXML(root, "ScriptTriggers", this, ScriptManager, createTriggers); 
+  
+  LoadParamXML(root, "Scripts", this, ScriptManager, createScripts);
 }
 
@@ -42,9 +40,13 @@
 void ScriptManager::init()
 {
-
+  //this->setClassID("");
+  this->setName("ScriptManager");
+  
+  this->scripts = NULL;
+  this->triggers = NULL;
 }
 
 
-void  ScriptManager::createScriptList(const TiXmlElement* scripts)
+void  ScriptManager::createScripts(const TiXmlElement* scripts)
 {
   
@@ -54,36 +56,14 @@
   }
   LOAD_PARAM_END_CYCLE(object);
-      
-      
-  /*
-  const TiXmlElement* script = scripts->FirstChildElement();
 
-  PRINTF(4)("Creating scriptlist\n");
+}
 
-  while( script != NULL)
+void ScriptManager::createTriggers(const TiXmlElement* triggers)
+{
+  LOAD_PARAM_START_CYCLE(triggers, object);
   {
-    { // scope to make the LoadParam work
-    LoadParam(script, "file", this, ScriptManager, setCurrentScriptFile)
-        .describe("the fileName of the script, that should be loaded into this world")
-        .defaultValues("");
-    }
-
-    if(!currentScript.name.empty()) // if LoadParam didn't fail... fill the object list with the needed objects
-    {
-
-    LOAD_PARAM_START_CYCLE(script, object);
-    {
-     // LoadParam_CYCLE(object, "object", this, ScriptManager, addObjectToScript)
-       //   .describe("The name of an object that is needed by a script");
-    }
-    LOAD_PARAM_END_CYCLE(object);
-
-    scriptList.push_back(currentScript);
-    }
-
-    script = script->NextSiblingElement("Script");
-
-  }*/
-
+    new ScriptTrigger(object);
+  }
+  LOAD_PARAM_END_CYCLE(object);
 
 }
@@ -104,2 +84,10 @@
 }
 
+
+bool ScriptManager::getScripts()
+{
+  return (this->scripts != NULL || (this->scripts = ClassList::getList(CL_SCRIPT)) != NULL); 
+}
+
+
+
Index: branches/script_engine/src/lib/script_engine/script_manager.h
===================================================================
--- branches/script_engine/src/lib/script_engine/script_manager.h	(revision 8199)
+++ branches/script_engine/src/lib/script_engine/script_manager.h	(revision 8202)
@@ -3,10 +3,7 @@
 
 #include <list>
-#include <string>
 
+#include "base_object.h"
 #include "script.h"
-#include "base_object.h"
-#include "luaincl.h"
-#include "loading/load_param.h"
 
 
@@ -24,5 +21,4 @@
   virtual void loadParams(const TiXmlElement* root);
 
-  void tick(float timestep);
 
   Script* getScriptByFile(std::string& file);
@@ -33,13 +29,14 @@
 
    void  init();
-   void  createScriptList(const TiXmlElement* scripts);
-   void  addObjectToScript(const std::string object);
-
+   void  createScripts(const TiXmlElement* scripts);
+   void  createTriggers(const TiXmlElement* triggers);
+   
+   bool getTriggers();
+   bool getScripts();
 
    static ScriptManager*             singletonRef;   //!< Reference to this class
 
-   const std::list<BaseObject*>*     triggerList;
+   const std::list<BaseObject*>*     triggers;
 
-   const std::list<BaseObject*>*     scriptableClasses;
    const std::list<BaseObject*>*     scripts;
 
Index: branches/script_engine/src/lib/script_engine/script_trigger.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/script_trigger.cc	(revision 8199)
+++ branches/script_engine/src/lib/script_engine/script_trigger.cc	(revision 8202)
@@ -1,10 +1,15 @@
 #include "script_trigger.h"
+#include "class_list.h"
+#include "script.h"
 
 
-ScriptTrigger::ScriptTrigger()
+ScriptTrigger::ScriptTrigger(const TiXmlElement* root)
 {
- scriptCalled = false;
- callScript = false;
- triggered = false;
+  scriptCalled = false;
+  callScript = false;
+  triggered = false;
+  loadParams(root);
+
+
 }
 
@@ -16,5 +21,5 @@
 void ScriptTrigger::loadParams(const TiXmlElement* root)
 {
-  WorldEntity::loadParams(root);
+  WorldEntity ::loadParams(root);
   
    /*{ LoadParam(root, "file", this, ScriptTrigger, setScript)
@@ -55,5 +60,5 @@
   else
   {
-    PRINTF(2)("Target %s for %s::%s does not Exist\n", taget.c_str(), this->getClassName(), this->getName());
+    PRINTF(2)("Target %s for %s::%s does not Exist\n", target.c_str(), this->getClassName(), this->getName());
   }
 }
Index: branches/script_engine/src/lib/script_engine/script_trigger.h
===================================================================
--- branches/script_engine/src/lib/script_engine/script_trigger.h	(revision 8199)
+++ branches/script_engine/src/lib/script_engine/script_trigger.h	(revision 8202)
@@ -12,5 +12,5 @@
 {
   public:
-    ScriptTrigger();
+    ScriptTrigger(const TiXmlElement* root);
     ~ScriptTrigger();
 
@@ -21,7 +21,6 @@
     
     void setTarget(const std::string& targetName);
-    
-    void setTarget(WorldEntity* target) { if(target!=NULL) this->target=target;if(worldEntityIsParent)this->setParent(target); }
-    void setTargetName(std::string& name){ this->targetName = name; }
+    void setTarget(WorldEntity* target) { if(target!=NULL) this->target=target; }
+ 
     void setCallOnce(bool call) { this->callOnce = call;}
     void setRadius(float radius) { if(radius>0) this->radius = radius;}
@@ -30,5 +29,5 @@
     void setFunction(std::string& function){this->functionName = function;}
 
-    std::string getTargetName(){return targetName;}
+    std::string getTargetName();
 
   private:
@@ -36,12 +35,11 @@
     std::string  parentName;
     WorldEntity* target;
-    std::string  targetName;
     bool         worldEntityIsParent;
     bool         callOnce;
-    bool scriptCalled;
-    float radius;
-    float delay;
-    std::string scriptFile;
-    std::string functionName;
+    bool         scriptCalled;
+    float        radius;
+    float        delay;
+    std::string  scriptFile;
+    std::string  functionName;
 
     bool callScript;
Index: branches/script_engine/src/lib/script_engine/scriptable.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/scriptable.cc	(revision 8199)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   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, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: ...
-   co-programmer: ...
-*/
-
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
-
-#include "scriptable.h"
-
-using namespace std;
-
-
-/**
- * standard constructor
- * @todo this constructor is not jet implemented - do it
-*/
-Scriptable::Scriptable(const std::string& name, ClassID classID)
- : BaseObject(name)
-{
-   this->setClassID(CL_SCRIPTABLE, "Scriptable");
-   this->classID = classID;
-
-
-}
-
-
-/**
- * standard deconstructor
-*/
-Scriptable::~Scriptable ()
-{
-  // delete what has to be deleted here
-}
Index: branches/script_engine/src/lib/script_engine/scriptable.h
===================================================================
--- branches/script_engine/src/lib/script_engine/scriptable.h	(revision 8199)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*!
- * @file scriptable.h
- * @brief Definition of ...
-*/
-
-#ifndef _SCRIPTABLE_H
-#define _SCRIPTABLE_H
-
-#include "base_object.h"
-
-#include "script.h"
-#include "lunar.h"
-
-// FORWARD DECLARATION
-
-
-/**
- * Creates a factory to a Loadable Class.
- * this should be used at the beginning of all the Classes that should be loadable (in the cc-file)
- */
-#define CREATE_SCRIPTABLE_CLASS(CLASS_NAME, CLASS_ID) \
-    tScriptable<CLASS_NAME> global_##CLASS_NAME##_ScriptableClass(#CLASS_NAME, CLASS_ID)
-
-
-
-//! A class for ...
-class Scriptable : protected BaseObject
-{
-
-public:
-  Scriptable(const std::string& name, ClassID classID);
-  virtual ~Scriptable();
-
-  bool operator==(const std::string& name) { return (this->getName() == name); }
-  bool operator==(ClassID classID) { return (this->classID == classID); }
-  
-  virtual void registerClass(Script* script) = 0;
-  virtual int insertObject(Script* L, BaseObject* obj, const std::string& name, bool gc=false) = 0;
-
-private:
-  ClassID             classID;
-};
-
-
-
-
-template <class T>
-class tScriptable : public Scriptable
-{
-  tScriptable(const std::string& name, ClassID classID)
-  : Scriptable(name, classID)
-  { }
-
-  virtual void registerClass(Script* script)
-  {
-    Lunar<T>::Register(script);
-  }
-  virtual int insertObject(Script* L, BaseObject* obj, bool gc=false) 
-  {
-    Lunar<T>::insertObject(L, dynamic_cast<T*>(obj), obj->getName(), gc);
-  }
-  
-
-
-}
-;
-
-
-#endif /* _SCRIPTABLE_H */
