Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: barefoot on Wed 25/11/2009 09:59:06

Title: Display script function
Post by: barefoot on Wed 25/11/2009 09:59:06
Hi
Ive finally decided to use ags 3.1... 

Where DISPLAY is now used instead of NARRATOR, is there a way of it automatically going on to next SAY instead of waiting for mouse / keyboard click???

Here is my started script:

cRedpants.Say("I'm just going out to see my friends");
Display("You're Mother shouts: 'Don't you be home late my lad, your'e father will be angry'");
cRedpants.Say("I won't");
cRedpants.Walk(602, 427, eBlock);

Qikire
Title: Re: Display script function
Post by: Intense Degree on Wed 25/11/2009 12:45:56
As far as I know Display commands cannot be removed without a mouse click/keyboard.

The way I have got round this is simply to create a dummy character called cNarrator (or whatever) with an empty view, or at least one with the transparency set to 100, who can say the lines for you. So...

cRedpants.Say("I'm just going out to see my friends");
cNarrator.Say("You're Mother shouts: 'Don't you be home late my lad, your'e father will be angry'");
cRedpants.Say("I won't");
cRedpants.Walk(602, 427, eBlock);

There might well be a much better way to do this and if so I would be interested to find out too!
Title: Re: Display script function
Post by: Crimson Wizard on Wed 25/11/2009 13:13:50
All I can think of is using custom GUI. Make a GUI with only a text box (and maybe some ornamental borders). Then make custom function to show it, like

// Assuming your GUI is named gCustomMessage and Text Box is named gCustomMessageText

function DisplayCustom(String text, int delay)
{
   gCustomMessageText.Text = text;
   gCustomMessage.Visible = true;
   Wait(delay);
   gCustomMessage.Visible = false;
}

Something like that.
Title: Re: Display script function
Post by: barefoot on Fri 27/11/2009 17:34:45
To go from DISPLAY to SAY without having to click mouse/keyboard:

game.skip_display = 0;

Qikfire