Make GUI Invisible before Displaying Message via Character.Say

Started by Dualnames, Thu 25/06/2009 09:34:51

Previous topic - Next topic

Dualnames

Just a question mostly..but anyways.

I have this code:

It's a custom function I use to display messages with the narrator character
.
Code: ags

function NarratorSay(string msg) {
SetSpeechStyle(eSierra);
//various variables being set//
gHotspot.Transparency=100;
cNa.Say(msg);
SetSpeechStyle(eLucasArts);
}



If I comment it, the GUI gets invisible (no wonder).
Code: ags

function NarratorSay(string msg) {
SetSpeechStyle(eSierra);
//various variables being set//
gHotspot.Transparency=100;
//cNa.Say(msg);
SetSpeechStyle(eLucasArts);
}


Thing is I tried using Wait(1);, but nothing. Any ideas?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

Instead of setting the transparency to 100, try setting .Visible to false.
It shouldn't make a difference, but who knows?

Dualnames

Quote from: KhrisMUC on Thu 25/06/2009 09:43:38
Instead of setting the transparency to 100, try setting .Visible to false.
It shouldn't make a difference, but who knows?

It does, I handle Transparency property via Tween module, so it has to be transparency...tha'ts the point. Forgot saying that.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

I meant it shouldn't make a difference in terms of properly hiding the GUI before the .Say command.
Have you at least tried it?
Because if it does work (and thus break the tween stuff), you could use
Code: ags
  gHotspot.Transparency = 100;
  gHotspot.Visible = false;
  cNa.Say(msg);
  gHotspot.Visible = true;

in order to not break the tween stuff.

Nevertheless, setting the transparency to 100 should suffice.
Is it possible the tween module interferes with the command?
Maybe there's a way of instantly setting the transparency to 100 using the tween module, so it doesn't interfere any longer (assuming it is the cause of the original problem).

Dualnames

I tried it and it works but not quite..
I want it now to be set invisible before running a process click command..tried transparency wait and visible but not a clue..
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk