var Bullet : Transform; // place bulletPrefab here.
function Update ()
{
if(Input.GetButtonDown("Jump"))
{
Instantiate(Bullet,gameObject.Find("SpawnPoint").transform.position,Quaternion.identity);
Bullet.rigidbody.AddForce(transform.forward * 1000);
// your bullet needs a rigidbody attached. It is as simple as:
Bullet.rigidbody.AddForce(transform.forward * 1000);
// This adds force to the variable, bullet.
}
}
I'd use the script from the FPS tutorial to spawn projectiles, and if you don't want player input i'd comment out the if statement in the playerweapons script and use that + the rocketlauncher/machinegun sripts.