Hey basically i have an object creation script that creates objects at a random x and y position every 10 seconds(changable)
var Occurence = 3;
var Block : GameObject;
var time = 0.0;
function Update() {
if(Time.deltaTime * 1 && Time.time > time){
time = Time.time + Occurence;
var position: Vector3 = Vector3(Random.Range(-53.0, 53.0), 80, Random.Range(-1.5, -1.5));
Instantiate(Block, position, Random.rotation);
}
}
it works perfectly except that i want it to make the objects faster as the level goes on for a harder game. If you have ever played the ds game Meteos, that is kinda what i am looking for.
Hey thanks for answering but if i did time.timeScale increase, it would speed up everythin else in the game too. I tried this instead, i think it works.
var Occurence = 3;
var Block : GameObject;
var time = 0.0;
var timeIncrease = .1;
function Update() {
// if the time in seconds is faster than the time(always will be) then the time will be the the
//time plus the occurnce time minus the timeIncrease to make a faster rain.
if(Time.deltaTime * 1 && Time.time > time){
time = Time.time + Occurence - timeIncrease;
var position: Vector3 = Vector3(Random.Range(-53.0, 53.0), 80, Random.Range(-1.5, -1.5));
Instantiate(Block, position, Random.rotation);
}
}
Basically i took how fast in seconds they were appearing and subtracted it by how fast i want it to speed up.