- Home /
GUI.label this my script doesn't work.
Hello. I want to make story telling script. and image sentence per 5seconds. but this script image only first sentence. what shold I do?
pragma strict
var a:boolean; var b:boolean; var c:boolean; var d:boolean; var e:boolean; var f:boolean; var g:boolean; var h:boolean; var i:boolean; var j:boolean; var k:boolean;
function Start(){
a=true;
yield WaitForSeconds(5.0);
a=false;
b=true;
yield WaitForSeconds(5.0);
b=false;
c=true;
yield WaitForSeconds(5.0);
c=false;
d=true;
yield WaitForSeconds(5.0);
d=false;
f=true;
yield WaitForSeconds(5.0);
f=false;
g=true;
yield WaitForSeconds(5.0);
g=false;
h=true;
yield WaitForSeconds(5.0);
h=false;
i=true;
}
function OnGUI(){
if(a==true){ var sw : int = Screen.width; var sh : int = Screen.height; GUI.Label(Rect(sw/6,sh/3,sw*2/3,sh/3),"hello"); }
if(b==true){
GUI.Label(Rect(sw/6,sh/3,sw*2/3,sh/3),"my name is ");
} if(c==true){
GUI.Label(Rect(sw/6,sh/3,sw*2/3,sh/3),"bingo");
}
if(d==true){
GUI.Label(Rect(sw/6,sh/3,sw*2/3,sh/3),"Let's go");
}
if(e==true){
GUI.Label(Rect(sw/6,sh/3,sw*2/3,sh/3),"vacation");
}
if(f==true){
GUI.Label(Rect(sw/6,sh/3,sw*2/3,sh/3),"It's grate");
}
if(g==true){
GUI.Label(Rect(sw/6,sh/3,sw*2/3,sh/3),"experience");
}
if(h==true){
GUI.Label(Rect(sw/6,sh/3,sw*2/3,sh/3),"best");
}
}
Your answer
![](https://koobas.hobune.stream/wayback/20220613123513im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Wtf is a prefab? 2 Answers
Generating a good random seed 2 Answers
Help! the enemy incline when attacks player 1 Answer
Making a Game like 'Kitty Cannon'? 1 Answer
How can I make a walk animation? 0 Answers