Hello, what I want to do is that I can spawn objects every x amount of seconds with button (Spawning is not enabled while waiting for the seconds to pass)
Here is my current script:
var objectsToSpawn : Transform[];
var spawnPoint : Transform;
function Update() {
if (Input.GetKeyDown("t")){
Instantiate (objectsToSpawn[(Random.Range(0, objectsToSpawn.Length))], spawnPoint.position, Random.rotation);
}
}
The GUI box with the counting seconds and with telling me how much times can I use a spawn would be also cool
Something like if x amount of seconds is passed, spawn times +1.
Thanks!