hi so i have a decision level where you need to pick between 2 doors, the door costs 320$, i can’t seem to figure out how to write the script i did write this but something about the int is wrong any help would be appreciated
using UnityEngine;
using System.Collections;
public class Door1 : MonoBehaviour {
public GUI amount;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void OnTriggerStay (Collider Door) {
if(Input.GetKeyDown("b") && amount>319){
Application.LoadLevel("test");
}
}
}