Index: /code/trunk/src/modules/objects/ObjectsPrereqs.h
===================================================================
--- /code/trunk/src/modules/objects/ObjectsPrereqs.h	(revision 6863)
+++ /code/trunk/src/modules/objects/ObjectsPrereqs.h	(revision 6864)
@@ -87,4 +87,5 @@
     class DistanceMultiTrigger;
     class DistanceTrigger;
+    class EventMultiTrigger;
     class EventTrigger;
     class MultiTrigger;
Index: /code/trunk/src/modules/objects/triggers/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/objects/triggers/CMakeLists.txt	(revision 6863)
+++ /code/trunk/src/modules/objects/triggers/CMakeLists.txt	(revision 6864)
@@ -3,4 +3,5 @@
   DistanceMultiTrigger.cc
   DistanceTrigger.cc
+  EventMultiTrigger.cc
   EventTrigger.cc
   MultiTrigger.cc
Index: /code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.cc
===================================================================
--- /code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.cc	(revision 6863)
+++ /code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.cc	(revision 6864)
@@ -59,5 +59,4 @@
     DistanceMultiTrigger::~DistanceMultiTrigger()
     {
-        
     }
 
@@ -81,5 +80,4 @@
     std::queue<MultiTriggerState*>* DistanceMultiTrigger::letTrigger(void)
     {
-        ClassTreeMask& targetMask = this->getTargetMask();
 
         std::queue<MultiTriggerState*>* queue = NULL;
@@ -92,5 +90,5 @@
             if(entity == NULL)
             {
-                it++;
+                ++it;
                 this->removeFromRange(key);
                 continue;
@@ -101,6 +99,9 @@
             if (distanceVec.length() > this->distance_)
             {
-                if(!this->removeFromRange(entity))
+                if(!this->removeFromRange(key))
+                {
+                    ++it;
                     continue;
+                }
 
                 // If no queue has been created, yet.
@@ -117,4 +118,6 @@
                 ++it;
         }
+
+        ClassTreeMask& targetMask = this->getTargetMask();
 
         // Check for new objects that are in range
Index: /code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.h
===================================================================
--- /code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.h	(revision 6863)
+++ /code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.h	(revision 6864)
@@ -92,5 +92,5 @@
             */
             inline bool removeFromRange(WorldEntity* entity)
-                { (*this->range_.find(entity)->second)->destroy(); bool erased = this->range_.erase(entity) > 0; return erased; }
+                { WeakPtr<WorldEntity>* weakptr = this->range_.find(entity)->second; bool erased = this->range_.erase(entity) > 0; if(erased) delete weakptr; return erased; }
                 
         private:
Index: /code/trunk/src/modules/objects/triggers/EventMultiTrigger.cc
===================================================================
--- /code/trunk/src/modules/objects/triggers/EventMultiTrigger.cc	(revision 6864)
+++ /code/trunk/src/modules/objects/triggers/EventMultiTrigger.cc	(revision 6864)
@@ -0,0 +1,72 @@
+/*
+ *   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:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file EventMultiTrigger.cc
+    @brief Implementation of the EventMultiTrigger class.
+*/
+
+#include "EventMultiTrigger.h"
+
+#include "core/CoreIncludes.h"
+#include "core/EventIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+
+    CreateFactory(EventMultiTrigger);
+
+    EventMultiTrigger::EventMultiTrigger(BaseObject* creator) : MultiTrigger(creator)
+    {
+        RegisterObject(EventMultiTrigger);
+
+        this->bEventTriggered_ = false;
+    }
+
+    EventMultiTrigger::~EventMultiTrigger()
+    {
+        
+    }
+
+    void EventMultiTrigger::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(EventMultiTrigger, XMLPort, xmlelement, mode);
+
+        this->setBroadcast(true);
+    }
+    
+    void EventMultiTrigger::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(EventMultiTrigger, XMLEventPort, xmlelement, mode);
+
+        XMLPortEventState(EventMultiTrigger, BaseObject, "trigger", trigger, xmlelement, mode);
+    }
+
+}
+
Index: /code/trunk/src/modules/objects/triggers/EventMultiTrigger.h
===================================================================
--- /code/trunk/src/modules/objects/triggers/EventMultiTrigger.h	(revision 6864)
+++ /code/trunk/src/modules/objects/triggers/EventMultiTrigger.h	(revision 6864)
@@ -0,0 +1,63 @@
+/*
+ *   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:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file EventMultiTrigger.h
+    @brief Definition of the EventMultiTrigger class.
+*/
+
+#ifndef _EventMultiTrigger_H__
+#define _EventMultiTrigger_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include "MultiTrigger.h"
+
+namespace orxonox
+{
+
+    class _ObjectsExport EventMultiTrigger : public MultiTrigger
+    {
+        
+        public:
+            EventMultiTrigger(BaseObject* creator);
+            ~EventMultiTrigger();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating an EventMultiTrigger object through XML.
+            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
+
+            inline void trigger(bool bTriggered)
+                { this->bEventTriggered_ = bTriggered; this->changeTriggered(); }
+
+        private:
+            bool bEventTriggered_;
+    };
+
+}
+
+#endif // _EventMultiTrigger_H__
Index: /code/trunk/src/modules/objects/triggers/MultiTrigger.cc
===================================================================
--- /code/trunk/src/modules/objects/triggers/MultiTrigger.cc	(revision 6863)
+++ /code/trunk/src/modules/objects/triggers/MultiTrigger.cc	(revision 6864)
@@ -72,4 +72,6 @@
         this->mode_ = MultiTriggerMode::EventTriggerAND;
 
+        this->bBroadcast_ = false;
+
         this->parentTrigger_ = NULL;
         
@@ -85,5 +87,5 @@
     MultiTrigger::~MultiTrigger()
     {
-        COUT(4) << "Destorying MultiTrigger &" << this << ". " << this->stateQueue_.size() << " states still in queue. Deleting." << std::endl;
+        COUT(4) << "Destroying MultiTrigger &" << this << ". " << this->stateQueue_.size() << " states still in queue. Deleting." << std::endl;
         while(this->stateQueue_.size() > 0)
         {
@@ -110,4 +112,5 @@
         XMLPortParam(MultiTrigger, "invert", setInvert, getInvert, xmlelement, mode);
         XMLPortParamTemplate(MultiTrigger, "mode", setMode, getModeString, xmlelement, mode, const std::string&);
+        XMLPortParam(MultiTrigger, "broadcast", setBroadcast, getBroadcast, xmlelement, mode);
         XMLPortParamLoadOnly(MultiTrigger, "target", addTargets, xmlelement, mode).defaultValues("Pawn"); //TODO: Remove load only
 
@@ -257,5 +260,11 @@
                             if(bFire)
                             {
-                                this->fire(bActive, state->originator);
+                                if(this->bBroadcast_ && state->originator == NULL)
+                                {
+                                    this->broadcast(bActive);
+                                }
+                                else
+                                    this->fire(bActive, state->originator);
+                                
                                 bStateChanged = true;
                             }
@@ -265,7 +274,10 @@
                         if(bStateChanged)
                         {
-                            COUT(4) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: " << state->originator->getIdentifier()->getName() << " (&" << state->originator << "), active: " << bActive << ", triggered: " << state->bTriggered << "." << std::endl;
+                            if(state->originator != NULL)
+                                COUT(4) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: " << state->originator->getIdentifier()->getName() << " (&" << state->originator << "), active: " << bActive << ", triggered: " << state->bTriggered << "." << std::endl;
+                            else
+                                COUT(4) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: NULL, active: " << bActive << ", triggered: " << state->bTriggered << "." << std::endl;
                             if(this->parentTrigger_ != NULL)
-                                this->parentTrigger_->activityChanged(state->originator);
+                                this->parentTrigger_->subTrigggerActivityChanged(state->originator);
                         }
 
@@ -425,6 +437,4 @@
         This method is called by the MultiTrigger to get information about new trigger events that need to be looked at.
         This method is the device for the behaviour (the conditions under which the MultiTrigger triggers) of any derived class from MultiTrigger.
-
-        In this implementation it collects all objects triggering all sub-triggers nd the MultiTrigger itself and creates a state for each of them.
     @return
         A pointer to a queue of MultiTriggerState pointers is returned, containing all the neccessary information to decide whether these states should indeed become new states of the MultiTrigger.
@@ -435,6 +445,28 @@
         return NULL;
     }
-    
-    void MultiTrigger::activityChanged(BaseObject* originator)
+
+    /**
+    @brief
+        This method can be called by any class inheriting from MultiTrigger to change it's triggered status for a specified originator.
+
+        Compared to the letTrigger mode, which just polls and lets the pollee send it's state changed back, the changeTriggered method lets the trigger advertise its state changes just as they happen so it's much like the interrupt version of letTrigger.
+    @param originator
+        The originator which triggered the state change.
+    */
+    void MultiTrigger::changeTriggered(BaseObject* originator)
+    {
+        MultiTriggerState* state = new MultiTriggerState;
+        state->bTriggered = (!this->isTriggered(originator) & this->isModeTriggered(originator)) ^ this->bInvertMode_;
+        state->originator = originator;
+        this->addState(state);
+    }
+
+    /**
+    @brief
+        This method is called by any sub-trigger to advertise changes in it's state to it's parent-trigger.
+    @param originator
+        The object that caused the change in activity.
+    */
+    void MultiTrigger::subTrigggerActivityChanged(BaseObject* originator)
     {
         MultiTriggerState* state = new MultiTriggerState;
@@ -499,8 +531,8 @@
     /**
     @brief
-        Helper method. Creates an event for the given status and originator and fires it.
+        Helper method. Creates an Event for the given status and originator and fires it.
         Or more precisely creates a MultiTriggerContainer to encompass all neccesary information and creates an Event from that and sends it.
     @param status
-        The status of the event to be fired. This is equivalent to the activity of the MultiTrigger.
+        The status of the Event to be fired. This is equivalent to the activity of the MultiTrigger.
     @param originator
         The object that triggered the MultiTrigger to fire this Event.
@@ -512,4 +544,5 @@
         {
             this->fireEvent(status);
+            COUT(4) << "MultiTrigger '" <<  this->getName() << "' (&" << this << "): Fired event. status: " << status << "." << std::endl;
             return;
         }
@@ -523,4 +556,21 @@
     /**
     @brief
+        Helper method. Broadcasts an Event for every object that is a target.
+    @param status
+        The status of the Events to be fired. This is equivalent to the activity of the MultiTrigger.
+    */
+    void MultiTrigger::broadcast(bool status)
+    {
+        ClassTreeMask& targetMask = this->getTargetMask();
+        
+        for(ClassTreeMaskObjectIterator it = targetMask.begin(); it != targetMask.end(); ++it)
+        {
+            BaseObject* object = static_cast<BaseObject*>(*it);
+            this->fire(status, object);
+        }
+    }
+
+    /**
+    @brief
         Helper method. Adds a state to the state queue, where the state will wait to become active.
     @param state
Index: /code/trunk/src/modules/objects/triggers/MultiTrigger.h
===================================================================
--- /code/trunk/src/modules/objects/triggers/MultiTrigger.h	(revision 6863)
+++ /code/trunk/src/modules/objects/triggers/MultiTrigger.h	(revision 6864)
@@ -82,4 +82,5 @@
             'simultaniousTriggerers':   The number of simultanious triggerers limits the number of object that are allowed to trigger the MultiTrigger at the same time. Or a little more precisely, the number of distinct objects the MultiTrigger has 'triggered' states for, at each point in time.
             'mode':                     The mode describes how the MultiTrigger acts in relation to all the MultiTriggers, that are appended to it. There are 3 modes: 'and', meaning that the MultiTrigger can only be triggered if all the appended MultiTriggers are active. 'or', meaning that the MultiTrigger can only triggered if at least one of the appendend MultiTriggers is active. And 'xor', meaning that the MultiTrigger can only be triggered if one and only one appended MultiTrigger is active. Notice, that I wrote 'can only be active', that implies, that there is an addtitional condition to the activity of the MultiTrigger and that is the fulfillment of the triggering condition (the MultiTrigger itself doesn't have one, but all derived classes should). Also bear in mind, that the activity of a MultiTrigger is still coupled to the object that triggered it. The default is 'and'.
+            'broadcast'                 Broadcast is a bool, if true the MutliTrigger is in broadcast-mode, meaining, that all trigger events that are caused by no originator (originator is NULL) are broadcasted as having come from every possible originator, or more precisely as having come from all objects that are specified targets of this MultiTrigger.
             'target':                   The target describes the kind of objects that are allowed to trigger this MultiTrigger. The default is 'Pawn'.
             Also there is the possibility of appending MultiTriggers to the MultiTrigger just by adding them as subobjects in the XML description of your MultiTrigger.
@@ -109,5 +110,5 @@
             @return The delay.
             */
-            inline float getDelay() const
+            inline float getDelay(void) const
                 { return this->delay_; }
 
@@ -122,5 +123,5 @@
             @return Returns true if the MultiTriger is in switch-mode.
             */
-            inline bool getSwitch() const
+            inline bool getSwitch(void) const
                 { return this->bSwitch_; }
 
@@ -135,5 +136,5 @@
             @return Returns true if the MultiTrigger stays active.
             */
-            inline bool getStayActive() const
+            inline bool getStayActive(void) const
                 { return this->bStayActive_; }
 
@@ -148,5 +149,5 @@
             @return The number of activations. -1 denotes infinity.
             */
-            inline int getActivations() const
+            inline int getActivations(void) const
                 { return this->remainingActivations_; }
 
@@ -174,5 +175,5 @@
             @return Returns true if the MultiTrigger is set to invert.
             */
-            inline bool getInvert() const
+            inline bool getInvert(void) const
                 { return this->bInvertMode_; }
 
@@ -193,4 +194,17 @@
 
             /**
+            @brief Set the broadcast-mode of the MultiTrigger.
+            @param bBroadcast If true the MultiTrigger is set to broadcast;
+            */
+            inline void setBroadcast(bool bBroadcast)
+                { this->bBroadcast_ = bBroadcast; }
+            /**
+            @brief Get the broadcast-mode of the MultiTrigger.
+            @return Returns true if the MultiTrigger is set to broadcast.
+            */
+            inline bool getBroadcast(void)
+                { return this->bBroadcast_; }
+
+            /**
             @brief Get whether the input object is a target of the MultiTrigger.
             @param target A pointer to the object.
@@ -198,5 +212,5 @@
             */
             inline bool isTarget(BaseObject* target)
-                { return targetMask_.isIncluded(target->getIdentifier()); }
+                { if(target == NULL) return true; else return targetMask_.isIncluded(target->getIdentifier()); }
             void addTargets(const std::string& targets); //!< Add some target to the MultiTrigger.
             void removeTargets(const std::string& targets); //!< Remove some target from the MultiTrigger.
@@ -208,10 +222,11 @@
             virtual std::queue<MultiTriggerState*>* letTrigger(void); //!< This method is called by the MultiTrigger to get information about new trigger events that need to be looked at.
 
-            void activityChanged(BaseObject* originator);
+            void changeTriggered(BaseObject* originator = NULL); //!< This method can be called by any class inheriting from MultiTrigger to change it's triggered status for a specified originator.
             
             bool isModeTriggered(BaseObject* triggerer = NULL); //!< Checks whetherx the MultiTrigger is triggered concerning it's sub-triggers.
             bool isTriggered(BaseObject* triggerer = NULL); //!< Get whether the MultiTrigger is triggered for a given object.
 
-            void fire(bool status, BaseObject* originator = NULL);  //!< Helper method. Creates an event for the given status and originator and fires it.
+            void fire(bool status, BaseObject* originator = NULL);  //!< Helper method. Creates an Event for the given status and originator and fires it.
+            void broadcast(bool status); //!< Helper method. Broadcasts an Event for every object that is a target.
 
             /**
@@ -240,4 +255,6 @@
             static const std::string or_s;
             static const std::string xor_s;
+
+            void subTrigggerActivityChanged(BaseObject* originator); //!< This method is called by any sub-trigger to advertise changes in it's state to it's parent-trigger.
             
             bool addState(MultiTriggerState* state); //!< Helper method. Adds a state to the state queue, where the state will wait to become active.
@@ -266,4 +283,6 @@
             MultiTriggerMode::Value mode_; //!< The mode of the MultiTrigger.
 
+            bool bBroadcast_; //!< Bool for the broadcast-mode, if true all triggers go to all possible targets.
+
             MultiTrigger* parentTrigger_;
             std::set<MultiTrigger*> subTriggers_; //!< The sub-triggers of this MultiTrigger.
Index: /code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 6863)
+++ /code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 6864)
@@ -131,5 +131,8 @@
         if (GameMode::isMaster())
             if (this->health_ <= 0 && bAlive_)
+            {
+                this->fireEvent(); // Event to notify anyone who want's to know about the death.
                 this->death();
+            }
     }
 
