Index: code/branches/PresentationFS18/src/orxonox/worldentities/AutonomousDrone.cc
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/AutonomousDrone.cc	(revision 12016)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/AutonomousDrone.cc	(revision 12016)
@@ -0,0 +1,200 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oli Scheuss
+ *   Co-authors:
+ *      Damian 'Mozork' Frick
+ *
+ */
+
+#include "AutonomousDrone.h"
+
+#include "core/CoreIncludes.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+namespace orxonox
+{
+    //TODO: Put your code in here:
+    // Create the factory for the drone.
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes some default values.
+    @param creator
+        The creator of this object.
+    */
+
+    RegisterClass(AutonomousDrone);
+    
+    AutonomousDrone::AutonomousDrone(Context* context) : ControllableEntity(context)
+    {
+        //TODO: Put your code in here:
+        // Register the drone class to the core.
+
+	RegisterObject(AutonomousDrone);
+      
+        this->myController_ = NULL;
+
+        this->localLinearAcceleration_.setValue(0, 0, 0);
+        this->localAngularAcceleration_.setValue(0, 0, 0);
+        this->primaryThrust_  = 100;
+        this->auxiliaryThrust_ = 100;
+        this->rotationThrust_ = 10;
+	    this->mass_ = 100;
+	    this->linearDamping_ = 0.5;
+	    this->angularDamping_ = 0.3;
+
+        this->setCollisionType(CollisionType::Dynamic);
+
+        //this->myController_ = new AutonomousDroneController(this); // Creates a new controller and passes our this pointer to it as creator.
+    }
+
+    /**
+    @brief
+        Destructor. Destroys controller, if present.
+    */
+    AutonomousDrone::~AutonomousDrone()
+    {
+        // Deletes the controller if the object was initialized and the pointer to the controller is not NULL.
+        if( this->isInitialized() && this->myController_ != NULL )
+            delete this->myController_;
+    }
+
+    /**
+    @brief
+        Method for creating a AutonomousDrone through XML.
+    */
+    void AutonomousDrone::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        // This calls the XMLPort function of the parent class
+        SUPER(AutonomousDrone, XMLPort, xmlelement, mode);
+
+        XMLPortParam(AutonomousDrone, "primaryThrust", setPrimaryThrust, getPrimaryThrust, xmlelement, mode);
+        //TODO: Put your code in here:
+        // Make sure you add the variables auxiliaryThrust_ and rotationThrust_ to XMLPort.
+        // Variables can be added by the following command
+        // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunctionName, getFunctionName, xmlelement, mode);
+        // Also make sure that you also create the get- and set-functions in AutonomousDrone.h. As you can see, the get- and set-functions for the variable primaryThrust_ has already been specified there, so you can get your inspiration from there.
+        XMLPortParam(AutonomousDrone, "auxiliaryThrust", setAuxiliaryThrust, getAuxiliaryThrust, xmlelement, mode);
+    XMLPortParam(AutonomousDrone, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode);
+	XMLPortParam(AutonomousDrone, "mass", setMass, getMass, xmlelement, mode);
+	XMLPortParam(AutonomousDrone, "linearDamping", setLinearDamping, getLinearDamping, xmlelement, mode);
+	XMLPortParam(AutonomousDrone, "angularDamping", setAngularDamping, getAngularDamping, xmlelement, mode);
+
+   
+	
+	
+
+    }
+
+    /**
+    @brief
+        Defines which actions the AutonomousDrone has to take in each tick.
+    @param dt
+        The length of the tick.
+    */
+    void AutonomousDrone::tick(float dt)
+    {
+        SUPER(AutonomousDrone, tick, dt);
+
+        this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() * getMass() * this->auxiliaryThrust_);
+        this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() * getMass() * this->auxiliaryThrust_);
+        if (this->localLinearAcceleration_.z() > 0)
+            this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->auxiliaryThrust_);
+        else
+            this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->primaryThrust_);
+        this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_);
+        this->localLinearAcceleration_.setValue(0, 0, 0);
+
+        this->localAngularAcceleration_ *= this->getLocalInertia() * this->rotationThrust_;
+        this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_);
+        this->localAngularAcceleration_.setValue(0, 0, 0);
+    }
+
+    /**
+    @brief
+        Moves the AutonomousDrone in the negative z-direction (Front/Back) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void AutonomousDrone::moveFrontBack(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() - value.x);
+    }
+
+    /**
+    @brief
+        Moves the AutonomousDrone in the x-direction (Right/Left) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void AutonomousDrone::moveRightLeft(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() + value.x);
+    }
+
+    /**
+    @brief
+        Moves the AutonomousDrone in the y-direction (Up/Down) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void AutonomousDrone::moveUpDown(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() + value.x);
+    }
+
+    /**
+    @brief
+        Rotates the AutonomousDrone around the y-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void AutonomousDrone::rotateYaw(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() - value.x);
+    }
+
+    /**
+    @brief
+        Rotates the AutonomousDrone around the x-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void AutonomousDrone::rotatePitch(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x);
+    }
+
+    /**
+    @brief
+        Rotates the AutonomousDrone around the z-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void AutonomousDrone::rotateRoll(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x);
+    }
+
+
+}
Index: code/branches/PresentationFS18/src/orxonox/worldentities/AutonomousDrone.h
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/AutonomousDrone.h	(revision 12016)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/AutonomousDrone.h	(revision 12016)
@@ -0,0 +1,212 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oli Scheuss
+ *   Co-authors:
+ *      Damian 'Mozork' Frick
+ *
+ */
+
+#ifndef _AutonomousDrone_H__
+#define _AutonomousDrone_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "core/XMLPort.h"
+#include "controllers/AutonomousDroneController.h"
+
+#include "ControllableEntity.h"
+
+namespace orxonox {
+
+    /**
+    @brief
+        Drone, that is made to move upon a specified pattern.
+        This class was constructed for the PPS tutorial.
+    @author
+        Oli Scheuss
+    */
+    class _OrxonoxExport AutonomousDrone : public ControllableEntity
+    {
+        public:
+            AutonomousDrone(Context* context);
+            virtual ~AutonomousDrone();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating an AutonomousDrone through XML.
+            virtual void tick(float dt); //!< Defines which actions the AutonomousDrone has to take in each tick.
+
+            virtual void moveFrontBack(const Vector2& value);
+            virtual void moveRightLeft(const Vector2& value);
+            virtual void moveUpDown(const Vector2& value);
+
+            virtual void rotateYaw(const Vector2& value);
+            virtual void rotatePitch(const Vector2& value);
+            virtual void rotateRoll(const Vector2& value);
+
+            /**
+            @brief Moves the Drone in the Front/Back-direction by the specifed amount.
+            @param value  The amount by which the drone is to be moved.
+            */
+
+
+            inline void moveFrontBack(float value)
+            { this->moveFrontBack(Vector2(value, 0)); }
+            /**
+            @brief Moves the Drone in the Right/Left-direction by the specifed amount.
+            @param value  The amount by which the drone is to be moved.
+            */
+            inline void moveRightLeft(float value)
+            { this->moveRightLeft(Vector2(value, 0)); }
+            /**
+            @brief Moves the Drone in the Up/Down-direction by the specifed amount.
+            @param value  The amount by which the drone is to be moved.
+            */
+            inline void moveUpDown(float value)
+            { this->moveUpDown(Vector2(value, 0)); }
+
+            /**
+            @brief Rotates the Drone around the y-axis by the specifed amount.
+            @param value  The amount by which the drone is to be rotated.
+            */
+            inline void rotateYaw(float value)
+            { this->rotateYaw(Vector2(value, 0)); }
+            /**
+            @brief Rotates the Drone around the x-axis by the specifed amount.
+            @param value  The amount by which the drone is to be rotated.
+            */
+            inline void rotatePitch(float value)
+            { this->rotatePitch(Vector2(value, 0)); }
+            /**
+            @brief Rotates the Drone around the z-axis by the specifed amount.
+            @param value  The amount by which the drone is to be rotated.
+            */
+            inline void rotateRoll(float value)
+            { this->rotateRoll(Vector2(value, 0)); }
+
+            /**
+            @brief Sets the primary thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setPrimaryThrust( float thrust )
+                { this->primaryThrust_ = thrust; }
+            //TODO: Place your set-functions here.
+            // Hint: auxiliary thrust, rotation thrust.
+
+
+	     /**
+            @brief Sets the auxiliary thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setAuxiliaryThrust( float thrust )
+                { this->auxiliaryThrust_ = thrust; }
+
+	     /**
+            @brief Sets the rotation thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setRotationThrust( float thrust )
+                { this->rotationThrust_ = thrust; }
+
+	     /**
+            @brief Sets the rotation thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setMass( float mass )
+                { this->mass_ = mass; }
+
+	     /**
+            @brief Sets the rotation thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setLinearDamping( float damping )
+                { this->linearDamping_ = damping; }
+
+	     /**
+            @brief Sets the rotation thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setAngularDamping( float damping )
+                { this->angularDamping_ = damping; }
+            
+	    
+	    
+            /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getPrimaryThrust()
+                { return this->primaryThrust_; }
+            //TODO: Place your get-functions here.
+
+	    /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getAuxiliaryThrust()
+                { return this->auxiliaryThrust_; }
+
+	     /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getRotationThrust()
+                { return this->rotationThrust_; }
+
+	     /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getMass()
+                { return this->mass_; }
+
+	     /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getLinearDamping()
+                { return this->linearDamping_; }
+
+	     /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getAngularDamping()
+                { return this->angularDamping_; }
+
+            
+
+        private:
+            AutonomousDroneController *myController_; //!< The controller of the AutonomousDrone.
+
+            btVector3 localLinearAcceleration_; //!< The linear acceleration that is used to move the AutonomousDrone the next tick.
+            btVector3 localAngularAcceleration_; //!< The linear angular acceleration that is used to move the AutonomousDrone the next tick.
+            float primaryThrust_; //!< The amount of primary thrust. This is just used, when moving forward.
+            float auxiliaryThrust_; //!< The amount of auxiliary thrust. Used for all other movements (except for rotations).
+            float rotationThrust_; //!< The amount of rotation thrust. Used for rotations only.s
+	    float mass_;
+	    float linearDamping_;
+	    float angularDamping_;
+    };
+
+}
+
+#endif // _AutonomousDrone_H__
Index: code/branches/PresentationFS18/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/CMakeLists.txt	(revision 12015)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/CMakeLists.txt	(revision 12016)
@@ -15,4 +15,5 @@
   NameableStaticEntity.cc
   Arrow.cc
+  AutonomousDrone.cc
 )
 
Index: code/branches/PresentationFS18/src/orxonox/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/ControllableEntity.cc	(revision 12015)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/ControllableEntity.cc	(revision 12016)
@@ -39,4 +39,5 @@
 
 #include "Scene.h"
+#include "Level.h"
 #include "infos/PlayerInfo.h"
 #include "controllers/NewHumanController.h"
@@ -67,5 +68,4 @@
         this->camera_ = nullptr;
         this->xmlcontroller_ = nullptr;
-        //this->controller_ = nullptr;
         this->reverseCamera_ = nullptr;
         this->bDestroyWhenPlayerLeft_ = false;
Index: code/branches/PresentationFS18/src/orxonox/worldentities/ControllableEntity.h
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/ControllableEntity.h	(revision 12015)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/ControllableEntity.h	(revision 12016)
@@ -175,4 +175,5 @@
             inline int getTeam() const
                 { return this->team_; }
+
 
         protected:
Index: code/branches/PresentationFS18/src/orxonox/worldentities/MobileEntity.cc
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/MobileEntity.cc	(revision 12015)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/MobileEntity.cc	(revision 12016)
@@ -36,4 +36,6 @@
 
 #include "Scene.h"
+#include "Level.h"
+#include "scriptablecontroller/scriptable_controller.h"
 
 namespace orxonox
@@ -72,4 +74,7 @@
                 this->setAngularVelocity(rotationAxis.normalisedCopy() * rotationRate.valueRadians());
         }
+
+        if(!this->id_.empty() && this->getLevel() != nullptr)
+            this->getLevel()->getScriptableController()->registerMobileEntity(this->id_, this);
     }
 
Index: code/branches/PresentationFS18/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/WorldEntity.cc	(revision 12015)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/WorldEntity.cc	(revision 12016)
@@ -44,5 +44,7 @@
 #include "core/XMLPort.h"
 #include "Scene.h"
+#include "Level.h"
 #include "collisionshapes/WorldEntityCollisionShape.h"
+#include "scriptablecontroller/scriptable_controller.h"
 
 namespace orxonox
@@ -79,4 +81,5 @@
         this->parentID_ = OBJECTID_UNKNOWN;
         this->bDeleteWithParent_ = true;
+        this->id_ = -1;
 
         this->node_->setPosition(Vector3::ZERO);
@@ -160,4 +163,5 @@
         XMLPortParamTemplate(WorldEntity, "scale3D",     setScale3D,     getScale3D,     xmlelement, mode, const Vector3&);
         XMLPortParam        (WorldEntity, "scale",       setScale,       getScale,       xmlelement, mode);
+        XMLPortParamLoadOnly(WorldEntity, "id",          setID,                xmlelement, mode);
         XMLPortParamLoadOnly(WorldEntity, "lookat",      lookAt_xmlport,       xmlelement, mode);
         XMLPortParamLoadOnly(WorldEntity, "direction",   setDirection_xmlport, xmlelement, mode);
@@ -181,4 +185,7 @@
         // Attached collision shapes
         XMLPortObject(WorldEntity, CollisionShape, "collisionShapes", attachCollisionShape, getAttachedCollisionShape, xmlelement, mode);
+
+        if(!this->id_.empty() && this->getLevel() != nullptr)
+            this->getLevel()->getScriptableController()->registerWorldEntity(this->id_, this);
     }
 
Index: code/branches/PresentationFS18/src/orxonox/worldentities/WorldEntity.h
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/WorldEntity.h	(revision 12015)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/WorldEntity.h	(revision 12016)
@@ -110,4 +110,10 @@
             virtual void changedActivity(void) override;
             virtual void changedVisibility(void) override;
+
+            inline std::string getID(void)
+                { return this->id_; }
+
+            inline void setID(std::string id)
+                { this->id_ = id; }
 
             virtual void setPosition(const Vector3& position) = 0;
@@ -442,4 +448,5 @@
 
             btRigidBody*  physicalBody_; //!< Bullet rigid body. Everything physical is applied to this instance.
+            std::string   id_;           //!< Used by the ScriptableController to identify objects
 
         private:
Index: code/branches/PresentationFS18/src/orxonox/worldentities/pawns/CMakeLists.txt
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/pawns/CMakeLists.txt	(revision 12015)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/pawns/CMakeLists.txt	(revision 12016)
@@ -4,4 +4,5 @@
   Pawn.cc
   SpaceShip.cc
+  ScriptableControllerDrone.cc
   ModularSpaceShip.cc
   TeamBaseMatchBase.cc
Index: code/branches/PresentationFS18/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/pawns/Pawn.cc	(revision 12015)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/pawns/Pawn.cc	(revision 12016)
@@ -50,4 +50,6 @@
 #include "sound/WorldSound.h"
 #include "core/object/ObjectListIterator.h"
+#include "Level.h"
+#include "scriptablecontroller/scriptable_controller.h"
 
 #include "controllers/FormationController.h"
@@ -160,4 +162,7 @@
 
         XMLPortParam ( RadarViewable, "radarname", setRadarName, getRadarName, xmlelement, mode );
+
+        if(!this->id_.empty() && this->getLevel() != nullptr)
+            this->getLevel()->getScriptableController()->registerPawn(this->id_, this);
     }
 
@@ -282,5 +287,5 @@
         {
             // Health-damage cannot be absorbed by shields.
-            // Shield-damage only reduces shield health. 
+            // Shield-damage only reduces shield health.
             // Normal damage can be (partially) absorbed by shields.
 
@@ -302,4 +307,5 @@
                 this->setHealth(this->health_ - (damage - shielddamage) - healthdamage);
             }
+            this->getLevel()->getScriptableController()->pawnHit(this, originator, this->health_, this->shieldHealth_);
 
             this->lastHitOriginator_ = originator;
@@ -402,4 +408,6 @@
             }
         }
+
+        this->getLevel()->getScriptableController()->pawnKilled(this);
     }
     void Pawn::goWithStyle()
@@ -625,5 +633,5 @@
         {
             // delete all debug models
-            for(Model* model : debugWeaponSlotModels_) 
+            for(Model* model : debugWeaponSlotModels_)
             {
                 model->destroy();
Index: code/branches/PresentationFS18/src/orxonox/worldentities/pawns/ScriptableControllerDrone.cc
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/pawns/ScriptableControllerDrone.cc	(revision 12016)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/pawns/ScriptableControllerDrone.cc	(revision 12016)
@@ -0,0 +1,208 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oli Scheuss
+ *   Co-authors:
+ *      Damian 'Mozork' Frick
+ *
+ */
+
+#include "ScriptableControllerDrone.h"
+
+#include "core/CoreIncludes.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+namespace orxonox
+{
+    //TODO: Put your code in here:
+    // Create the factory for the drone.
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes some default values.
+    @param creator
+        The creator of this object.
+    */
+
+    RegisterClass(ScriptableControllerDrone);
+    
+    ScriptableControllerDrone::ScriptableControllerDrone(Context* context) : Pawn(context)
+    {
+        //TODO: Put your code in here:
+        // Register the drone class to the core.
+
+	RegisterObject(ScriptableControllerDrone);
+      
+        //this->myController_ = NULL;
+
+        this->localLinearAcceleration_.setValue(0, 0, 0);
+        this->localAngularAcceleration_.setValue(0, 0, 0);
+        this->primaryThrust_  = 100;
+        this->auxiliaryThrust_ = 100;
+        this->rotationThrust_ = 10;
+	    this->mass_ = 100;
+	    this->linearDamping_ = 0.5;
+	    this->angularDamping_ = 0.3;
+
+        this->setRadarVisibility(false);
+        
+        this->setCollisionType(WorldEntity::CollisionType::Dynamic);
+
+        //this->setCollisionType(CollisionType::Dynamic);
+
+        //this->myController_ = new ScriptableControllerDroneController(this); // Creates a new controller and passes our this pointer to it as creator.
+    }
+
+    /**
+    @brief
+        Destructor. Destroys controller, if present.
+    */
+    ScriptableControllerDrone::~ScriptableControllerDrone()
+    {
+        // Deletes the controller if the object was initialized and the pointer to the controller is not NULL.
+        if( this->isInitialized()); //)&& this->myController_ != NULL )
+            //delete this->myController_;
+    }
+
+    /**
+    @brief
+        Method for creating a ScriptableControllerDrone through XML.
+    */
+    void ScriptableControllerDrone::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        // This calls the XMLPort function of the parent class
+        SUPER(ScriptableControllerDrone, XMLPort, xmlelement, mode);
+
+        XMLPortParam(ScriptableControllerDrone, "primaryThrust", setPrimaryThrust, getPrimaryThrust, xmlelement, mode);
+        //TODO: Put your code in here:
+        // Make sure you add the variables auxiliaryThrust_ and rotationThrust_ to XMLPort.
+        // Variables can be added by the following command
+        // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunctionName, getFunctionName, xmlelement, mode);
+        // Also make sure that you also create the get- and set-functions in ScriptableControllerDrone.h. As you can see, the get- and set-functions for the variable primaryThrust_ has already been specified there, so you can get your inspiration from there.
+        XMLPortParam(ScriptableControllerDrone, "auxiliaryThrust", setAuxiliaryThrust, getAuxiliaryThrust, xmlelement, mode);
+    XMLPortParam(ScriptableControllerDrone, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode);
+	XMLPortParam(ScriptableControllerDrone, "mass", setMass, getMass, xmlelement, mode);
+	XMLPortParam(ScriptableControllerDrone, "linearDamping", setLinearDamping, getLinearDamping, xmlelement, mode);
+	XMLPortParam(ScriptableControllerDrone, "angularDamping", setAngularDamping, getAngularDamping, xmlelement, mode);
+
+   
+	
+	
+
+    }
+
+    /**
+    @brief
+        Defines which actions the ScriptableControllerDrone has to take in each tick.
+    @param dt
+        The length of the tick.
+    */
+    void ScriptableControllerDrone::tick(float dt)
+    {
+        SUPER(ScriptableControllerDrone, tick, dt);
+
+
+        this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() * getMass() * this->auxiliaryThrust_);
+        this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() * getMass() * this->auxiliaryThrust_);
+
+
+        if (this->localLinearAcceleration_.z() > 0)
+            this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->auxiliaryThrust_);
+        else
+            this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->primaryThrust_);
+
+        this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_);
+        this->localLinearAcceleration_.setValue(0, 0, 0);
+
+        this->localAngularAcceleration_ *= this->getLocalInertia() * this->rotationThrust_;
+        this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_);
+        this->localAngularAcceleration_.setValue(0, 0, 0);
+    }
+
+    /**
+    @brief
+        Moves the ScriptableControllerDrone in the negative z-direction (Front/Back) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void ScriptableControllerDrone::moveFrontBack(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() - value.x);
+    }
+
+    /**
+    @brief
+        Moves the ScriptableControllerDrone in the x-direction (Right/Left) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void ScriptableControllerDrone::moveRightLeft(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() + value.x);
+    }
+
+    /**
+    @brief
+        Moves the ScriptableControllerDrone in the y-direction (Up/Down) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void ScriptableControllerDrone::moveUpDown(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() + value.x);
+    }
+
+    /**
+    @brief
+        Rotates the ScriptableControllerDrone around the y-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void ScriptableControllerDrone::rotateYaw(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() - value.x);
+    }
+
+    /**
+    @brief
+        Rotates the ScriptableControllerDrone around the x-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void ScriptableControllerDrone::rotatePitch(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x);
+    }
+
+    /**
+    @brief
+        Rotates the ScriptableControllerDrone around the z-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void ScriptableControllerDrone::rotateRoll(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x);
+    }
+
+
+}
Index: code/branches/PresentationFS18/src/orxonox/worldentities/pawns/ScriptableControllerDrone.h
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/pawns/ScriptableControllerDrone.h	(revision 12016)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/pawns/ScriptableControllerDrone.h	(revision 12016)
@@ -0,0 +1,212 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oli Scheuss
+ *   Co-authors:
+ *      Damian 'Mozork' Frick
+ *
+ */
+
+#ifndef _ScriptableControllerDrone_H__
+#define _ScriptableControllerDrone_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "core/XMLPort.h"
+//#include "controllers/AutonomousDroneController.h"
+
+#include "Pawn.h"
+
+namespace orxonox {
+
+    /**
+    @brief
+        Drone, that is made to move upon a specified pattern.
+        This class was constructed for the PPS tutorial.
+    @author
+        Oli Scheuss
+    */
+    class _OrxonoxExport ScriptableControllerDrone : public Pawn
+    {
+        public:
+            ScriptableControllerDrone(Context* context);
+            virtual ~ScriptableControllerDrone();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating an AutonomousDrone through XML.
+            virtual void tick(float dt); //!< Defines which actions the AutonomousDrone has to take in each tick.
+
+            virtual void moveFrontBack(const Vector2& value);
+            virtual void moveRightLeft(const Vector2& value);
+            virtual void moveUpDown(const Vector2& value);
+
+            virtual void rotateYaw(const Vector2& value);
+            virtual void rotatePitch(const Vector2& value);
+            virtual void rotateRoll(const Vector2& value);
+
+            /**
+            @brief Moves the Drone in the Front/Back-direction by the specifed amount.
+            @param value  The amount by which the drone is to be moved.
+            */
+
+
+            inline void moveFrontBack(float value)
+            { this->moveFrontBack(Vector2(value, 0)); }
+            /**
+            @brief Moves the Drone in the Right/Left-direction by the specifed amount.
+            @param value  The amount by which the drone is to be moved.
+            */
+            inline void moveRightLeft(float value)
+            { this->moveRightLeft(Vector2(value, 0)); }
+            /**
+            @brief Moves the Drone in the Up/Down-direction by the specifed amount.
+            @param value  The amount by which the drone is to be moved.
+            */
+            inline void moveUpDown(float value)
+            { this->moveUpDown(Vector2(value, 0)); }
+
+            /**
+            @brief Rotates the Drone around the y-axis by the specifed amount.
+            @param value  The amount by which the drone is to be rotated.
+            */
+            inline void rotateYaw(float value)
+            { this->rotateYaw(Vector2(value, 0)); }
+            /**
+            @brief Rotates the Drone around the x-axis by the specifed amount.
+            @param value  The amount by which the drone is to be rotated.
+            */
+            inline void rotatePitch(float value)
+            { this->rotatePitch(Vector2(value, 0)); }
+            /**
+            @brief Rotates the Drone around the z-axis by the specifed amount.
+            @param value  The amount by which the drone is to be rotated.
+            */
+            inline void rotateRoll(float value)
+            { this->rotateRoll(Vector2(value, 0)); }
+
+            /**
+            @brief Sets the primary thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setPrimaryThrust( float thrust )
+                { this->primaryThrust_ = thrust; }
+            //TODO: Place your set-functions here.
+            // Hint: auxiliary thrust, rotation thrust.
+
+
+	     /**
+            @brief Sets the auxiliary thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setAuxiliaryThrust( float thrust )
+                { this->auxiliaryThrust_ = thrust; }
+
+	     /**
+            @brief Sets the rotation thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setRotationThrust( float thrust )
+                { this->rotationThrust_ = thrust; }
+
+	     /**
+            @brief Sets the rotation thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setMass( float mass )
+                { this->mass_ = mass; }
+
+	     /**
+            @brief Sets the rotation thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setLinearDamping( float damping )
+                { this->linearDamping_ = damping; }
+
+	     /**
+            @brief Sets the rotation thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setAngularDamping( float damping )
+                { this->angularDamping_ = damping; }
+            
+	    
+	    
+            /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getPrimaryThrust()
+                { return this->primaryThrust_; }
+            //TODO: Place your get-functions here.
+
+	    /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getAuxiliaryThrust()
+                { return this->auxiliaryThrust_; }
+
+	     /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getRotationThrust()
+                { return this->rotationThrust_; }
+
+	     /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getMass()
+                { return this->mass_; }
+
+	     /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getLinearDamping()
+                { return this->linearDamping_; }
+
+	     /**
+            @brief Gets the primary thrust to the input amount.
+            @return The amount of thrust.
+            */
+            inline float getAngularDamping()
+                { return this->angularDamping_; }
+
+            
+
+        private:
+            //AutonomousDroneController *myController_; //!< The controller of the AutonomousDrone.
+
+            btVector3 localLinearAcceleration_; //!< The linear acceleration that is used to move the AutonomousDrone the next tick.
+            btVector3 localAngularAcceleration_; //!< The linear angular acceleration that is used to move the AutonomousDrone the next tick.
+            float primaryThrust_; //!< The amount of primary thrust. This is just used, when moving forward.
+            float auxiliaryThrust_; //!< The amount of auxiliary thrust. Used for all other movements (except for rotations).
+            float rotationThrust_; //!< The amount of rotation thrust. Used for rotations only.s
+	    float mass_;
+	    float linearDamping_;
+	    float angularDamping_;
+    };
+
+}
+
+#endif // _AutonomousDrone_H__
Index: code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 12015)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 12016)
@@ -163,5 +163,5 @@
             engine->run(dt);
 
-        if (this->hasLocalController())
+        if (this->hasLocalController() || true)
         {
             // If not in mouse look apply the angular movement to the ship.
Index: code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 12015)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 12016)
@@ -117,4 +117,11 @@
                 { this->steering_.y += (0.6)*value.x; }
 
+            inline void moveFrontBack(float value)
+                { this->moveFrontBack(Vector2(value, 0)); }
+            inline void moveRightLeft(float value)
+                { this->moveRightLeft(Vector2(value, 0)); }
+            inline void moveUpDown(float value)
+                { this->moveUpDown(Vector2(value, 0)); }    
+
             virtual void rotateYaw(const Vector2& value); // Rotate in yaw direction.
             virtual void rotatePitch(const Vector2& value); // Rotate in pitch direction.
