- Home /
 
               Question by 
               RamboPanda · Sep 05, 2011 at 06:27 AM · 
                iosiphone  
              
 
              Triggering not working for iOS
Hello. I'm trying to get my player to win by going through a cube and if time is below 60 secs, the "Win" level will be activated. It works on the PC but not on the iPhone. What should I do?
Here's the script:
 var levelGoal: GameObject;
 var levelCompleteSound: AudioClip;
 
 var mainCamera: GameObject;
 var otherScript : Countdown;
 
 private var playerLink: GameObject;
 
 function OnTriggerEnter () 
 {
     Invoke("thescore",0);
     if(otherScript.restSeconds > 0)
     {
     LevelCompleted();
     }
 }
 
 
 
 
 function LevelCompleted()
 {
 mainCamera.GetComponent(AudioListener).enabled = false;
 mainCamera.active = true;
 mainCamera.GetComponent(AudioListener).enabled = true;
 
 if (levelCompleteSound)
 {
 AudioSource.PlayClipAtPoint(levelCompleteSound, levelGoal.transform.position,
 2.0);
 }
 
 
 Application.LoadLevel("Win"); 
 }
Thank you. :)
               Comment
              
 
               
              Here the trigger is entered some where the trigger must be exit.i think in script the trigger is entered but not exit ed.so that is the problem i think.
Okay I just tried it. It works! Thank you so much!! :D
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                