Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: BrightBulb on Tue 20/03/2012 15:17:04

Title: SayBackground (several lines) & how to run command after ending dialog [Solved]
Post by: BrightBulb on Tue 20/03/2012 15:17:04
Hello everybody,

I'm trying to script the following: The player can talk to another character (works fine),and when he selects a certain dialog option I want the player to regain game control (usually a player has no control during dialogs) and his dialog partner should continue talking for a while.

I have two problems with this:

1. When running multiple saybackground lines only the last one is shown (even with bgspeech_stay_on_display=1).

2. For the player to be able to act I need to end the dialog and then run the saybackground lines. Now I need a way to either run these commands immediately after ending the dialog OR a way to end the dialog from the global/room script rather than the dialogscript.

Any ideas?
Title: Re: SayBackground (several lines) & how to run command after ending dialog
Post by: Khris on Tue 20/03/2012 16:02:33
1. There's no built-in way to run multiple SayBackgrounds, however there's a module called QueuedBackgroundSpeech that should do the trick.

2. Since you can run standard script commands from within a dialog script, just run the commands before the dialog's "stop" command(s). If there's more than one option that'll end the dialog, put the commands inside a custom function and run that to avoid duplicate code.
Title: Re: SayBackground (several lines) & how to run command after ending dialog
Post by: BrightBulb on Tue 20/03/2012 19:48:24
Thanks for the hint with the module. I found another one that was compatible with the new version of AGS. Works fine now.