- Home /
 
               Question by 
               risinghell09 · Apr 03, 2013 at 02:49 PM · 
                assetloadlevelload levelhealth  
              
 
              How can I load a level when health depletes to 0?
I bought a simple health script from the Unity Asset Store, and it's good except I want it to load a level when the players health depletes to zero. The asset has poison which will deplete a heart and health packs which will add another heart. How can I make it so that when there are no hearts left, the scene reloads the level? Can someone please help me?!
               Comment
              
 
               
              Answer by AlucardJay · Apr 03, 2013 at 03:39 PM
 if ( health < 0 )
 {
     Application.LoadLevel( "NextLevelHere" );
 }
http://docs.unity3d.com/Documentation/ScriptReference/Application.LoadLevel.html
Your answer
 
 
             Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Make sure levels assets are loaded before switching? 1 Answer
Can't get simple script to work? 4 Answers
C# add helth over time 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                