Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: SupSuper on Tue 02/08/2005 16:00:36

Title: Save Screenshots and Display()
Post by: SupSuper on Tue 02/08/2005 16:00:36
- I'm using the "Save screenshots with saved games" feature. However, the screenshots get saved with the Load/Save dialog on top (which isn't very helpful) EVEN if I close the dialog before using SaveGameSlot(). How do I fix this?

- Is there a way to get the text in Display() boxes to be center-aligned, instead of left-aligned?

- I've got the following bunch of code:
EndCutscene();
Text.SetText("");
gBar.Visible = false;
Display("England, Clement Manor : March 1839");

However, after EndCutscene(), the script jumps to the Display() line, not running the lines in-between. How do I fix this?
Title: Re: Save Screenshots and Display()
Post by: Rui 'Trovatore' Pires on Tue 02/08/2005 17:15:45
1 - There are some ways around it. My personal favourite is to mess with DynamicSprite.CreateFromScreenshot BEFORE calling up the Save GUI, but I'm sure there are better ones. Still, look into it.

Or, try using a Wait(1) BEFORE you use SaveGameSlot.*

2 - Yeah, look in the manual. There's a sort of game.align_text variable. Unless it only works in speech, and in that caso, no, there isn't.

3 - Try adding a Wait(1) before Display. *

*Some things are not done until the screen is refreshed, and some things refresh first. In 1, SaveGameSlot ALWAYS saves only when you reach the end of the script, much like ChangeRoom - but it probably does it BEFORE the screen gets refreshed. With a Wait(1), the screen should refresh, the GUI should disappear, and THEN it should save. The same method MAY help you with 3, I'm not sure but it's always worth a try.
Title: Re: Save Screenshots and Display()
Post by: SupSuper on Tue 02/08/2005 22:51:26
much thanks, the Wait(1) worked like a charm, as well as the game.text_align variable :D