Index: code/branches/SOBv2_HS17/data/levels/SOB.oxw
===================================================================
--- code/branches/SOBv2_HS17/data/levels/SOB.oxw	(revision 11572)
+++ code/branches/SOBv2_HS17/data/levels/SOB.oxw	(revision 11573)
@@ -64,6 +64,18 @@
 	</Template> 
 
-
-
+					<!--Test Fireball-->
+
+
+	<Template name=fireball>
+		<SOBFireball collisionType="dynamic" speed=80>
+			<attached>
+				<Model mesh="planets/sol.mesh" position="0,0,0" scale=3 pitch=90/> 
+				
+			</attached>
+			<collisionShapes>
+				<SphereCollisionShape position="0,0,0" halfExtents="5,5,5" /> 			
+			</collisionShapes>
+		</SOBFireball>
+	</Template>
 
 
@@ -99,17 +111,4 @@
 			</MovableEntity>
 
-					<!--Test Fireball-->
-
-
-
-					<SOBFireball collisionType="dynamic" speed=80 position = "10,0,40">
-						<attached>
-							<Model mesh="planets/sol.mesh" position="0,0,0" scale=3 pitch=90/> 
-							
-						</attached>
-						<collisionShapes>
-							<SphereCollisionShape position="0,0,0" halfExtents="5,5,5" /> 			
-						</collisionShapes>
-					</SOBFireball>
 
 
Index: code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc
===================================================================
--- code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc	(revision 11572)
+++ code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc	(revision 11573)
@@ -45,4 +45,5 @@
 #include "SOBFlagstone.h"
 #include "SOBCastlestone.h"
+#include "SOBFireball.h"
 #include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
 
@@ -83,4 +84,8 @@
         reachedLvlEndState_ = 0;
 
+        //Properties of fireing Fireballs, NOTE! fireballs are fired with the moveUP Key, not with the fire key
+        fireallowed_=true;
+        firecooldown_=0;
+
         
         setAngularFactor(0.0); //Means player doesn't turn on collision, so he doesn't fall over while walking over the ground
@@ -110,5 +115,4 @@
             SOBGame->addMushroom(); // Tell the gametype to increase points
             mush->hasCollided_ = true; // needed because of destroyLater takes some time and player should receive points only once
-
 
             // now, change the clothes of the Figure to red
@@ -180,4 +184,20 @@
 }
 
+//Function to spawn the Fireball
+void SOBFigure::spawnFireball() {
+        SOBCenterpoint* center_ = ((SOB*)getGametype())->center_;
+
+         SOBFireball* ball = new SOBFireball(center_->getContext());
+         Vector3 spawnpos = this->getWorldPosition();
+         spawnpos.z += 0;
+
+        if (ball != nullptr && center_ != nullptr)
+        {
+            ball->addTemplate("fireball");
+            ball->setPosition(spawnpos);
+            
+        }
+     }
+
 //For those of you who don't have an idea: the tick function is called about 50 times/sec
 void SOBFigure::tick(float dt)
@@ -295,4 +315,21 @@
         }
 
+        //If moveUp pressed, fire a fireball
+        if(moveUpPressed_ && gotPowerUp_ && fireallowed_)
+        {
+            spawnFireball();
+            fireallowed_=false;
+            firecooldown_=0;
+        }
+
+        //Increase the firecooldown
+        if(firecooldown_>0.5)
+        {
+            fireallowed_=true;
+        }
+        if(!fireallowed_)
+        {
+            firecooldown_+=dt;
+        }
 
         //Again another EndOfLevel behavior
Index: code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.h
===================================================================
--- code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.h	(revision 11572)
+++ code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.h	(revision 11573)
@@ -47,4 +47,5 @@
             virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
             void changeClothes(std::string& name);
+            void spawnFireball();
 
             bool dead_;
@@ -55,4 +56,5 @@
 
             //Soooo many declarations
+            bool fireallowed_;
             bool gotPowerUp_;
             bool moveUpPressed_;
@@ -64,4 +66,5 @@
             float timeSinceLastFire_;
             float lastSpeed_z;
+            float firecooldown_;
             SOBCenterpoint* sobcenterpoint;
             float pitch_;
Index: code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc
===================================================================
--- code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc	(revision 11572)
+++ code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc	(revision 11573)
@@ -67,5 +67,4 @@
         collDisX_ = 0;
         collDisZ_ = 0;
-        hitCounter_ = 0;
 
       orxout() << "fireball existed" << endl;
@@ -121,6 +120,4 @@
         }
 
-        hitCounter_++;
-
         
         return true;
Index: code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.h
===================================================================
--- code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.h	(revision 11572)
+++ code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.h	(revision 11573)
@@ -64,5 +64,4 @@
             bool hasCollided_;
         protected:
-            int hitCounter_; //counts how many times the floor was hit, ball gets deleted if has hit the floor 3 times 
             float gravityAcceleration_;
             float speed_;
