Index: branches/script_engine/src/lib/script_engine/script.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/script.cc	(revision 8206)
+++ branches/script_engine/src/lib/script_engine/script.cc	(revision 8207)
@@ -93,8 +93,12 @@
  {
    BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS);
+   WorldObject tmpObj;
    if (scriptClass != NULL)
    {
      if( !classIsRegistered(className) )
+     {
      static_cast<ScriptClass*>(scriptClass)->registerClass(this);
+     tmpObj.type = className;
+     }
      
      BaseObject* object = ClassList::getObject(objectName, className);
@@ -102,4 +106,6 @@
      {
         static_cast<ScriptClass*>(scriptClass)->insertObject(this, object, false);
+        tmpObj.name = objectName;
+        registeredObjects.push_back(tmpObj);
      }
    }
@@ -296,5 +302,5 @@
  bool Script::classIsRegistered(const std::string& type)
  {
-   for(std::list<worldObject>::const_iterator it = registeredObjects.begin(); it != registeredObjects.end(); it++ )
+   for(std::list<WorldObject>::const_iterator it = registeredObjects.begin(); it != registeredObjects.end(); it++ )
    {
      if( (*it).type == type)
@@ -310,5 +316,5 @@
  bool Script::objectIsAdded(const std::string& name)
  {
-   for(std::list<worldObject>::const_iterator it = registeredObjects.begin(); it != registeredObjects.end(); it++ )
+   for(std::list<WorldObject>::const_iterator it = registeredObjects.begin(); it != registeredObjects.end(); it++ )
    {
      if( (*it).name == name)
Index: branches/script_engine/src/lib/script_engine/script.h
===================================================================
--- branches/script_engine/src/lib/script_engine/script.h	(revision 8206)
+++ branches/script_engine/src/lib/script_engine/script.h	(revision 8207)
@@ -8,5 +8,5 @@
 struct lua_State;
 
-struct worldObject
+struct WorldObject
 {
   std::string name;
@@ -57,6 +57,6 @@
 
     int  reportError(int error);                      //!< Get errormessage from the lua stack and print it.
-    bool classIsRegistered(const std::string& type);
-    bool objectIsAdded(const std::string& name);
+    bool classIsRegistered(const std::string& type);  //!< Checks wheter the class "type" has already been registered with the script
+    bool objectIsAdded(const std::string& name);      //!< Checks wheter the object "name" has already been added to the script
 
     lua_State*              luaState;                //!< The lua_State that the Script works on
@@ -66,5 +66,5 @@
     int                     returnCount;             //!< Number of return values of the current function
     
-    std::list<worldObject>  registeredObjects;       //!< The list of all the objects and their type that have been registered with this script
+    std::list<WorldObject>  registeredObjects;       //!< The list of all the objects and their type that have been registered with this script
 
 
Index: branches/script_engine/src/lib/script_engine/script_trigger.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/script_trigger.cc	(revision 8206)
+++ branches/script_engine/src/lib/script_engine/script_trigger.cc	(revision 8207)
@@ -21,4 +21,6 @@
 void ScriptTrigger::loadParams(const TiXmlElement* root)
 {
+  if(root != NULL)
+  {
   WorldEntity ::loadParams(root);
   
@@ -46,5 +48,7 @@
 
     }
- timer = delay;
+    timer = delay;
+  }
+ 
 }
 
@@ -71,4 +75,5 @@
   {
     this->setParent(dynamic_cast<WorldEntity*>(parentEntity));
+    this->setParentMode(PNODE_MOVEMENT);
   }
   else
@@ -103,7 +108,9 @@
      Script* script = scriptManager->getScriptByFile(this->scriptFile);
      if(script != NULL)
+     {
      if(!(script->selectFunction(this->functionName,0)) )
        printf("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), scriptFile.c_str());
      if( !(script->executeFunction()) )
        printf("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(),scriptFile.c_str());
+     }
 }
Index: branches/script_engine/src/lib/script_engine/script_trigger.h
===================================================================
--- branches/script_engine/src/lib/script_engine/script_trigger.h	(revision 8206)
+++ branches/script_engine/src/lib/script_engine/script_trigger.h	(revision 8207)
@@ -12,8 +12,12 @@
 {
   public:
-    ScriptTrigger(const TiXmlElement* root);
+    ScriptTrigger(const TiXmlElement* root = NULL);
     ~ScriptTrigger();
 
+    ///LOADING
     virtual void loadParams(const TiXmlElement* root);
+    
+    
+    ///
     virtual void tick(float timestep);
     virtual void executeAction();
@@ -30,6 +34,4 @@
     void setScript(const std::string& script){this->scriptFile = script;}
     void setFunction(const std::string& function){this->functionName = function;}
-
-    std::string getTargetName();
 
   private:
