If I want, say a level, to load when I destroy 3 objects, how would I scrip that?
I already have this:
var target : Transform;
Function Update(){
if(target == null){
Application.LoadLevel("LevelName");
}
}
If I want, say a level, to load when I destroy 3 objects, how would I scrip that?
I already have this:
var target : Transform;
Function Update(){
if(target == null){
Application.LoadLevel("LevelName");
}
}
var targetOneDead = false;
var targetTwoDead = false;
var targetOne : Transform;
var targetTwo : Transform;
Function Update()
{
if(targetOneDead == true && targetTwoDead == true)
{
Application.LoadLevel("LevelName");
}
}
Then just set these to true when the appropriate critter is dead.