Hi, i am having a problem, i currently have the script below that shoots a projectile (it is semi-automatic). i know how to change it to automatic, just change the GetButtonDown to GetButton, but that it too fast for what i want, please can you help me change the fire rate (preferably using a variable) so that it shoots automaticly but for the fire rate to be around 0.5.
thanks
var projectile : Rigidbody;
var speed = 20;
function Update()
{
if( Input.GetButtonDown( "Fire1" ) )
{
var instantiatedProjectile : Rigidbody = Instantiate(projectile, transform.position, transform.rotation );
instantiatedProjectile.velocity = transform.TransformDirection( Vector3( 0, 0, speed ) );
Physics.IgnoreCollision( instantiatedProjectile. collider, transform.root.collider );
}
}