Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Mazoliin on Thu 31/05/2007 17:13:03

Title: Dialog GUI color and visible
Post by: Mazoliin on Thu 31/05/2007 17:13:03
I'v tried to use Monkey_05_06 Scrolling Dialog module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=27930.0), but I seem to have some major problem whit it so I'm working on a back-up plan.
I'm only interested in changeing the color's so I found out that by changeing the player talking color, the color on the options change too.
My questions are:

1) How can I make it so when the dialog options are visible, the speech color are green or something but then when the player talk's it's some other color.
Or is this just a stupid idea?

2) When the characters talk, the dialog GUI disapears. How can I make it be visible during the whole dialog even while they talking?
Title: Re: Dialog GUI color and visible
Post by: Khris on Thu 31/05/2007 17:19:37
1) Change the player's talking color before a dialog and change it back before normal speech. (Using Character.SpeechColor)

2) In the General settings pane, set the "When interface disabled" option to "GUIs unchanged". (Not sure, though)
Title: Re: Dialog GUI color and visible
Post by: Mazoliin on Thu 31/05/2007 19:47:50
1) FIXT ;D
I had already figured out Character.SpeechColor but didn't know where to put it.
But I it's done now, I just used two dialog_requst script. One for normal speech color and one for the other.
Never the less, tanks for your help.

2) The GUI is on "GUI unchanged". But I have managed to get the main GUI to disappear and have the GUI I use as dialog GUI turn up (using dialog_request). The only problem is that the game now get caught in loop or something.
#sectionstart character3_a  // DO NOT EDIT OR REMOVE THIS LINE
function character3_a() {
  // script for Character 3 (tavern owner): LEC character
if (GetGlobalInt(10)==8){
  ...
}
else if (GetGlobalInt(10)==5){  // Talk to command
  player.Walk(220, 83, eBlock, eWalkableAreas);
  player.FaceLocation(player.x, 5, eBlock);
  Wait(5);
  gStatusline.Visible = false;
  gGui6.Visible = true;
  RunDialog(0);
}
else {
  unhandled_event(3, 6);
}
}
#sectionend character3_a  // DO NOT EDIT OR REMOVE THIS LINE#sectionstart dialog_request  // DO NOT EDIT OR REMOVE THIS LINE
function dialog_request(int script) {
  if (script==1){
    ...
  }
  else if (script==2){
    cEgo.SpeechColor = 45376;
  }
  else if (script==3){
    cEgo.SpeechColor = 48461;
  }
  else if (script==4){
    gGui6.Visible = false;
    gStatusline.Visible = true;
  }
}
#sectionend dialog_request  // DO NOT EDIT OR REMOVE THIS LINE


The dialog script
// dialog script file
@S  // dialog startup entry point
...
@1  // option 1
...
@2  // option 2
...
@3  // option 3
...
@4  // option 4
...
@5  // option 5
run-script 2
EGO: Oh, nothing.
TAVERNOWNER: Right.
run-script 4
stop

Title: Re: Dialog GUI color and visible
Post by: Gilbert on Fri 01/06/2007 01:58:23
What mode was the GUI set to? I'm not quite sure, but if you set it to something that'll pause the game it might cause problem.
Title: Re: Dialog GUI color and visible
Post by: Mazoliin on Fri 01/06/2007 14:41:58
Mode? uuuuh...
It's on Popup modal and a it's not a text window...
Did you get the right answer?
Title: Re: Dialog GUI color and visible
Post by: Gilbert on Fri 01/06/2007 16:27:14
Popup modal will pause a game, that's quite possibly the problem, try to change it to something else like "always on" and see if it helps.
Title: Re: Dialog GUI color and visible
Post by: Mazoliin on Sun 03/06/2007 16:11:04
Now everything works fine...

Just one last thing. Can you decide where a text window GUI will appear or is it true that it can't be done?
Title: Re: Dialog GUI color and visible
Post by: Rui 'Trovatore' Pires on Wed 06/06/2007 20:07:22
DisplayAt.
Title: Re: Dialog GUI color and visible
Post by: Mazoliin on Fri 08/06/2007 15:07:05
Should be more careful whit what I write.
Can you decide where a text window GUI will appear when it's a dialog GUI?
I think I read that you can't deside where it will appear if it's a dialog GUI.
I tried whit the "GUI.SetPosition(int x, int y) in repeatedly_execute but it don't seem to have any effect.
Title: Re: Dialog GUI color and visible
Post by: Rui 'Trovatore' Pires on Fri 08/06/2007 21:56:45
Don't think so, no. That's why Monkey_05_06's dialog module was created in the first place, to give us more dialog-freedom.
Title: Re: Dialog GUI color and visible
Post by: Mazoliin on Sat 09/06/2007 08:25:04
To bad I can't get it to work! >:(
But as it is now, I think my game looks good.