hey,im trying to shot from broadside.i have script in empty gameobject that shot and reload but if i use the script multiple gun,when i shoot all the ball goes same time. i wanna make shot cannons with order (like shot all cannons in 2 second with in random time each other)
add yield WaitForSeconds (Random.Range(0.0f,0.5f)); before bullet instantiation script.
function FireOneBullet ()
{
yield WaitForSeconds (Random.Range(0.0f,0.5f));
var projectile = Instantiate(Bullet,transform.position,transform.rotation);projectile.GetComponent.<Rigidbody>().AddForce(transform.right * 1000);//cannon's x axisPhysics.IgnoreCollision(projectile.collider, collider);
// var Bullet = Instantiate(Bullet, FirePoint.transform.position, transform.rotation);
Ammo --;
if(Ammo < MaxAmmo && Bullets > 0)
{
reloading = true;
}
}