Index: /code/branches/tgidronFS16/data/levels/Hover.oxw
===================================================================
--- /code/branches/tgidronFS16/data/levels/Hover.oxw	(revision 11170)
+++ /code/branches/tgidronFS16/data/levels/Hover.oxw	(revision 11171)
@@ -42,5 +42,5 @@
 
 <Template name=destroyhoverpickup baseclass=MetaPickup>
-  <MetaPickup representation="destroyhover" metaType="destroy" />
+  <MetaPickup representation="destroyhover" metaType="destroyCarrier" />
 </Template>
 
Index: /code/branches/tgidronFS16/data/levels/includes/weaponSettingsHover.oxi
===================================================================
--- /code/branches/tgidronFS16/data/levels/includes/weaponSettingsHover.oxi	(revision 11170)
+++ /code/branches/tgidronFS16/data/levels/includes/weaponSettingsHover.oxi	(revision 11171)
@@ -17,5 +17,5 @@
     </Weapon>
     <Weapon>
-      <EnergyDrink mode=0 munitionpershot=0 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.8, 1, -18.0" projectileMesh="LaserBeam2.mesh" />
+      <EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare" muzzleoffset=" 0.8, 1, -18.0" projectileMesh="LaserBeam2.mesh" />
     </Weapon>
   </WeaponPack>
Index: /code/branches/tgidronFS16/data/overlays/HoverHUD.oxo
===================================================================
--- /code/branches/tgidronFS16/data/overlays/HoverHUD.oxo	(revision 11170)
+++ /code/branches/tgidronFS16/data/overlays/HoverHUD.oxo	(revision 11171)
@@ -57,5 +57,5 @@
 
     <OverlayText
-     position  = "0.02, 0.02"
+     position  = "0.02, 0.08"
      pickpoint = "0.0, 0.0"
      font      = "ShareTechMono"
@@ -66,5 +66,15 @@
     />
 
-    <TotalFlagsHUD
+    <OverlayText
+     position  = "0.02, 0.12"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+     caption   = "Lives: "
+    />
+
+    <FlagsAndLivesHUD
      position  = "0.14, 0.02"
      pickpoint = "0.0, 0.0"
@@ -73,7 +83,18 @@
      colour    = "1.0, 1.0, 1.0, 1.0"
      align     = "left"
+     showLives = false
+     />
 
-     showpoints     = true
-    />
+     <FlagsAndLivesHUD
+     position  = "0.14, 0.04"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+     showLives = true
+
+     />
+
   </OverlayGroup>
 
Index: /code/branches/tgidronFS16/src/modules/hover/CMakeLists.txt
===================================================================
--- /code/branches/tgidronFS16/src/modules/hover/CMakeLists.txt	(revision 11170)
+++ /code/branches/tgidronFS16/src/modules/hover/CMakeLists.txt	(revision 11171)
@@ -8,4 +8,5 @@
   FlagHUD.cc
   MazeGenerator.cc
+  FlagsAndLivesHUD.cc
 )
 
Index: /code/branches/tgidronFS16/src/modules/hover/FlagsAndLivesHUD.cc
===================================================================
--- /code/branches/tgidronFS16/src/modules/hover/FlagsAndLivesHUD.cc	(revision 11171)
+++ /code/branches/tgidronFS16/src/modules/hover/FlagsAndLivesHUD.cc	(revision 11171)
@@ -0,0 +1,92 @@
+/*
+ *   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:
+ *      Tomer Gidron
+ *
+ */
+
+#include "FlagsAndLivesHUD.h"
+#include "HoverFlag.h"
+#include "Hover.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+
+namespace orxonox
+{
+    RegisterClass(FlagsAndLivesHUD);
+
+    FlagsAndLivesHUD::FlagsAndLivesHUD(Context* context) : OverlayText(context)
+    {
+        RegisterObject(FlagsAndLivesHUD);
+
+        this->hoverGame_ = nullptr;
+        this->totFlags_ = 0;
+        showLives_ = false;
+    }
+
+    void FlagsAndLivesHUD::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(FlagsAndLivesHUD, XMLPort, xmlelement, mode);
+
+        XMLPortParam(FlagsAndLivesHUD,"showPoints", setShowTot, getShowTot, xmlelement, mode);
+        XMLPortParam(FlagsAndLivesHUD, "showLives", setShowLives, getShowLives, xmlelement, mode);
+    }
+
+    void FlagsAndLivesHUD::tick(float dt)
+    {
+        SUPER(FlagsAndLivesHUD, tick, dt);
+
+            const std::string& flags = multi_cast<std::string>(this->hoverGame_->getTotFlags());
+            const std::string& lives = multi_cast<std::string>(this->hoverGame_->getLives());
+
+            if(showLives_ == false){
+                setTextSize(0.04);
+                setPosition(Vector2(0.18, 0.08));
+                this->setColour(ColourValue(1, 1, 1, 1));
+                this->setCaption(flags);
+            }
+
+            else{
+                setTextSize(0.04);
+                setPosition(Vector2(0.18, 0.12));
+                this->setColour(ColourValue(1, 1, 1, 1));
+                this->setCaption(lives);
+            }
+            
+    }
+
+    void FlagsAndLivesHUD::changedOwner()
+    {
+        SUPER(FlagsAndLivesHUD, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+        {
+            this->hoverGame_ = orxonox_cast<Hover*>(this->getOwner()->getGametype());
+        }
+        else
+        {
+            this->hoverGame_ = nullptr;
+        }
+    }
+}
Index: /code/branches/tgidronFS16/src/modules/hover/FlagsAndLivesHUD.h
===================================================================
--- /code/branches/tgidronFS16/src/modules/hover/FlagsAndLivesHUD.h	(revision 11171)
+++ /code/branches/tgidronFS16/src/modules/hover/FlagsAndLivesHUD.h	(revision 11171)
@@ -0,0 +1,71 @@
+/*
+ *   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:
+ *      Tomer Gidron
+ *
+ */
+
+ /**
+    @file TimeHUD.h
+    @brief Declaration of the TimeHUD class.
+*/
+
+#ifndef _FlagsAndLivesHUD_H__
+#define _FlagsAndLivesHUD_H__
+
+
+#include "HoverPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _HoverExport FlagsAndLivesHUD : public OverlayText, public Tickable
+    {
+        public:
+            FlagsAndLivesHUD(Context* context);
+
+            virtual void tick(float dt) override;
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void changedOwner() override;
+
+            /// sets TOTAL flags taken
+            inline void setShowTot(int totFlags)
+                { this->totFlags_ = totFlags; }
+            /// returns total flags >=0
+            inline int getShowTot() const
+                { return this->totFlags_; }
+
+            void setShowLives(const bool showLives)
+                { showLives_ = showLives; }
+
+            const bool getShowLives() const
+                { return showLives_; }
+
+        private:
+            Hover* hoverGame_;
+            int totFlags_;
+            bool showLives_;
+    };
+}
+#endif /* _FlagsAndLivesHUD_H__ */
Index: /code/branches/tgidronFS16/src/modules/hover/Hover.cc
===================================================================
--- /code/branches/tgidronFS16/src/modules/hover/Hover.cc	(revision 11170)
+++ /code/branches/tgidronFS16/src/modules/hover/Hover.cc	(revision 11171)
@@ -40,4 +40,5 @@
 #include "core/CoreIncludes.h"
 #include "gamestates/GSLevel.h"
+#include "HoverShip.h"
 
 #include "pickup/PickupSpawner.h"
@@ -57,4 +58,5 @@
         level = 1; //start at level 1
         flagsTaken = 0;// took 0 flags in the beginning
+        lives = 3;
 
         numCells = 0;
@@ -132,4 +134,8 @@
                 pickupSpawners_.push_back(pickupSpawner);
             }
+             //If no lives are left, end game
+            if(lives <= 0){
+                GSLevel::startMainMenu();
+            }
 
             orxout() << this->origin_->getPickupTemplate() << endl;
@@ -153,8 +159,13 @@
             for (int i = 0; i<5; i++)
             {
-                PickupSpawner* pickup = new PickupSpawner(origin_->getContext());
-                //PickupSpawner->setPosition(rand()%numCells, rand()%numCells, cellSize);
-                //pickup->createDroppedPickup(this->getContext(), pickup , this, 5);
-                pickupSpawners_.push_back(pickup);
+                PickupSpawner* pickupSpawner = new PickupSpawner(origin_->getContext());
+
+                pickupSpawner->setPosition(get3dCoordinates(rand()%numCells, rand()%numCells, 10.0f));
+                pickupSpawner->setPickupTemplateName(origin_->getPickupTemplate());
+                pickupSpawner->setMaxSpawnedItems(5);
+                pickupSpawner->setRespawnTime(30);
+                pickupSpawner->setTriggerDistance(5);
+                // Add pickup spawner to the pickup spawner list
+                pickupSpawners_.push_back(pickupSpawner);
             }
 
@@ -185,4 +196,8 @@
         }
         numberOfFlags_ = flags_.size();
+
+        if(lives <= 0){
+                GSLevel::startMainMenu();
+            }
     }
 
@@ -198,3 +213,10 @@
         return Vector3(x*cellSize*1.0f + cellSize/2, heightOffset, y*cellSize*1.0f + cellSize/2);
     }
+
+    void Hover::costLife()
+    {
+        lives--;
+        if (lives <= 0)
+            GSLevel::startMainMenu();
+    }
 }
Index: /code/branches/tgidronFS16/src/modules/hover/Hover.h
===================================================================
--- /code/branches/tgidronFS16/src/modules/hover/Hover.h	(revision 11170)
+++ /code/branches/tgidronFS16/src/modules/hover/Hover.h	(revision 11171)
@@ -37,4 +37,5 @@
 
 #include "HoverPrereqs.h"
+#include "HoverShip.h"
 
 #include <vector>
@@ -60,4 +61,5 @@
             void levelUp();
             void endLevel();
+            void costLife();
 
             inline int getNumberOfFlags() const
@@ -66,5 +68,12 @@
             virtual Vector3 get3dCoordinates(int x, int y, float heightOffset);
 
+            inline int getTotFlags() const
+                { return this->totFlags; }
+
+            inline int getLives() const
+                { return this->lives; }
+
         private:
+
             WeakPtr<HoverOrigin> origin_;
             std::vector<HoverFlag*> flags_;
Index: /code/branches/tgidronFS16/src/modules/hover/HoverShip.cc
===================================================================
--- /code/branches/tgidronFS16/src/modules/hover/HoverShip.cc	(revision 11170)
+++ /code/branches/tgidronFS16/src/modules/hover/HoverShip.cc	(revision 11171)
@@ -33,4 +33,5 @@
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
+#include "Hover.h"
 //#include "NewHumanController.h"
 
@@ -122,3 +123,19 @@
         }
     }
+
+    Hover* HoverShip::getGame()
+    {
+        if (game == nullptr)
+        {
+            for (Hover* hover : ObjectList<Hover>())
+                game = hover;
+        }
+        return game;
+    }
+
+    void HoverShip::death()
+    {
+        getGame()->costLife();
+        SpaceShip::death();
+    }
 }
Index: /code/branches/tgidronFS16/src/modules/hover/HoverShip.h
===================================================================
--- /code/branches/tgidronFS16/src/modules/hover/HoverShip.h	(revision 11170)
+++ /code/branches/tgidronFS16/src/modules/hover/HoverShip.h	(revision 11171)
@@ -34,4 +34,5 @@
 
 #include "HoverPrereqs.h"
+#include "Hover.h"
 
 #include "worldentities/pawns/SpaceShip.h"
@@ -69,5 +70,10 @@
             virtual void boost(bool bBoost) override;
 
+        protected:
+            virtual void death() override;
+
         private:
+            Hover* getGame();
+            WeakPtr<Hover> game;
             float jumpBoost_;
             bool isFloor_;
Index: de/branches/tgidronFS16/src/modules/hover/TotFlagsHUD.cc
===================================================================
--- /code/branches/tgidronFS16/src/modules/hover/TotFlagsHUD.cc	(revision 11170)
+++ 	(revision )
@@ -1,77 +1,0 @@
-/*
- *   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:
- *      Tomer Gidron
- *
- */
-
-#include "TotFlagsHUD.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "util/Convert.h"
-
-namespace orxonox
-{
-    RegisterClass(TotFlagsHUD);
-
-    TotFlagsHUD::TotFlagsHUD(Context* context) : OverlayText(context)
-    {
-        RegisterObject(TotFlagsHUD);
-
-        this->hoverGame_ = nullptr;
-        this->totFlags_ = 0;
-    }
-
-    void TotFlagsHUD::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(TotFlagsHUD, XMLPort, xmlelement, mode);
-
-        XMLPortParam(TotFlagsHUD,"showPoints", setShowTot, getShowTot, xmlelement, mode);
-    }
-
-    void TotFlagsHUD::tick(float dt)
-    {
-        SUPER(TotFlagsHUD, tick, dt);
-
-            const std::string& points = multi_cast<std::string>(this->DodgeRaceGame->getPoints());
-                setTextSize(0.04);
-                setPosition(Vector2(0.14, 0.02));
-                this->setColour(ColourValue(1, 1, 1, 1));
-                this->setCaption(points);
-            
-    }
-
-    void TotFlagsHUD::changedOwner()
-    {
-        SUPER(TotFlagsHUD, changedOwner);
-
-        if (this->getOwner() && this->getOwner()->getGametype())
-        {
-            this->TotFlagsHUD = orxonox_cast<Hover*>(this->getOwner()->getGametype());
-        }
-        else
-        {
-            this->DodgeRaceGame = nullptr;
-        }
-    }
-}
Index: de/branches/tgidronFS16/src/modules/hover/TotFlagsHUD.h
===================================================================
--- /code/branches/tgidronFS16/src/modules/hover/TotFlagsHUD.h	(revision 11170)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- *   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:
- *      Cyrill Burgener
- *
- */
-
- /**
-    @file TimeHUD.h
-    @brief Declaration of the TimeHUD class.
-*/
-
-#include "HoverPrereqs.h"
-
-#include "tools/interfaces/Tickable.h"
-#include "overlays/OverlayText.h"
-
-namespace orxonox
-{
-    class _HoverExport TotFlagsHUD : public OverlayText, public Tickable
-    {
-        public:
-            TotFlagsHUD(Context* context);
-
-            virtual void tick(float dt) override;
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
-            virtual void changedOwner() override;
-
-            /// sets TOTAL flags taken
-            inline void setShowTot(int totFlags)
-                { this->totFlags_ = totFlags; }
-            /// returns total flags >=0
-            inline int getShowTot() const
-                { return this->totFlags_; }
-
-
-        private:
-            Hover* hoverGame_;
-            int totFlags_;
-    };
-}
-#endif /* _TimeHUD_H__ */
