Index: /code/branches/OrxoKart_HS18/data/levels/OrxoKart1.oxw
===================================================================
--- /code/branches/OrxoKart_HS18/data/levels/OrxoKart1.oxw	(revision 12107)
+++ /code/branches/OrxoKart_HS18/data/levels/OrxoKart1.oxw	(revision 12108)
@@ -19,5 +19,5 @@
 <?lua
 --number of tiles
-N = 11
+N = 25
 --scaling factor
 S = 80
@@ -65,5 +65,5 @@
     <SpawnPoint
       team=0
-      position="<?lua print(S*0)?>,40,<?lua print(8*S)?>"
+      position="<?lua print(S*0)?>,40,<?lua print(19*S)?>"
       lookat="0,40,0"
       spawnclass=OrxoKartKart
Index: /code/branches/OrxoKart_HS18/src/modules/orxokart/CMakeLists.txt
===================================================================
--- /code/branches/OrxoKart_HS18/src/modules/orxokart/CMakeLists.txt	(revision 12107)
+++ /code/branches/OrxoKart_HS18/src/modules/orxokart/CMakeLists.txt	(revision 12108)
@@ -4,4 +4,5 @@
   OrxoKartTile.cc
   OrxoKartOrigin.cc
+  OrxoKartFlag.cc
   TimeHUD.cc
 )
Index: /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.cc
===================================================================
--- /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.cc	(revision 12107)
+++ /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.cc	(revision 12108)
@@ -33,5 +33,6 @@
 
 #include "OrxoKart.h"
-
+#include "OrxoKartFlag.h"
+#include "OrxoKartKart.h"
 #include "OrxoKartOrigin.h"
 #include "OrxoKartTile.h"
@@ -47,5 +48,5 @@
 
         this->origin_ = nullptr;
-        // this->numberOfFlags_ = 1;
+        this->numberOfFlags_ = 1;
         this->firstTick_ = true;
 
@@ -57,4 +58,5 @@
         SUPER(OrxoKart, tick, dt);
 
+
         if(this->firstTick_ && this->origin_)
         {
@@ -64,15 +66,45 @@
             int s = this->origin_->getCellSize();
 
-            int levelcodeArray[] =  {1,1,1,1,1,1,1,1,0,0,0
-                                    ,1,0,0,0,0,0,0,1,1,1,0
-                                    ,1,0,1,1,1,1,0,0,0,1,1
-                                    ,1,1,1,0,0,1,1,0,0,0,1
-                                    ,0,0,0,0,0,0,1,0,1,1,1
-                                    ,1,1,1,1,1,1,1,0,1,0,0
-                                    ,1,0,0,0,0,0,0,0,1,0,0
-                                    ,1,0,0,0,0,0,0,0,1,0,0
-                                    ,1,1,1,1,1,0,0,0,1,1,1
-                                    ,0,0,0,0,1,0,0,0,0,0,1
-                                    ,0,0,0,0,1,1,1,2,1,1,1};
+            int map_1[] =   {1,1,1,1,1,1,1,1,0,0,0
+                            ,1,0,0,0,0,0,0,1,1,1,0
+                            ,1,0,1,1,1,1,0,0,0,1,1
+                            ,1,1,1,0,0,1,1,0,0,0,1
+                            ,0,0,0,0,0,0,1,0,1,1,1
+                            ,1,1,1,1,1,1,1,0,1,0,0
+                            ,1,0,0,0,0,0,0,0,1,0,0
+                            ,1,0,0,0,0,0,0,0,1,0,0
+                            ,1,1,1,1,1,0,0,0,1,1,1
+                            ,0,0,0,0,1,0,0,0,0,0,1
+                            ,0,0,0,0,1,1,1,2,1,1,1};
+
+            int map_2[] =  {1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,
+                            1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
+                            1,0,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
+                            1,0,1,0,0,0,0,0,0,0,1,0,1,0,1,1,1,1,1,1,1,1,1,0,0,
+                            1,0,1,0,1,1,1,1,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,0,
+                            1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,1,1,1,1,0,1,0,0,
+                            1,0,1,0,1,1,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,0,
+                            1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,0,
+                            1,0,1,1,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,0,
+                            1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,0,0,
+                            1,1,1,1,1,1,1,1,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,
+                            0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,
+                            0,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,
+                            0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,0,0,1,
+                            0,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,1,
+                            0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,1,
+                            0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,
+                            0,1,0,1,1,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,
+                            0,1,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,
+                            0,1,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,
+                            0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
+                            0,1,0,1,0,1,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,
+                            0,1,1,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,
+                            0,0,0,0,0,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,0,1,
+                            0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,1,1,1,0,1,1,1};
+
+
+
+            int *levelcodeArray =  map_2;
 
 
@@ -85,16 +117,33 @@
             }
 
+            //bottom flag
+            
+                OrxoKartFlag* flag = new OrxoKartFlag(origin_->getContext());
+                flag->init(n, s);
+                flag_ = flag;
+            
+
+
             
 
         }//firsttick end
-            /*
-        // Check if ship collided with one of the flags
-        for ( unsigned int i = 0; i < flags_.size(); i++ ){
-            if(flags_[i]->getCollided()){
-                flags_[i]->destroyLater();
-                flags_.erase (flags_.begin()+i);
-            }
+
+        
+            
+        // Check if ship collided with the flag
+        if(flag_->getCollided()){
+            OrxoKartKart* player = flag_->getObjectofCollision();
+            orxout() << "Orientation= " << player->getOrientation() << endl;
+            player->setPosition(Vector3(80*0, 40, 80*18));
+            player->setOrientation(Quaternion(1, 0, 0, 0));   // 0, 0, 0
+            player->setVelocity(Vector3(0,0,0));
+            player->setAcceleration(Vector3(0,0,0));
+            flag_->setCollided(false); 
+
+
+            // flag_->destroyLater();
+           // flags_.erase (flags_.begin()+i);
+            numberOfFlags_ = 0;
         }
-        numberOfFlags_ = flags_.size(); */
         
     }
Index: /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.h
===================================================================
--- /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.h	(revision 12107)
+++ /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.h	(revision 12108)
@@ -55,11 +55,12 @@
                 { this->origin_ = origin; }
 
-            /*inline int getNumberOfFlags() const
-                { return this->numberOfFlags_; }*/
+            inline int getNumberOfFlags() const
+                { return this->numberOfFlags_; }
 
         private:
             WeakPtr<OrxoKartOrigin> origin_;
+            OrxoKartFlag* flag_;
             //std::vector<OrxoKartFlag*> flags_;
-            //int numberOfFlags_;
+            int numberOfFlags_;
             bool firstTick_;
     };
Index: /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartFlag.cc
===================================================================
--- /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartFlag.cc	(revision 12108)
+++ /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartFlag.cc	(revision 12108)
@@ -0,0 +1,115 @@
+/*
+ *   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:
+ *      Manuel Meier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file OrxoKartFlag.cc
+    @brief The Flags that are being set in the OrxoKart Minigame They support two coordinates from 0-9 each
+*/
+
+#include "OrxoKartFlag.h"
+#include "OrxoKartKart.h"
+
+#include "core/CoreIncludes.h"
+
+#include "graphics/Model.h"
+#include "objects/collisionshapes/BoxCollisionShape.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(OrxoKartFlag);
+
+    OrxoKartFlag::OrxoKartFlag(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(OrxoKartFlag);
+
+        this->model_ = nullptr;
+        this->cs_ = nullptr;
+        this->collided_ = false;
+        this->kartCollider = nullptr;
+
+        this->enableCollisionCallback();
+        this->setCollisionResponse(true);
+        this->setCollisionType(CollisionType::Static);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    OrxoKartFlag::~OrxoKartFlag()
+    {
+        if (this->isInitialized())
+        {
+            if (this->model_)
+                this->model_->destroy();
+            if (this->cs_)
+                this->cs_->destroy();
+        }
+    }
+
+    /**
+    @brief
+        Initializes the flag.
+    @param xCoordinate
+        X-Coordinate of the flage, 0-9, origin is bottom left
+    @param yCoordinate
+        Y-Coordinate of the flage, 0-9, origin is bottom left
+    @param cellSize
+        The size of the cells
+    */
+    void OrxoKartFlag::init(int n, int s)
+    {
+        /*model_ = new Model(this->getContext());
+        model_->setMeshSource("OrxoKartStreckenabschnitt.mesh");
+        model_->setScale3D(Vector3(s*n*2, 1, s*n*2));
+        model_->setPosition(Vector3(s*n*0.5f,-60.0f, s*n*0.5f));
+
+        this->attach(model_);*/
+
+        cs_ = new BoxCollisionShape(this->getContext());
+        cs_->setHalfExtents(Vector3(s*n, 1, s*n));
+        cs_->setPosition(Vector3(s*n*0.5f,-60.0f, s*n*0.5f));
+
+        this->attachCollisionShape(cs_);
+    }
+
+    /**
+    @brief
+        Checks if the OrxoKartship collided with the flag
+    */
+    bool OrxoKartFlag::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
+    {
+        if(otherObject->isA(Class(OrxoKartKart))) {
+            collided_ = true;
+            kartCollider = (OrxoKartKart*) otherObject;
+        }
+
+        return false;
+    }
+}
Index: /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartFlag.h
===================================================================
--- /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartFlag.h	(revision 12108)
+++ /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartFlag.h	(revision 12108)
@@ -0,0 +1,75 @@
+/*
+ *   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:
+ *      Manuel Meier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file OrxoKartFlag.h
+    @brief See .cc File
+    @ingroup OrxoKart
+*/
+
+#ifndef _OrxoKartFlag_H__
+#define _OrxoKartFlag_H__
+
+#include "OrxoKartPrereqs.h"
+#include "objects/ObjectsPrereqs.h"
+#include "OrxoKartKart.h"
+
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    class _OrxoKartExport OrxoKartFlag : public StaticEntity
+    {
+        public:
+            OrxoKartFlag(Context* context);
+            virtual ~OrxoKartFlag();
+
+            void init(int n, int s);
+
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+
+            inline bool getCollided() const
+                { return this->collided_; }
+
+            inline OrxoKartKart* getObjectofCollision() const
+                { return this->kartCollider; }   
+
+            inline void setCollided(bool setValue)
+                { this->collided_ = setValue; }
+
+
+        private:
+            Model* model_;
+            BoxCollisionShape* cs_;
+            bool collided_;
+            OrxoKartKart* kartCollider;
+
+    };
+}
+
+#endif /* _OrxoKartFlag_H__ */
Index: /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartPrereqs.h
===================================================================
--- /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartPrereqs.h	(revision 12107)
+++ /code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartPrereqs.h	(revision 12108)
@@ -69,4 +69,5 @@
 {
     class OrxoKart;
+    class OrxoKartFlag;
     class OrxoKartOrigin;
     class OrxoKartKart;
Index: /code/branches/OrxoKart_HS18/src/modules/orxokart/TimeHUD.cc
===================================================================
--- /code/branches/OrxoKart_HS18/src/modules/orxokart/TimeHUD.cc	(revision 12107)
+++ /code/branches/OrxoKart_HS18/src/modules/orxokart/TimeHUD.cc	(revision 12108)
@@ -82,6 +82,6 @@
         {
             this->setCaption(getTimeString(this->time_));
-            //if (this->orxokartGame_->getNumberOfFlags() == 0)
-              //  setRunning(false);
+            if (this->orxokartGame_->getNumberOfFlags() == 0)
+                setRunning(false);
         }
         
