Good day everyone…newbie here…i am having a hard time on what to do in my project…
i am creating a guess a word game… my problem is…i cant figure out how to show “letters” in a cube. only one letter by cube…
i cant figure out how Script should be…this is my script…
please let me know what to do…
function FixedUpdate(){
if(Input.GetKeyDown("a")){
print("letter A");
box1.gameObject.SetActive(true);
letterA.gameObject.SetActive(true);
//audio.Play();
}
else if (Input.GetKeyDown("b")||(Input.GetKeyDown("c"))){
letterB.gameObject.SetActive(false);
letterC.gameObject.SetActive(false);
print("No Letter");
//audio.Play();
}
this script is save in box1(cube)…I dont know how to Script GetComponent and SetActive(false) if there is no Letter (i.e “b” , “c”) =(
box1=active
box2=active…box5=active
(because it is 5 letters in the Word)
the porblem is…everytime i “h” and “e”
in one box there is two letter…they are not separted…>.< I cant figure it out…please do help me…thanks in advance!