Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

BCE0043: Unexpected token: }.

$
0
0
private var canWallJump : boolean=false; private var canWallJumpTime : float=0; private var canWallJumpDir : Vector3 = Vector3.zero; private var lastDirection : Vector3; function OnCollisionEnter(hit : Collision) { if(controller.isGrounded == false){ for (var contact : ContactPoint in collision.contacts) { if(hit.collider.gameObject.tag == "Wall"){ canWallJump = true; canWallJumpTime = Time.time; canWallJumpDir = Vector3.Scale(Vector3(-1,0,-1), lastDirection); } } } } function Update() { if(Time.time - canWallJumpTime > 0.25) canWallJump = false; if(Input.GetButtonDown ("Jump") ("canWallJump")) } // calculate movement and apply it to the controller if(Vector2(movement.x, movement.z).magnitude > 0.001) lastDirection = movement; } I want to create a Parkour game with Wall jumps and I tried this script But if I save the script there comes this error: BCE0043: Unexpected token: }. Can you help me?

Viewing all articles
Browse latest Browse all 7934

Trending Articles