- Home /
how to load level when your enemy health gets to 0
I want to load my main menu when my enemy health gets to 0
here's the code for my enemy health
 private void HandleAnswer(int answer) {
  
          if (answer == 1)
         {
  
          ShowIncorrect = false;
                         ShowCorrect = true;
          Poop = false;
  
          animation.PlayQueued("Wrong answer",QueueMode.PlayNow);  
         Enemy.animation.PlayQueued("ENMattck",QueueMode.CompleteOthers);
          NextQuestion(); 
        }
  
         else { 
          ShowIncorrect = true;
           ShowCorrect = false;
          Poop = false;
  
  
          animation.PlayQueued ("Wrong answer",QueueMode.PlayNow);  
          Enemy.animation.PlayQueued("ENMattck", QueueMode.CompleteOthers);
 
 //okay so i want to put the code here
 //so when my enemy hp go 0 my main menu will load
 //Application.LoadLevel("MainMenu");
  
        }
     }
 
               Comment
              
 
               
              BurgZerg meets yourHomeWork.
This is how do I get variable A from script A in script B, which has been asked a million times.
 
               Best Answer 
              
 
              Answer by getyour411 · Feb 12, 2014 at 02:45 AM
http://lmgtfy.com/?q=unity3d+getcomponent+from+other+gameObject
http://answers.unity3d.com/questions/7555/how-do-i-call-a-function-in-another-gameobjects-sc.html
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                