Hi,I just start my journey of learning Unity I want to make my plane shoot rockets I build a rocket prefab and test the script,everything is fine then I edit my plane's script to this using UnityEngine; using System.Collections; public class Player : MonoBehaviour { protected Transform m_transform; // Use this for initialization void Start () { m_transform = this.transform; } public float mspeed = 1; public Transform m_rocket; // Update is called once per frame void Update () { //Vertical Move float movev = 0; //Horizontal Move float moveh = 0; if (Input.GetKey (KeyCode.UpArrow)) { movev -= 6 * mspeed * Time.deltaTime; } if (Input.GetKey (KeyCode.DownArrow)) { movev += 6 * mspeed * Time.deltaTime; } if (Input.GetKey (KeyCode.LeftArrow)) { moveh += 6 * mspeed * Time.deltaTime; } if (Input.GetKey (KeyCode.RightArrow)) { moveh -= 6 * mspeed * Time.deltaTime; } this.m_transform.Translate (new Vector3 (moveh, 0, movev)); float m_rocketRate = 0; m_rocket += Time.deltaTime; if ( m_rocketRate <= 0) { m_rocketRate = 0.1f; if (Input.GetKey (KeyCode.Space) || Input.GetMouseButton (0)) { Instantiate ( m_rocket, m_transform.position, m_transform.rotation); } } } Everything was okay until I add this m_rocket += Time.deltaTime; if ( m_rocketRate <= 0) { m_rocketRate = 0.1f; the Unity console say that there is parsing error but I cant find anyone I've been stared at the screen for 30 minutes Need help!! plz Thanks
My whole post is a link to a thread that explains how to use it. Sometimes the forum doesn't show it properly as a link, but click it and it will work.