- Home /
Enter a specific word script
Hi!
I want to make it so that when it pops up a message on the screen at a set time or something
the player has to write it, I don't know what it's called but you get my drift, I was thinking something like:
var testMaterials : Material[];
var tOn : boolean;
var eOn : boolean;
var sOn : boolean;
var tOn2 : boolean;
function Start() {
renderer.sharedMaterial = materials[0];
var tOn = true;
var eOn = false;
var sOn = false;
var tOn2 = false;
}
function Update() {
if(tOn && Input.GetKeyDown(KeyCode.T)) {
renderer.sharedMaterial = materials[1];
eOn = true;
tOn = false;
}
if(eOn && Input.GetKeyDown(KeyCode.E)) {
renderer.sharedMaterial = materials[2];
sOn = true;
eOn = false
}
//... and so on
}
You see where I'm going with this, I want it to change material or
something like that so the text highlights or the letters I have entered
highlights/changes color. This is an awful way to do it, so if you have any suggestions
to other ways of doing it, that would be great :)
Your answer
Follow this Question
Related Questions
Changing Color of Material with Bool and Unity UI 1 Answer
Material Color only changes when expanding material tab in inspector. 2 Answers
Does anyone know about BeingChangeCheck function? 0 Answers
Question about calling functions from other scripts. 0 Answers
Use of boolean functions in c# 1 Answer