A simple monster spawner.

I just need a simple monster spawner, as it says in the title.

One that i can attach to an object and it will spawn a monster every 2 seconds or so, none of this fancy random spawner stuff.

Im making a survival game on an island and would like 4 spawners situated in the ‘corners’ of the map. so a simple script which i could attatch to a, e.g. cube.

Thanks in advance for any help.

go to this link:

http://unity3d.com/support/documentation/ScriptReference/GameObject.GetComponent.html

What you need to do is instantiate a gameObject from the spawner position. I’m not 100% certain on the code but I think it’s instantiate(objName,transform.position.x,transform.position.y,transform.position.z). You would also want this to be time based I will work on a script and post it asap.