Quantcast
Channel: Latest Questions by GraviterX
Viewing all articles
Browse latest Browse all 122

Scripting Errors

$
0
0
Hey all. I'm getting these errors in my C Sharp script: 1) (10,25): error CS0103: The name `FindGameObjectsWithTag' does not exist in the current context 2) (11,17): error CS0103: The name `killerDoor' does not exist in the current context 3) (12,17): error CS0103: The name `killerDoor' does not exist in the current context I'm trying to make it so this script decides from 4 doors the door that will kill the player when clicked at random. How can I fix this? The script: using UnityEngine; using System.Collections; public class DoorManager: MonoBehaviour { public GameObject [] doors; void Start() { doors = FindGameObjectsWithTag( "door" ); killerDoor = doors [ Random.Range ( 0, doors.Length ) ]; killerDoor.GetComponent().killDoor = true; } }

Viewing all articles
Browse latest Browse all 122


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