Index: code/branches/Dialogue_FS17/src/modules/dialogue/CMakeLists.txt
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/CMakeLists.txt	(revision 11394)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/CMakeLists.txt	(revision 11401)
@@ -1,4 +1,5 @@
 SET_SOURCE_FILES(DIALOGUE_SRC_FILES
   DialogueManager.cc
+  NextQuestion.cc
  
 )
Index: code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc	(revision 11394)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc	(revision 11401)
@@ -41,28 +41,12 @@
 		return question;
 	}
-	void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+	/*void DialogueManager::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
         SUPER(DialogueManager, XMLPort, xmlelement, mode);
 
         XMLPortParam(DialogueManager, "question", setquestion, getquestion, xmlelement, mode);
-    }
+    }*/
 
-	bool DialogueManager::execute(bool bTriggered, BaseObject* trigger)
-    {  
-        //if(!bTriggered) return false;
-
-
-
-        orxout() << "bTriggered is " << bTriggered;
-        //orxout() << " 1 " << mystring << endl;
-        return false;
-    }
-
-    void DialogueManager::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(DialogueManager, XMLEventPort, xmlelement, mode);
-
-        XMLPortEventSink(DialogueManager, BaseObject, "execute", execute, xmlelement, mode); 
-    }
+	
 
 	/*std::string DialogueManager::setnpc(std::string npc){
Index: code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h	(revision 11394)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h	(revision 11401)
@@ -6,5 +6,4 @@
 #include "network/Host.h"
 #include "network/NetworkFunctionIncludes.h"
-#include "DialoguePrereqs.h"
 #include "util/Singleton.h"
 #include <string>
@@ -24,4 +23,5 @@
 		//tolua_begin
 		public:
+		
 
 		DialogueManager(Context* context); // tolua_export
@@ -30,13 +30,9 @@
 		static DialogueManager& getInstance() { return Singleton<DialogueManager>::getInstance(); } 
 		
-		virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
 		void setquestion(std::string question);
 		std::string getquestion(void);
+		
 
-
-		virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
-		bool execute(bool bTriggered, BaseObject* trigger);
-
+		
 	
 
Index: code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc	(revision 11394)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc	(revision 11401)
@@ -1,4 +1,7 @@
 #include <vector>
 #include <string>
+#include "core/CoreIncludes.h"
+#include "core/GUIManager.h"
+
 
 #include "NextQuestion.h"
@@ -9,7 +12,53 @@
 	RegisterClass(NextQuestion);
 
-	vector<NextQuestion> nextquestion;
+	NextQuestion::NextQuestion(Context* context) : BaseObject(context)
+    {
+        RegisterObject(NextQuestion);
+        orxout() << "Klasse aufgerufen" << endl;
 
-	void NextQuestion::setanswers(std::string option1, std::string option2, std::string option3){
+    }
+
+	void NextQuestion::setquestion(std::string question){
+		question=question;
+	}
+
+	std::string NextQuestion::getquestion(void){
+		return question;
+	}
+
+	
+	//
+
+	
+	//XML and Event shit
+	void NextQuestion::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(NextQuestion, XMLPort, xmlelement, mode);
+
+        XMLPortParam(NextQuestion, "question", setquestion, getquestion, xmlelement, mode);
+    }
+	bool NextQuestion::execute(bool bTriggered, BaseObject* trigger)
+    {  
+        //if(!bTriggered) return false;
+    	
+        
+
+
+        orxout() << "bTriggered is " << bTriggered << endl;
+
+        for (DialogueManager* hud : ObjectList<DialogueManager>())
+            m = hud;
+        m->setquestion(question);
+        //orxout() << " 1 " << mystring << endl;
+        return false;
+    }
+
+    void NextQuestion::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(NextQuestion, XMLEventPort, xmlelement, mode);
+
+        XMLPortEventSink(NextQuestion, BaseObject, "execute", execute, xmlelement, mode); 
+    }
+	/*void NextQuestion::setanswers(std::string option1, std::string option2, std::string option3){
 		options.at(0)=option1;
 		options.at(1)=option2;
@@ -23,5 +72,5 @@
 	int NextQuestion::getnumOptions(){
 		return options.size();
-	}
+	}*/
 
 }
Index: code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.h
===================================================================
--- code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.h	(revision 11394)
+++ code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.h	(revision 11401)
@@ -1,12 +1,47 @@
 #include <vector>
 #include <string>
+#include "core/class/Identifier.h"
+#include "OrxonoxPrereqs.h"
+#include "core/XMLPort.h"
+#include "core/EventIncludes.h"
+#include "DialogueManager.h"
 
-#include "core/XMLPort.h"
+
 
 namespace orxonox{
-	void setanswers(std::string option1, std::string option2, std::string option3);
-	std::vector <std::string> getanswers(void);
+	class _OrxonoxExport NextQuestion : public BaseObject
+	{
+		
+		//tolua_begin
+		public:
 
-	int getnumOptions();
-	std::vector<std::string> options;
+		NextQuestion (Context* context); // tolua_export
+		
+
+		void setquestion(std::string question);
+		std::string getquestion(void);
+
+
+		
+ 
+		
+		virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+		/*void setanswers(std::string option1, std::string option2, std::string option3);
+		std::vector <std::string> getanswers(void);
+
+		int getnumOptions();
+		std::vector<std::string> options;*/
+
+		//Event
+		virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
+		bool execute(bool bTriggered, BaseObject* trigger);
+
+		
+	private:
+		std::string question;
+		DialogueManager* m;
+
+	};
+	
 }
