User:Kashaunzilla

Have your ever wanted to make a game when enimies start to spawn out of something when you want them too? Well here is your solution. Just make this Js script (Java) and copy what i put down.

hot to use it * Create a sphere (or gameObject), remove sphere collider. Then create a empty gameObject. Put the sphere as the child of the gameObject. Rename the sphere "spawnPoint". Once you do that attach the cript to the empty gameObject and thats how you set the script up, goo luck. (copy script by typing not by "copy" and "paste")

var bullitPrefab:Transform; var savedTime=0;

function Update {    var seconds : int = Time.time; var oddeven = (seconds % 2); if(oddeven) {	    Shoot(seconds); } }

function Shoot(seconds) {    if(seconds!=savedTime) {		 var bullit = Instantiate(bullitPrefab, gameObject.Find("spawnPoint").transform.position, Quaternion.identity); savedTime=seconds; } }