Index: /branches/script_engine/src/lib/coord/p_node.h
===================================================================
--- /branches/script_engine/src/lib/coord/p_node.h	(revision 8484)
+++ /branches/script_engine/src/lib/coord/p_node.h	(revision 8485)
@@ -103,4 +103,11 @@
   /** @returns the absolute position */
   inline const Vector& getAbsCoor () const { return this->absCoordinate; };
+  /** @returns the absolute X coordinate. */
+  inline float getAbsCoorX() { return this->absCoordinate.x; };
+  /** @returns the absolute Y Coordinate */
+  inline float getAbsCoorY() { return this->absCoordinate.y; };
+  /** @returns the absolute Z Coordinate */
+  inline float getAbsCoorZ() { return this->absCoordinate.z; };
+  
   void shiftCoor (const Vector& shift);
   void shiftCoor (float x, float y, float z) { this->shiftCoor(Vector(x, y, z)); };
Index: /branches/script_engine/src/lib/script_engine/script.cc
===================================================================
--- /branches/script_engine/src/lib/script_engine/script.cc	(revision 8484)
+++ /branches/script_engine/src/lib/script_engine/script.cc	(revision 8485)
@@ -192,5 +192,5 @@
  bool Script::pushParam(int param, std::string& toFunction)
  {
-   if(currentFunction.compare(toFunction) == 0)
+   if(currentFunction == toFunction)
    {
      lua_pushnumber(luaState, (lua_Number) param);
@@ -267,4 +267,6 @@
        returnCount--;
      }
+     else
+       printf("ERROR: Form %s : trying to retreive non bolean value",this->currentFile.c_str());
    }
    return returnValue;
@@ -313,4 +315,33 @@
  }
 
+ bool Script::registerStandartClasses()
+ {
+   bool success = false;
+   
+   //success = this->registerClass(std::string("Vector"));
+   
+   return success;
+ }
+ 
+ 
+ bool Script::registerClass( const std::string& className)
+ {
+   BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS);
+   //printf("The script class for %s is at %p \n",className.c_str(),scriptClass);
+   WorldObject tmpObj;
+   if (scriptClass != NULL)
+   {
+     tmpObj.type = className;
+     if( !classIsRegistered(className) )
+     {
+       static_cast<ScriptClass*>(scriptClass)->registerClass(this);
+       tmpObj.name = "";
+       registeredObjects.push_back(tmpObj);
+       return true;
+     }
+   }
+   return false;
+ 
+ }
 
  bool Script::classIsRegistered(const std::string& type)
Index: /branches/script_engine/src/lib/script_engine/script.h
===================================================================
--- /branches/script_engine/src/lib/script_engine/script.h	(revision 8484)
+++ /branches/script_engine/src/lib/script_engine/script.h	(revision 8485)
@@ -58,4 +58,6 @@
 
     int  reportError(int error);                      //!< Get errormessage from the lua stack and print it.
+    bool registerStandartClasses();                   //!< Register all the classes that the script might need
+    bool registerClass(const std::string& className); //!< Register a class but dont add any instances 
     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
Index: /branches/script_engine/src/lib/util/executor/executor_lua.h
===================================================================
--- /branches/script_engine/src/lib/util/executor/executor_lua.h	(revision 8484)
+++ /branches/script_engine/src/lib/util/executor/executor_lua.h	(revision 8485)
@@ -183,4 +183,54 @@
 
 
+///////////
+//// 3 ////
+///////////
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename type0, typename type1, typename type2> class ExecutorLua3 : public Executor
+{
+  public:
+    /**
+   * @brief Constructor of a ExecutorXML
+   * @param function a Function to call
+     */
+    ExecutorLua3(void(T::*function)(type0, type1, type2))
+  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>())
+    {
+      this->functionPointer = function;
+      this->functorType = Executor_Objective | Executor_NoLoadString;
+    }
+
+    /**
+     * @brief executes the Command on BaseObject
+     * @param object the BaseObject to execute this Executor on
+     * @param loadString ignored in this case
+     */
+    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+    {
+      PRINTF(1)("no usefull executor\n");
+    }
+
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 0;
+
+      (dynamic_cast<T*>(object)->*(functionPointer))(
+          fromLua<type0>(state, 1),
+          fromLua<type1>(state, 2),
+          fromLua<type2>(state, 3) );
+    }
+
+    /**
+     * @returns a _new_ Copy of this Executor
+     */
+    virtual Executor* clone () const
+    {
+      return new ExecutorLua3<T, type0, type1, type2>(this->functionPointer);
+    }
+  private:
+    void          (T::*functionPointer)(type0, type1, type2);
+};
+
 
 
@@ -210,5 +260,5 @@
       this->functorType = Executor_Objective | Executor_NoLoadString;
     }
-
+    
     /**
      * @brief executes the Command on BaseObject
Index: /branches/script_engine/src/world_entities/script_trigger.cc
===================================================================
--- /branches/script_engine/src/world_entities/script_trigger.cc	(revision 8484)
+++ /branches/script_engine/src/world_entities/script_trigger.cc	(revision 8485)
@@ -20,7 +20,11 @@
   this->toList(OM_COMMON);
 
+  returnCount = 1;
+  actionFinished = false;
   doDebugDraw = false;
+  invert = false;
   scriptCalled = false;
   scriptIsOk = false;
+  triggerLasts = false;
   loadParams(root);
 
@@ -71,4 +75,10 @@
         .describe("True if the script shoul only be called once")
         .defaultValues("");
+    LoadParam(root, "invert", this, ScriptTrigger, setInvert)
+        .describe("")
+        .defaultValues("");
+    LoadParam(root, "triggerlasts", this, ScriptTrigger, setTriggerLasts)
+        .describe("")
+        .defaultValues("");
     LoadParam(root, "debugdraw", this, ScriptTrigger, setDebugDraw)
         .describe("True if the script should only be called once")
@@ -118,16 +128,39 @@
 void ScriptTrigger::tick(float timestep)
 {
-
-  if( this->distance(target) < radius)
+  if(actionFinished) return;
+
+  if(triggerLasts && scriptCalled)
+  {
+    executeAction(timestep);
+    return;
+  }
+  
+  
+  if( !invert && this->distance(target) < radius)
  {
   if(!callOnce)
    {
-    executeAction();
+    executeAction(timestep);
+    scriptCalled = true;
    }
   else if(callOnce && !scriptCalled)
   {
-   executeAction();
+   executeAction(timestep);
    scriptCalled = true;
   }
+  
+ }
+ else if( invert && this->distance(target) > radius)
+ {
+   if(!callOnce)
+   {
+     executeAction(timestep);
+   }
+   else if(callOnce && !scriptCalled)
+   {
+     executeAction(timestep);
+     scriptCalled = true;
+   }
+   
  }
  //else
@@ -137,14 +170,19 @@
 
 
-void ScriptTrigger::executeAction()
+void ScriptTrigger::executeAction(float timestep)
 {
      if(scriptIsOk)
      {
-       testScriptingFramework();
-     if(!(script->selectFunction(this->functionName,0)) )
+       //testScriptingFramework();
+     if(!(script->selectFunction(this->functionName,returnCount)) )
        printf("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
+     
+     script->pushParam( timestep, this->functionName);
+     
      if( !(script->executeFunction()) )
        printf("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
      }
+     
+     actionFinished = script->getReturnedBool();
 }
 
Index: /branches/script_engine/src/world_entities/script_trigger.h
===================================================================
--- /branches/script_engine/src/world_entities/script_trigger.h	(revision 8484)
+++ /branches/script_engine/src/world_entities/script_trigger.h	(revision 8485)
@@ -22,5 +22,5 @@
     /// DO WORK
     virtual void tick(float timestep);
-    virtual void executeAction();
+    virtual void executeAction(float timestep);
     void testScriptingFramework();
 
@@ -30,8 +30,10 @@
     void setTriggerParent(const std::string& name);
     void setCallOnce(const bool call) { this->callOnce = call; }
+    void setTriggerLasts(const bool lasts) { this->triggerLasts = lasts; }
+    void setInvert(const bool inv) { this->invert = invert; }
     void setRadius(const float radius) { if(radius>0) this->radius = radius; }
     void setDelay(const float time){if(delay>0) this->delay = delay; }
     void setScript(const std::string& file);
-    void setFunction(const std::string& function){ this->functionName = function; }
+    void setFunction(const std::string& function){ this->functionName = function;}
     void setDebugDraw(const bool draw) { this->doDebugDraw = draw; }
 
@@ -43,4 +45,6 @@
     WorldEntity* target;
     bool         callOnce;
+    bool         triggerLasts;
+    bool         invert;
     float        radius;
     float        delay;
@@ -52,4 +56,6 @@
     bool         scriptCalled;
     bool         scriptIsOk;
+    bool         actionFinished;
+    int          returnCount;
 
 };
Index: /branches/script_engine/src/world_entities/space_ships/helicopter.h
===================================================================
--- /branches/script_engine/src/world_entities/space_ships/helicopter.h	(revision 8484)
+++ /branches/script_engine/src/world_entities/space_ships/helicopter.h	(revision 8485)
@@ -86,4 +86,9 @@
                         addMethod("moveUp", ExecutorLua1<Helicopter,bool>(&Helicopter::moveUp))
                         ->addMethod("moveDown", ExecutorLua1<Helicopter,bool>(&Helicopter::moveDown))
+                        ->addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))
+                        ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX))
+                        ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY))
+                        ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ))
+                            
                         );
 
