Hello ladies and gentlemen.
I have been struggling with a slight problem in regards to my javascript
I am currently trying to simply create an array of 3 objects (or 3 different enemies)
and have them spawn randomly from the same spawn point but the answer to said problem seems to be eluding me, please forgive my incompetence.
#pragma strict
var HazardArray : GameObject[];
var spawnLocation : Transform;
function Start () {
}
function Spawnpoint()
{
var enemies : int = HazardArray.length;
Instantiate(enemies[HazardArray], spawnLocation.position, Quaternion.identity);
}
Thankyou in advance for an assistance you can offer on the matter
Kind regards