Index: code/branches/core2/src/orxonox/core/CommandExecutor.cc
===================================================================
--- code/branches/core2/src/orxonox/core/CommandExecutor.cc	(revision 966)
+++ code/branches/core2/src/orxonox/core/CommandExecutor.cc	(revision 967)
@@ -63,4 +63,7 @@
         this->errorMessage_ = "";
         this->state_ = CS_Uninitialized;
+
+        this->bEvaluatedParams_ = false;
+        this->evaluatedExecutor_ = 0;
     }
 
@@ -113,4 +116,50 @@
             return false;
         }
+    }
+
+    void CommandEvaluation::evaluateParams()
+    {
+        this->bEvaluatedParams_ = false;
+        this->evaluatedExecutor_ = 0;
+
+        for (unsigned int i = 0; i < MAX_FUNCTOR_ARGUMENTS; i++)
+            this->param_[i] = MT_null;
+
+        if (this->state_ == CS_Shortcut_Params || this->state_ == CS_Shortcut_Finished)
+        {
+            if (this->shortcut_ != 0)
+            {
+                if (this->shortcut_->evaluate(this->processedCommand_ + this->getAdditionalParameter(), this->param_, " "))
+                {
+                    this->bEvaluatedParams_ = true;
+                    this->evaluatedExecutor_ = this->shortcut_;
+                }
+            }
+        }
+        else if (this->state_ == CS_Function_Params || this->state_ == CS_Function_Finished)
+        {
+            if (this->function_ != 0)
+            {
+                if (this->function_->evaluate(this->processedCommand_ + this->getAdditionalParameter(), this->param_, " "))
+                {
+                    this->bEvaluatedParams_ = true;
+                    this->evaluatedExecutor_ = this->function_;
+                }
+            }
+        }
+    }
+
+    void CommandEvaluation::setEvaluatedParameter(unsigned int index, MultiTypeMath param)
+    {
+        if (index >= 0 && index < MAX_FUNCTOR_ARGUMENTS)
+            this->param_[index] = param;
+    }
+
+    MultiTypeMath CommandEvaluation::getEvaluatedParameter(unsigned int index) const
+    {
+        if (index >= 0 && index < MAX_FUNCTOR_ARGUMENTS)
+            return this->param_[index];
+
+        return MT_null;
     }
 
@@ -178,4 +227,9 @@
         SubString tokens(evaluation.processedCommand_, " ", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');
 
+        if (evaluation.bEvaluatedParams_ && evaluation.evaluatedExecutor_ != 0)
+        {
+            (*evaluation.evaluatedExecutor_)(evaluation.param_[0], evaluation.param_[1], evaluation.param_[2], evaluation.param_[3], evaluation.param_[4]);
+        }
+
         switch (evaluation.state_)
         {
@@ -404,4 +458,5 @@
     {
         CommandExecutor::parse(command, true);
+        CommandExecutor::getEvaluation().evaluateParams();
         return CommandExecutor::getEvaluation();
     }
Index: code/branches/core2/src/orxonox/core/CommandExecutor.h
===================================================================
--- code/branches/core2/src/orxonox/core/CommandExecutor.h	(revision 966)
+++ code/branches/core2/src/orxonox/core/CommandExecutor.h	(revision 967)
@@ -77,7 +77,12 @@
 
             inline void setAdditionalParameter(const std::string& param)
-                { this->additionalParameter_ = param; }
+                { this->additionalParameter_ = param; this->bEvaluatedParams_ = false; }
             inline std::string getAdditionalParameter() const
                 { return (this->additionalParameter_ != "") ? (" " + this->additionalParameter_) : ""; }
+
+            void setEvaluatedParameter(unsigned int index, MultiTypeMath param);
+            MultiTypeMath getEvaluatedParameter(unsigned int index) const;
+
+            void evaluateParams();
 
         private:
@@ -102,4 +107,8 @@
             std::string errorMessage_;
             CommandState state_;
+
+            bool bEvaluatedParams_;
+            MultiTypeMath param_[5];
+            ExecutorStatic* evaluatedExecutor_;
     };
 
Index: code/branches/core2/src/orxonox/core/Executor.cc
===================================================================
--- code/branches/core2/src/orxonox/core/Executor.cc	(revision 966)
+++ code/branches/core2/src/orxonox/core/Executor.cc	(revision 967)
@@ -29,4 +29,5 @@
 #include "Executor.h"
 #include "Language.h"
+#include "util/Math.h"
 
 namespace orxonox
@@ -62,4 +63,52 @@
     {
         EXECUTOR_PARSE(normal);
+    }
+
+    bool Executor::evaluate(const std::string& params, MultiTypeMath param[5], const std::string& delimiter) const
+    {
+        unsigned int paramCount = this->functor_->getParamCount();
+
+        if (paramCount == 1)
+        {
+            // only one param: check if there are params given, otherwise try to use default values
+            std::string temp = getStripped(params);
+            if ((temp != "") && (temp.size() != 0))
+            {
+                param[0] = params;
+                this->functor_->evaluateParam(0, param[0]);
+                return true;
+            }
+            else if (this->bAddedDefaultValue_[0])
+            {
+                param[0] = this->defaultValue_[0];
+                this->functor_->evaluateParam(0, param[0]);
+                return true;
+            }
+            return false;
+        }
+        else
+        {
+            // more than one param
+            SubString tokens(params, delimiter, SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');
+
+            // if there are not enough params given, check if there are default values
+            for (unsigned int i = tokens.size(); i < this->functor_->getParamCount(); i++)
+                if (!this->bAddedDefaultValue_[i])
+                    return false;
+
+            // assign all given arguments to the multitypes
+            for (unsigned int i = 0; i < min(tokens.size(), (unsigned int)MAX_FUNCTOR_ARGUMENTS); i++)
+                param[i] = tokens[i];
+
+            // fill the remaining multitypes with default values
+            for (unsigned int i = tokens.size(); i < min(paramCount, (unsigned int)MAX_FUNCTOR_ARGUMENTS); i++)
+                param[i] = this->defaultValue_[i];
+
+            // evaluate the param types through the functor
+            for (unsigned int i = 0; i < min(paramCount, (unsigned int)MAX_FUNCTOR_ARGUMENTS); i++)
+                this->functor_->evaluateParam(i, param[i]);
+
+            return true;
+        }
     }
 
Index: code/branches/core2/src/orxonox/core/Executor.h
===================================================================
--- code/branches/core2/src/orxonox/core/Executor.h	(revision 966)
+++ code/branches/core2/src/orxonox/core/Executor.h	(revision 967)
@@ -89,5 +89,5 @@
         MultiTypeMath param[paramCount]; \
         COUT(5) << "Calling Executor " << this->name_ << " through parser with " << paramCount << " parameters, using " << tokens.size() << " tokens ("; \
-        for (unsigned int i = 0; i < tokens.size(); i++) \
+        for (unsigned int i = 0; i < tokens.size() && i < MAX_FUNCTOR_ARGUMENTS; i++) \
         { \
             param[i] = tokens[i]; \
@@ -165,4 +165,6 @@
             bool parse(const std::string& params, const std::string& delimiter = " ") const;
 
+            bool evaluate(const std::string& params, MultiTypeMath param[5], const std::string& delimiter = " ") const;
+
             Executor& setDescription(const std::string& description);
             const std::string& getDescription() const;
Index: code/branches/core2/src/orxonox/core/Functor.h
===================================================================
--- code/branches/core2/src/orxonox/core/Functor.h	(revision 966)
+++ code/branches/core2/src/orxonox/core/Functor.h	(revision 967)
@@ -103,4 +103,6 @@
             std::string getTypenameParam(unsigned int param) const { return (param >= 0 && param < 5) ? this->typeParam_[param] : ""; }
             std::string getTypenameReturnvalue() const { return this->typeReturnvalue_; }
+
+            virtual void evaluateParam(unsigned int index, MultiTypeMath& param) const = 0;
 
         protected:
@@ -278,4 +280,29 @@
 
 
+#define FUNCTOR_EVALUATE_PARAM(numparams) FUNCTOR_EVALUATE_PARAM##numparams
+#define FUNCTOR_EVALUATE_PARAM0
+#define FUNCTOR_EVALUATE_PARAM1 \
+    if (index == 0) param = (P1)param
+#define FUNCTOR_EVALUATE_PARAM2 \
+    if (index == 0) param = (P1)param; \
+    else if (index == 1) param = (P2)param
+#define FUNCTOR_EVALUATE_PARAM3 \
+    if (index == 0) param = (P1)param; \
+    else if (index == 1) param = (P2)param; \
+    else if (index == 2) param = (P3)param
+#define FUNCTOR_EVALUATE_PARAM4 \
+    if (index == 0) param = (P1)param; \
+    else if (index == 1) param = (P2)param; \
+    else if (index == 2) param = (P3)param; \
+    else if (index == 3) param = (P4)param
+#define FUNCTOR_EVALUATE_PARAM5 \
+    if (index == 0) param = (P1)param; \
+    else if (index == 1) param = (P2)param; \
+    else if (index == 2) param = (P3)param; \
+    else if (index == 3) param = (P4)param; \
+    else if (index == 4) param = (P5)param
+
+
+
 
 
@@ -301,4 +328,9 @@
             } \
     \
+            virtual void evaluateParam(unsigned int index, MultiTypeMath& param) const \
+            { \
+                FUNCTOR_EVALUATE_PARAM(numparams); \
+            } \
+    \
         private: \
             FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) (*functionPointer_)(FUNCTOR_FUNCTION_PARAMS(numparams)); \
@@ -340,4 +372,9 @@
             } \
     \
+            virtual void evaluateParam(unsigned int index, MultiTypeMath& param) const \
+            { \
+                FUNCTOR_EVALUATE_PARAM(numparams); \
+            } \
+    \
         private: \
             FUNCTOR_FUNCTION_RETURNVALUE(returnvalue) (T::*functionPointer_)(FUNCTOR_FUNCTION_PARAMS(numparams)); \
@@ -365,4 +402,9 @@
             { \
                 FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
+            } \
+    \
+            virtual void evaluateParam(unsigned int index, MultiTypeMath& param) const \
+            { \
+                FUNCTOR_EVALUATE_PARAM(numparams); \
             } \
     \
