I’ve been trying to create a wave effect for my game, so at certain times waves will spawn at specified places… (think side scrolling shooter)
I did have colliders working doing the same job, but they’re not ideal for this type of game, and inturn I tried to code a time script so that i can spawn prefabs at locations at certain times…
var wave2 :GameObject;
var wave3 :GameObject;
function Update () {
if(Time.time == 5.0) {
var wave2spawn = Instantiate(wave2, Vector3(-0.9712, 2, -11), Quaternion.identity);
}
if(Time.time == 10.0) {
var wave3spawn = Instantiate(wave3, Vector3(1.237, 2, -9), Quaternion.identity);
}
}
Again, i’ve probably made fundamental errors, but its difficult to leanr without being taught!