Basically what I am trying to achieve is spawn an object at an interval of 1-2 minutes and also increase that interval in time; let's say after 30 minutes of play the interval between the spawns to be increased to 3-4 minutes. Here's the wee code I came up to (incomplete) - and this doesn't even do the first part of the job :)
var BonusLifeTarget : Transform;
function FixedUpdate () {
BonusLifeSpawn();
}
function BonusLifeSpawn(){
yield WaitForSeconds (Random.Range(10, 100)) ;
Instantiate (BonusLifeTarget);
}
Any suggestion is very much appreciated (or links to some learning)
↧