Heyo; so encountering a rather weird problem.
So I’ve got GuiText that is supposed to be spoken dialogue and is being triggered by booleans in several separate scripts. How it’s being triggered is that when the text is being triggered, I’m using .enabled to display the text. Then a function is called using yield Waitforseconds after 3 seconds, the Guitext is being told to disable using .enabled.
Problem I keep running into is that the first two parts of text are triggered, and I can see them find. After the first two, then suddenly the other text isn’t being displayed. I do have print statements in place that tell me if they’re being triggered or not. And I’m getting the print statements, but for some reason the text still isn’t being displayed?
Ideas?
(and yeah, using javascript for this one)
var Convo : GUIText ;
static var fishMonger : boolean = false;
static var fishStart : boolean = false;
static var read : boolean = false;
static var houseCounter : int = 0;
function Start () {
Convo.enabled = true;
Convo.text = "Damn, it's Tuesday...
time to go back to the old slog";
//Convo.text = "*phew* Almost done for today! Gotta get at least 3 more seashells";
conKiller();
}
function Update () {
if(houseCounter == 1){
Convo.enabled = true;
Convo.text = "First I gotta check in with Mr Sage to go to work";
conKiller();
}
if(fishStart == true){
Convo.enabled = true;
Convo.text = " 'Ah, there you are!'
‘Well, you know the drill: collect as many shellfish as you can’ ";
conKiller();
}
if(SeaShellController.seaShells == 1){
Convo.enabled = true;
Convo.text = "Ok, that's 1 shell. Need 2 more";
conKiller();
}
if(SeaShellController.seaShells == 2){
Convo.enabled = true;
Convo.text = "That's 2. One more to go...";
conKiller();
}
if(SeaShellController.seaShells == 3){
Convo.enabled = true;
Convo.text = "And 3! ";
conKiller();
}
/*if(BottleController.bottleUp == true){
Convo.text = "What is this bottle? And why is it...glowing?";
conkiller();
}*/
if (fishMonger == true){
Convo.enabled = true;
Convo.text = " 'Ah, thank you for the shellfish! Have a good night' ";
conKiller();
}
if (houseCounter >= 2){
if(BottleController.bottleUp == true){
Convo.enabled = true;
Convo.text = "I should have something here to open this bottle...";
conKiller();
}
}
print("Seashells: " +SeaShellController.seaShells);
print("# of House enters :" +houseCounter);
/*if (read == true){
Convo.text = "Uhm...it's not supposed to be night yet";
}*/
}
function conKiller(){
yield WaitForSeconds (3);
Convo.enabled = false;
}