Index: code/branches/OrxoKart_HS18/data/levels/OrxoKart1.oxw
===================================================================
--- code/branches/OrxoKart_HS18/data/levels/OrxoKart1.oxw	(revision 12110)
+++ code/branches/OrxoKart_HS18/data/levels/OrxoKart1.oxw	(revision 12111)
@@ -19,5 +19,6 @@
 <?lua
 --number of tiles
-N = 25
+N = 11
+-- or 25
 --scaling factor
 S = 80
@@ -62,8 +63,9 @@
       specular="1.0, 0.9, 0.9, 1.0"
     />
-    
+    <!-- 19 -->
     <SpawnPoint
       team=0
-      position="<?lua print(S*0)?>,40,<?lua print(19*S)?>"
+      
+      position="<?lua print(S*0)?>,40,<?lua print(8*S)?>"
       lookat="0,40,0"
       spawnclass=OrxoKartKart
Index: code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.cc
===================================================================
--- code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.cc	(revision 12110)
+++ code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.cc	(revision 12111)
@@ -58,12 +58,11 @@
         SUPER(OrxoKart, tick, dt);
 
-
         if(this->firstTick_ && this->origin_)
         {
             this->firstTick_ = false;
+            this->wayPoints = std::vector<OrxoKartTile*>(3, nullptr);
 
             int n = this->origin_->getNumCells();
             int s = this->origin_->getCellSize();
-
             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
@@ -106,20 +105,30 @@
 
 
-            int *levelcodeArray =  map_2;
+            int *levelcodeArray =  map_1;
 
-
+            // int z = 0;
             //Generate floor according to levelcode
             for(int i=0; i<n; i++){
                 for(int j=0; j<n; j++){
-                    if (int type = levelcodeArray[i*n + j])
-                    (new OrxoKartTile(origin_->getContext()))->init((n-1-i)*s, j*s, s, type);
+                    if (int type = levelcodeArray[i*n + j]) {
+                        OrxoKartTile* tile = new OrxoKartTile(origin_->getContext());
+                        tile->init((n-1-i)*s, j*s, s, type);
+                        // tiles.push_back(tile);
+                        //++z;
+                        if ( i == 10 && j == 4 )
+                            wayPoints.at(0) = tile;
+
+                        if ( i == 0 && j == 0) 
+                            wayPoints.at(1) = tile;
+                        if ( i == 10 && j == 7)
+                            wayPoints.at(2) = tile;
+                    }
                 }   
             }
-
             //bottom flag
             
-                OrxoKartFlag* flag = new OrxoKartFlag(origin_->getContext());
-                flag->init(n, s);
-                flag_ = flag;
+            OrxoKartFlag* flag = new OrxoKartFlag(origin_->getContext());
+            flag->init(n, s);
+            flag_ = flag;
             
 
@@ -127,22 +136,45 @@
             
 
-        }//firsttick end
+        } //firsttick end
+        /*
+        for (std::vector<OrxoKartTile*>::iterator it = tiles.begin(); it != tiles.end(); ++it ) {
+            if ((*it)->getCollided())
+                tiles.erase(it);
+        }
+        if (tiles.empty())
+            numberOfFlags_ = 0;
+        */
+        if (wayPointCounter >= 3)
+            numberOfFlags_ = 0;
+        else if (wayPointCounter < 3 && wayPointCounter >= 0 && wayPoints.at(wayPointCounter) != nullptr) {
+            if (wayPoints.at(wayPointCounter)->getCollided()) {
+                for (int i = 0; i < 3; ++i) {
+                    wayPoints.at(i)->setCollided(false);
+                }
+                ++wayPointCounter;
+            }
+        }
+        else {
+            orxout() << " Should not happen, look in OrxoKart.cc";
+        }
 
-        
-            
+
+
+
+
         // 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->setPosition(Vector3(80*0, 20, 80*8));
             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); 
+            wayPointCounter = 0;
 
 
             // flag_->destroyLater();
            // flags_.erase (flags_.begin()+i);
-            numberOfFlags_ = 0;
+            //numberOfFlags_ = 0;
         }
         
Index: code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.h
===================================================================
--- code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.h	(revision 12110)
+++ code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKart.h	(revision 12111)
@@ -61,5 +61,8 @@
             WeakPtr<OrxoKartOrigin> origin_;
             OrxoKartFlag* flag_;
-            //std::vector<OrxoKartFlag*> flags_;
+            std::vector<OrxoKartTile*> tiles;
+            int numberOfWP;
+            std::vector<OrxoKartTile*> wayPoints;
+            int wayPointCounter = 0;
             int numberOfFlags_;
             bool firstTick_;
Index: code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartTile.cc
===================================================================
--- code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartTile.cc	(revision 12110)
+++ code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartTile.cc	(revision 12111)
@@ -104,3 +104,19 @@
         this->attachCollisionShape(cs_);
     }
+
+    /**
+    @brief
+        Checks if the OrxoKartship collided with the flag
+    */
+    bool OrxoKartTile::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/OrxoKartTile.h
===================================================================
--- code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartTile.h	(revision 12110)
+++ code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartTile.h	(revision 12111)
@@ -39,4 +39,5 @@
 #include "objects/ObjectsPrereqs.h"
 
+#include "OrxoKartKart.h"
 #include "worldentities/StaticEntity.h"
 
@@ -51,7 +52,20 @@
             void init(int x, int z, int s, int type);
 
+            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;
     };
 }
