Index: code/branches/QuestGuide_HS16/src/modules/waypoints/CMakeLists.txt
===================================================================
--- code/branches/QuestGuide_HS16/src/modules/waypoints/CMakeLists.txt	(revision 11286)
+++ code/branches/QuestGuide_HS16/src/modules/waypoints/CMakeLists.txt	(revision 11287)
@@ -1,3 +1,3 @@
-ADD_SOURCE_FILES(ORXONOX_SRC_FILES
+ADD_SOURCE_FILES(WAYPOINTS_SRC_FILES
 
   Waypointarrow.cc
@@ -6,2 +6,12 @@
 )
 
+
+ORXONOX_ADD_LIBRARY(waypoints
+  MODULE
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    overlays
+    objects
+  SOURCE_FILES ${WAYPOINTS_SRC_FILES}
+)
Index: code/branches/QuestGuide_HS16/src/modules/waypoints/Waypoint.cc
===================================================================
--- code/branches/QuestGuide_HS16/src/modules/waypoints/Waypoint.cc	(revision 11286)
+++ code/branches/QuestGuide_HS16/src/modules/waypoints/Waypoint.cc	(revision 11287)
@@ -5,6 +5,10 @@
 #include "util/OrxAssert.h"
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
 
 namespace orxonox
+
+
 {
     RegisterClass(Waypoint);
@@ -37,5 +41,6 @@
     void Waypoint::XMLPort(Element& xmlelement, XMLPort::Mode mode){
         SUPER(Waypoint, XMLPort, xmlelement, mode); // From the SpaceShip.cc file
-        XMLPortParam(Waypoint, "order", getOrder, setOrder, xmlelement, mode);
+        
+        XMLPortParam(Waypoint, "order", setOrder, getOrder, xmlelement, mode);
 
     }
Index: code/branches/QuestGuide_HS16/src/modules/waypoints/Waypoint.h
===================================================================
--- code/branches/QuestGuide_HS16/src/modules/waypoints/Waypoint.h	(revision 11286)
+++ code/branches/QuestGuide_HS16/src/modules/waypoints/Waypoint.h	(revision 11287)
@@ -5,7 +5,7 @@
 
 #include "OrxonoxPrereqs.h"
-#include "StaticEntity.h"
+#include "worldentities/StaticEntity.h"
 #include "graphics/Model.h"
-#include "modules/objects/triggers/DistanceTrigger.h"
+#include "objects/triggers/DistanceTrigger.h"
 
 #include <map>
@@ -43,7 +43,10 @@
             }
 
+            inline void setOrder(int number){
+                this->order = number;
+            }
 
             inline int getOrder(){
-                return order;
+                return this->order;
             }
 
Index: code/branches/QuestGuide_HS16/src/modules/waypoints/WaypointGroup.cc
===================================================================
--- code/branches/QuestGuide_HS16/src/modules/waypoints/WaypointGroup.cc	(revision 11286)
+++ code/branches/QuestGuide_HS16/src/modules/waypoints/WaypointGroup.cc	(revision 11287)
@@ -4,5 +4,8 @@
 #include <BulletDynamics/Dynamics/btRigidBody.h>
 #include "util/OrxAssert.h"
+#include "WaypointGroup.h"
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
 
 namespace orxonox
@@ -12,16 +15,16 @@
     WaypointGroup::WaypointGroup(Context* context) : StaticEntity(context)
     {
-        /*RegisterObject(Waypoint);
-        model = new Model(this->getContext());
-        model->setMeshSource("cube.mesh");  // Name of the arrow file for now bottle
-        this->attach(model);
-        model->setScale(3);
+        RegisterObject(WaypointGroup);
+        //model = new Model(this->getContext());
+        //model->setMeshSource("cube.mesh");  // Name of the arrow file for now bottle
+        //is->attach(model);
+        //model->setScale(3);
         //model->setOrientation(Vector3(0,0,-1));
-        model->setPosition(Vector3(0.0,0.0,0.0));        // this is wrong, it has to be triggered
-        waypoint_active = false;
-        distancetrigger = new DistanceTrigger(this->getContext());   
-        distancetrigger->setDistance(100);
-        this->attach(distancetrigger);
-        */
+        //model->setPosition(Vector3(0.0,0.0,0.0));        // this is wrong, it has to be triggered
+        //waypoint_active = false;
+        //distancetrigger = new DistanceTrigger(this->getContext());   
+        //distancetrigger->setDistance(100);
+        //this->attach(distancetrigger);
+        
     }
 
@@ -35,9 +38,30 @@
      //setOrientation()
 
-    Waypoint* WaypointGroup::getWaypoint(){
-        for (Waypoint* waypoint : this->waypoints_){
-            if(!(waypoint->waypoint_actived)){
-                waypoint->enable_waypoint();
-                return waypoint;
+  
+
+
+    Waypoint* WaypointGroup::getWaypoint(unsigned int index)
+    {
+        unsigned int i = 0;
+        for (Waypoint* child : this->waypoints_)
+        {
+            if (i == index)
+                return child;
+            ++i;
+        }
+        return nullptr;
+    }
+
+    void WaypointGroup::setWaypoint(Waypoint* object)
+    {
+        this->waypoints_.insert(object);
+    }
+
+
+    Waypoint* WaypointGroup::getActive(){
+          for (Waypoint* object : this->waypoints_){
+            if(!(object->waypoint_actived)){
+                object->enable_waypoint();
+                return object;
             }
         }
@@ -45,30 +69,14 @@
 
 
-    Waypoint* WaypointGroup::getWaypoint(unsigned int index)
-    {
-        unsigned int i = 0;
-        for (Waypoint* waypoint : this->waypoints_)
-        {
-   
-            if (i == index)
-                return waypoint;
-            ++i;
-        }
-        return nullptr;
-    }
 
-    void WaypointGroup::addWaypoint(Waypoint* object)
-    {
-        this->waypoints_.insert(object);
+    
+
+    void WaypointGroup::XMLPort(Element& xmlelement, XMLPort::Mode mode){
+        SUPER(WaypointGroup, XMLPort, xmlelement, mode); // From the SpaceShip.cc file
+        XMLPortObject(WaypointGroup, Waypoint, "waypoints", setWaypoint, getWaypoint, xmlelement, mode);
+
     }
 
 
 
-    void Waypoint::XMLPort(Element& xmlelement, XMLPort::Mode mode){
-        SUPER(Waypoint, XMLPort, xmlelement, mode); // From the SpaceShip.cc file
-        XMLPortObject(WaypointGroup, Waypoint, "waypoints", addWaypoint, getWaypoint, xmlelement, mode);
-
-    }
-
-
 }
Index: code/branches/QuestGuide_HS16/src/modules/waypoints/WaypointGroup.h
===================================================================
--- code/branches/QuestGuide_HS16/src/modules/waypoints/WaypointGroup.h	(revision 11286)
+++ code/branches/QuestGuide_HS16/src/modules/waypoints/WaypointGroup.h	(revision 11287)
@@ -1,18 +1,18 @@
 
 
-#ifndef _Waypoint_H__
-#define _Waypoint_H__
+#ifndef _WaypointGroup_H__
+#define _WaypointGroup_H__
 
 #include "OrxonoxPrereqs.h"
-#include "StaticEntity.h"
+#include "worldentities/StaticEntity.h"
 #include "graphics/Model.h"
-#include "modules/objects/triggers/DistanceTrigger.h"
+#include "objects/triggers/DistanceTrigger.h"
 
 #include <map>
 #include <string>
 
+#include "core/CoreIncludes.h"
 #include "util/OgreForwardRefs.h"
-#include "tools/interfaces/Tickable.h"
-#include "Waypoints.h"
+#include "Waypoint.h"
 
 namespace orxonox
@@ -40,7 +40,10 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
 
+        //Waypoint* getWaypoint();
         Waypoint* getWaypoint(unsigned int index);
+        void setWaypoint(Waypoint* object);
 
-        Way
+
+        
 
 
@@ -54,5 +57,5 @@
             //virtual bool isCollisionTypeLegal(CollisionType type) const override;
          
-        std::set<Waypoint*> waypoints;
+        std::set<Waypoint*> waypoints_;
 
             // network callbacks
Index: code/branches/QuestGuide_HS16/src/modules/waypoints/Waypointarrow.cc
===================================================================
--- code/branches/QuestGuide_HS16/src/modules/waypoints/Waypointarrow.cc	(revision 11286)
+++ code/branches/QuestGuide_HS16/src/modules/waypoints/Waypointarrow.cc	(revision 11287)
@@ -14,9 +14,10 @@
         RegisterObject(Waypointarrow);
         model = new Model(this->getContext());
-        model->setMeshSource("Arrow.mesh");  // Name of the arrow file for now bottle
+        model->setMeshSource("cokebottle.mesh");  // Name of the arrow file for now bottle
         this->attach(model);
         model->setScale(3);
-        model->setOrientation(Vector3(0,0,-1));
+       // model->setOrientation(Vector3(0,0,-1));
         model->setPosition(Vector3(0,15,0));
+        
     }
 
Index: code/branches/QuestGuide_HS16/src/modules/waypoints/Waypointarrow.h
===================================================================
--- code/branches/QuestGuide_HS16/src/modules/waypoints/Waypointarrow.h	(revision 11286)
+++ code/branches/QuestGuide_HS16/src/modules/waypoints/Waypointarrow.h	(revision 11287)
@@ -1,12 +1,11 @@
 
 
-#ifndef _Waypoint_H__
-#define _Waypoint_H__
+#ifndef _Waypointarrow_H__
+#define _Waypointarrow_H__
 
 #include "OrxonoxPrereqs.h"
-#include "StaticEntity.h"
+#include "worldentities/StaticEntity.h"
 #include "graphics/Model.h"
 
-#include <map>
 #include <string>
 
@@ -15,4 +14,6 @@
 #include "interfaces/RadarListener.h"
 #include "WaypointGroup.h"
+#include "core/XMLPort.h"
+
 
 namespace orxonox
