I’m trying to make a clone of these arcade games where you need to hit some object that appears(sorry for my shitty explanation) this img shows better what I’m trying to do:
I’ve made this code to control the holes:
#pragma strict
var bunny:GameObject;
var white:GameObject;
var grey:GameObject;
var rabbitID:int=0;//Indicates witch rabbit will appear
function Start () {
}
function Create()
{
//Choose a number
rabbitID=Random.Range(0,2);
if(rabbitID==0)
{
bunny=white;
}
else if(rabbitID==1)
{
bunny=grey;
}
//Creates the rabbit the code chose
Instantiate(bunny,transform.position,transform.rotation);
}
InvokeRepeating("Create",0.1,20);
function Update () {
}
However instead of getting out of the holes in the defined time,they’re getting out randomly,not randomly actually but too fast,even if I put more time in the InvokeRepeating.
Thanks For the help:mrgreen:
