I’m making a zombie apocalypse game and I got the error message when I was trying to make a zombie spawner: Assets/Scripts/‘Spawner’.js(16,10): BCE0089: Type ‘Spawner’ already has a definition ‘Start()’. The exact line of code is:
function Start()
All of the code is:
#pragma strict
function Start () {
}
function Update () {
} // The object to be spawned
var SpawnObject : GameObject;
// in seconds
var SpawnStartDelay : float = 0;
var SpawnRate: float = 5.0;
function Start()
{
InvokeRepeating("Spawn", SpawnStartDelay, SpawnRate);
}
// Spawn the SpawnObject
function Spawn()
{
Instantiate(SpawnObject, transform.position, transform.rotation);
}
(I copied the code from here:http://www.instructables.com/id/Intro-to-Unity/step11/Spawning-Zombies/)
Sorry if the answer is really simple i’m kinda new to unity.
Thanks in advance:)