Index: trunk/src/world_entities/npcs/gate.cc
===================================================================
--- trunk/src/world_entities/npcs/gate.cc	(revision 9235)
+++ trunk/src/world_entities/npcs/gate.cc	(revision 9298)
@@ -13,5 +13,5 @@
    ### File Specific
    main-programmer: Patrick Boenzli
-   co-programmer:
+   co-programmer: Silvan Nellen
 */
 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
@@ -41,5 +41,5 @@
                             addMethod("hide", ExecutorLua0<WorldEntity>(&WorldEntity::hide))
                             ->addMethod("unhide", ExecutorLua0<WorldEntity>(&WorldEntity::unhide))
-                           // ->addMethod("destroy", ExecutorLua0<Gate>(&Gate::destroy()))    
+                            ->addMethod("destroy", ExecutorLua0<Gate>(&Gate::destroy))    
                             ->addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))
                             ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX))
@@ -66,4 +66,5 @@
   this->scale = 1.0f;
   this->actionRadius = 1.0;
+  this->destroyed = false;
 
   if( root != NULL)
@@ -151,5 +152,5 @@
 void Gate::open()
 {
-  if( this->bLocked)
+  if( this->bLocked || this->destroyed)
     return;
 
@@ -164,4 +165,8 @@
 void Gate::close()
 {
+  
+  if( this->destroyed)
+    return;
+  
   this->setAnimation(GATE_CLOSE, MD2_ANIM_ONCE);
   this->bOpen = false;
@@ -171,7 +176,13 @@
 void Gate::destroy()
 {
+  if( this->destroyed)
+    return;
+  
   this->setAnimation(GATE_DIE, MD2_ANIM_ONCE);
 
-  Explosion::explode(this, Vector(10,10,10));
+  Explosion::explode(this, Vector(this->getScaling()/160,this->getScaling()/160,this->getScaling()/160));
+  
+  
+  this->destroyed = true;
 }
 
Index: trunk/src/world_entities/npcs/gate.h
===================================================================
--- trunk/src/world_entities/npcs/gate.h	(revision 9235)
+++ trunk/src/world_entities/npcs/gate.h	(revision 9298)
@@ -50,4 +50,5 @@
 
   private:
+    bool           destroyed;         //!< true if the door is destroyed
     bool           bOpen;             //!< true if the door is open
     bool           bLocked;           //!< true if this door is locked
Index: trunk/src/world_entities/projectiles/guided_missile.cc
===================================================================
--- trunk/src/world_entities/projectiles/guided_missile.cc	(revision 9235)
+++ trunk/src/world_entities/projectiles/guided_missile.cc	(revision 9298)
@@ -43,5 +43,5 @@
   this->lifeSpan = 4.0;
   this->agility = 3.5;
-  this->maxVelocity = 75;
+  this->maxVelocity = 100;
 
   this->emitter = new DotEmitter(100, 5, M_2_PI);
Index: trunk/src/world_entities/script_trigger.cc
===================================================================
--- trunk/src/world_entities/script_trigger.cc	(revision 9235)
+++ trunk/src/world_entities/script_trigger.cc	(revision 9298)
@@ -32,5 +32,6 @@
              ->addMethod("setTarget", ExecutorLua1<ScriptTrigger, const std::string&>(&ScriptTrigger::setTarget))
              ->addMethod("setTriggerParent", ExecutorLua1<ScriptTrigger, const std::string&>(&ScriptTrigger::setTriggerParent))
-             ->addMethod("setTriggerLasts", ExecutorLua1<ScriptTrigger, bool>(&ScriptTrigger::setTriggerLasts))
+             ->addMethod("setTriggerRemains", ExecutorLua1<ScriptTrigger, bool>(&ScriptTrigger::setTriggerRemains))
+             ->addMethod("setActiveOnCreation", ExecutorLua1<ScriptTrigger, bool>(&ScriptTrigger::setActiveOnCreation))
              ->addMethod("setInvert", ExecutorLua1<ScriptTrigger, bool>(&ScriptTrigger::setInvert))
              ->addMethod("setRadius", ExecutorLua1<ScriptTrigger, float>(&ScriptTrigger::setRadius))
@@ -48,5 +49,5 @@
  */
 ScriptTrigger::ScriptTrigger(const TiXmlElement* root)
-{
+{ PRINT(1)("testerror\n");
   this->setClassID(CL_SCRIPT_TRIGGER, "ScriptTrigger");
   this->toList(OM_COMMON);
@@ -59,6 +60,7 @@
   scriptCalled = false;
   scriptIsOk = false;
-  triggerLasts = true;
+  triggerRemains = true;
   addToScript = false;
+  this->activeOnCreation = false;
   
   if(root != NULL)
@@ -119,5 +121,5 @@
       .describe("")
       .defaultValues(false);
-  LoadParam(root, "triggerlasts", this, ScriptTrigger, setTriggerLasts)
+  LoadParam(root, "triggerRemains", this, ScriptTrigger, setTriggerRemains)
       .describe("")
       .defaultValues(true);
@@ -172,5 +174,11 @@
   if(scriptFinished) return;
 
-  if(triggerLasts && scriptCalled)
+  if(activeOnCreation)
+   {
+     executeAction(timestep);
+     return;
+   }
+   
+  if(triggerRemains && scriptCalled)
   {
     executeAction(timestep);
@@ -182,4 +190,5 @@
     executeAction(timestep);
     scriptCalled = true;
+    return;
   
   }
@@ -188,4 +197,5 @@
     executeAction(timestep); 
     scriptCalled = true;
+    return;
   }
  //else
@@ -202,10 +212,10 @@
        //testScriptingFramework();
     if(!(script->selectFunction(this->functionName,returnCount)) )
-      printf("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
+      PRINT(1)("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());
+      PRINT(1)("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
      
     scriptFinished = script->getReturnedBool();
Index: trunk/src/world_entities/script_trigger.h
===================================================================
--- trunk/src/world_entities/script_trigger.h	(revision 9235)
+++ trunk/src/world_entities/script_trigger.h	(revision 9298)
@@ -35,5 +35,6 @@
     void setTarget(WorldEntity* target) { if(target!=NULL) this->target=target; }
     void setTriggerParent(const std::string& name);
-    void setTriggerLasts(const bool lasts) { this->triggerLasts = lasts; }
+    void setTriggerRemains(const bool lasts) { this->triggerRemains = lasts; }
+    void setActiveOnCreation(const bool avtive) { this->activeOnCreation = avtive; }
     void setInvert(const bool inv) { this->invert = invert; }
     void setDelay(float delay) { this->delay = delay; };
@@ -50,5 +51,6 @@
 
     WorldEntity* target;
-    bool         triggerLasts;
+    bool         triggerRemains;
+    bool         activeOnCreation;
     bool         invert;
     float        radius;
Index: trunk/src/world_entities/space_ships/spacecraft_2d.cc
===================================================================
--- trunk/src/world_entities/space_ships/spacecraft_2d.cc	(revision 9235)
+++ trunk/src/world_entities/space_ships/spacecraft_2d.cc	(revision 9298)
@@ -498,5 +498,5 @@
     this->bForward = event.bPressed; //this->shiftCoor(0,.1,0);
   else if( event.type == KeyMapper::PEV_BACKWARD)
-    this->bBackward = event.bPressed; //this->shiftCoor(0,-.1,0);
+  {this->bBackward = event.bPressed; printf(" %f, %f, %f \n",getAbsCoorX(),getAbsCoorY(),getAbsCoorZ());} //this->shiftCoor(0,-.1,0);
   else if( event.type == EV_MOUSE_MOTION)
   {
Index: trunk/src/world_entities/weapons/aiming_system.cc
===================================================================
--- trunk/src/world_entities/weapons/aiming_system.cc	(revision 9235)
+++ trunk/src/world_entities/weapons/aiming_system.cc	(revision 9298)
@@ -115,5 +115,5 @@
   if( this->owner != killer)
   {
-    PRINTF(0)("real hit: %s\n", killer->getClassName());
+    //PRINTF(0)("real hit: %s\n", killer->getClassName());
     this->selectionList.push_back(killer);
   }
Index: trunk/src/world_entities/world_entity.h
===================================================================
--- trunk/src/world_entities/world_entity.h	(revision 9235)
+++ trunk/src/world_entities/world_entity.h	(revision 9298)
@@ -129,4 +129,6 @@
 
   /* --- Character Attribute Block --- */
+  /** @returns the scaling of the model */
+  float getScaling(){return this->scaling;}
   /** @returns the damage dealt by this world entity */
   float getDamage() const { return this->damage; }
