Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Where did I go wrong In this script? It seems that whenever I left click , nothing happens. Not even the bool is checked.

$
0
0
Tis in the title. Here is the script: #pragma strict var Combo1 : boolean; var pipe : GameObject; var mainCam : GameObject; var mainCam2 : GameObject; var m9 : GameObject; function Start () { pipe.GetComponent.().Play("Ready"); } function Update () { if (Input.GetKey("2")) { Switch(); } if (Input.GetButton("Fire1") && (!!Combo1)) { pipe.GetComponent.().Play("Swing"); yield WaitForSeconds(0.5); Combo1 = true; yield WaitForSeconds(0.5); Combo1 = false; } if (Input.GetButton("Fire1") && (!Combo1)) { pipe.GetComponent.().Play("Swing2"); } } function Switch() { pipe.GetComponent.().Play("Rest"); yield WaitForSeconds(0.3); m9.active = true; pipe.active = false; } The animations disable scripts themselves at certan keyframes. THIS IS USING UNITY 5 SCRIPT. It will be different from Unity4

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>