I am making a simple FPS and I want to transfer the player to the next level (scene) after all of the enemies are eliminated. How am I supposed to do this? I am a beginner to Unity, and I only understand a very basic Idea of scripting. Please tell me the script, and where, or how, to put it.
Thank You SO MUCH in advance!
asked Apr 03 '11 at 07:22 AM
UNKNOWN or whatever
You could make use of a game controller to count the number of enemies in your scene by having them register with the controller when they enable and unregister when they disable. When you reach a count of 0, you can load a new level.
To do this, find or create an empty game object in your scene tagged GameController (by default, there is none).
On this game object with the tag GameController, add the following ObjectivesManager.
Then, on every enemy you should have code like this. You want to let the controller know that an objective was enabled and disabled at key moments.
answered Apr 03 '11 at 11:53 AM
not certain this will work as I'm away from unity at the moment but basically it finds all the gameobjects with the tag "enemy", if it doesn't find any then you can put in a script to change the scene
hopefully its useful
answered Apr 03 '11 at 09:02 AM