- Home /
Question by
guy · Oct 13, 2010 at 05:13 PM ·
errorsyntax-errorairplane
whats wrong with my airplane script
can anyone tell me whats wrong with my air plane script it dose not move and it dose not shoot it dose nothing if you find an error can you try to correct it and tell me what i did wrong thanks
code:
var throttleSpeed = 30.0; var turnleftSpeed = 20.0; var liftSpeed = 20.0; var desendSpeed = 20.0; var turnrightSpeed = 20.0; var misselPrefab: transform; private var speed : float = 0.0;
function update(){
if(Input.GetButtonDown("shoot"))
{
var missel = Instantiate(misselPrefab,
Gameobject.Find("spawnPoint").transform.position,
Quaternion.identity);
}
if(GetButton("Lift"))
{
transform.position += transform.forward * liftSpeed * Time.deltaTime;
}
if(GetButton("Desend"))
{
transform.position += transform.forward * desendSpeed * Time.deltaTime;
}
if(GetButton("turnleft"))
transform.position += transform.forward * turnleftSpeed * Time.deltaTime;
}
Comment
Tag fail. In the future please try to use more descriptive tags. 'with' and 'my' are meaningless.
Your answer
Follow this Question
Related Questions
Unexpected Token: Collider. 1 Answer
What does BCE0004: Ambiguous reference error mean? 3 Answers
Compile Errors for Script 1 Answer
Lerpz tutorial multiple errors.HELP!!!! 4 Answers