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

Parsing error CS8025

$
0
0
Need to add a script so that a character in my project talks when a user clicks on it. Unity is saying I have a parsing error CS8025. here is my script using UnityEngine; using System.Collections; public class HannahVoice : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { } } var papers : int = 0; var papersToWin = 5; var distanceToPaper : float = 2.5; public var paperPickup : AudioClip; function Start () { Screen.lockCursor = true; } function Update () { if(Input.GetMouseButtonDown (0) || Input.GetKeyDown (KeyCode.E)) { var ray = Camera.main.ScreenPointToRay(Vector3(Screen.width * 0.5, Screen.height * 0.5, 0.0)); var hit : RaycastHit; if(Physics.Raycast(ray, hit, distanceToPaper)) { if(hit.collider.gameObject.name == “Casual_08___Stand”) { papers += 1; GetComponent.().PlayClipAtPoint(paperPickup, transform.position); } } } } I am very new to this, any help is vastly appreciated

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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