Here is my shooting script.....
var Bullet : Transform;
function Update () {
if (Input.GetButton ("Fire1")){
var bullet = Instantiate(Bullet,GameObject.Find("BulletSpawn").transform.position,Quaternion.identity);
bullet.rigidbody.AddForce(transform.forward *2000);
Destroy(bullet.gameObject, 2);
}
}
Im new to javascript and I'm trying to learn it. Since I have Input.GetButton its automatic fire, but its way to fast. Can somone show me how to creat a variable in the inspector; in the script, so I can change the Rate of Fire speed for different guns?? Thank you for the time.