Add enemys and spawn


Can I have help? How do I insert an enemy and it’s spawn points into my game? The FPS tutorial package version lags my game. I would like the enemy to shoot.

This may be of help, It is the one I’m using in my own game. It will spawn a single enemy, and that enemy will remain in play until it is destroyed. It will have a 25% chance of spawning at one of the pre defined spawn points every ten seconds.

var TheWraith : GameObject;

var Spawnpositions : GameObject[];

var WraithinPlay : GameObject;

private var numb : int = 0;


function checkit () {

	if(WraithinPlay == null){
		numb = Random.Range(0,101);
		if(numb < 25){


function Spawnit(){

X = Random.Range(0,Spawnpositions.Length+1);

	WraithinPlay = Instantiate(TheWraith,Spawnpositions[X].transform.position,Spawnpositions[X].transform.rotation);


As for the shooting part, you may have to look elsewhere.