- Home /
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.
Answer by agentperrys · May 18, 2012 at 10:14 PM
go to this link:
http://unity3d.com/support/documentation/ScriptReference/GameObject.GetComponent.html
Answer by Ranger_Steve · May 18, 2012 at 10:14 PM
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.
Your answer
![](https://koobas.hobune.stream/wayback/20220613071646im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Outpost door animation not triggered on collision 1 Answer
getting udp package info inside unity (GlovePIE) 0 Answers
Would like a function to change a parameter once, after an "if" statement has been met. 1 Answer
Pressing "Fire2" Spawns and removes object on click 0 Answers
Connecting an object to 2 others 1 Answer