Index: branches/script_engine/src/lib/script_engine/script_manager.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/script_manager.cc	(revision 8173)
+++ branches/script_engine/src/lib/script_engine/script_manager.cc	(revision 8178)
@@ -22,4 +22,12 @@
 {
   //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");
+   }
 
   const TiXmlElement* scripts = root->FirstChildElement("Scripts");
Index: branches/script_engine/src/lib/script_engine/script_manager.h
===================================================================
--- branches/script_engine/src/lib/script_engine/script_manager.h	(revision 8173)
+++ branches/script_engine/src/lib/script_engine/script_manager.h	(revision 8178)
@@ -6,4 +6,5 @@
 
 #include "script.h"
+#include "script_trigger.h"
 #include "base_object.h"
 #include "luaincl.h"
@@ -18,4 +19,5 @@
   Script script;
 };
+
 
 class ScriptManager : public BaseObject
@@ -53,4 +55,6 @@
 
 
+
+
 };
 #endif
Index: branches/script_engine/src/lib/script_engine/script_trigger.cc
===================================================================
--- branches/script_engine/src/lib/script_engine/script_trigger.cc	(revision 8173)
+++ branches/script_engine/src/lib/script_engine/script_trigger.cc	(revision 8178)
@@ -23,5 +23,5 @@
         .defaultValues("");
     LoadParam(root, "abs-coor", this, ScriptTrigger, setAbsCoord)
-        .describe("the fileName of the script, that should be triggered by this script trigger")
+        .describe("where this script trigger should be located")
         .defaultValues("");
     LoadParam(root, "radius", this, ScriptTrigger, setRadius)
@@ -31,4 +31,11 @@
         .describe("the delay after which the funtion sould be triggered")
         .defaultValues(0);
+    LoadParam(root, "worldentity", this, ScriptTrigger, setTargetName)
+        .describe("The name of the target as it is in the *.oxw file")
+        .defaultValues("");
+    LoadParam(root, "worldentityisparent", this, ScriptTrigger, setIsParent)
+        .describe("The name of the target as it is in the *.oxw file")
+        .defaultValues("");
+
     }*/
  timer = delay;
@@ -39,20 +46,12 @@
 void ScriptTrigger::tick(float timestep)
 {
- //if(triggered)
- //{
-  //timer -= timestep;
-  //if(timer < 0)
-   callScript = true;
- //}
- 
 
  if((this->getAbsDirV()-target->getAbsDirV()).len() < radius)
  {
-  //triggered = true;
-  if(!callOnce && callScript)
+  if(!callOnce)
    {
     executeAction();
    }
-  else if(callOnce && !scriptCalled && callScript)
+  else if(callOnce && !scriptCalled)
   {
    executeAction();
@@ -70,6 +69,6 @@
      Script* script = scriptManager->getScriptByFile(this->scriptFile);
      if(!(script->selectFunction(this->functionName,0)) )
-       printf("Error: Selection of %s in %s failed.\n",functionName.c_str(), scriptFile.c_str());
+       printf("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), scriptFile.c_str());
      if( !(script->executeFunction()) )
-       printf("Execution of %s in %s failed\n",functionName.c_str(),scriptFile.c_str());
+       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 8173)
+++ branches/script_engine/src/lib/script_engine/script_trigger.h	(revision 8178)
@@ -19,5 +19,6 @@
     virtual void executeAction();
 
-    void setTarget(WorldEntity* target){ if(target!=NULL) this->target=target;}
+    void setTarget(WorldEntity* target){ if(target!=NULL) this->target=target;if(worldEntityIsParent)this->setParent(target);}
+    void setTargetName(std::string& name){this->targetName = name;}
     void setCallOnce(bool call){this->callOnce = call;}
     void setRadius(float radius){if(radius>0) this->radius = radius;}
@@ -26,8 +27,12 @@
     void setFunction(std::string& function){this->functionName = function;}
 
+    std::string getTargetName(){return targetName;}
+
   private:
 
     WorldEntity* target;
-    bool callOnce;
+    std::string  targetName;
+    bool         worldEntityIsParent;
+    bool         callOnce;
     bool scriptCalled;
     float radius;
