- Home /
Question by
073367 · Aug 22, 2012 at 09:57 PM ·
fire script
in got a good fire script (finally) but it fires automatic i just want single fire (semi auto) any suggestions to add or delete parts to my script?
script
var projectile : Rigidbody; var speed = 1;
function Update () {
if ( Input.GetButton ("Fire1")) {
clone = Instantiate(projectile,transform.position,transform.rotation); clone.velocity = transform.TransformDirection( Vector3 (0, 0, 100));
Destroy (clone.gameObject, 3); }}
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
My health decreases to fast. 1 Answer
Helpppp - AnimationState.layer ?????? -1 Answers
How to add colliders to Tron Like Trail 0 Answers
Camera Auto-Align with the nearest object with a determinated tag 0 Answers