Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: swaz on Thu 16/08/2007 01:40:32

Title: How to hide GUI during a dialog (using the pinned scumm template)?
Post by: swaz on Thu 16/08/2007 01:40:32
Hi all, sorry about making this forum full of mine threads :D
I'm using the Scumm template pinned in this section, downloadable at: http://ssh.me.uk/MI2forags271.zip
I simply cannot hide the gui during a dialog.
I tried to do something like this:
gMaingui.Visible=false;
gAction.Visible=false;
dGuy.Start();
gMaingui.Visible=true;
gAction.Visible=true;

But it didn't work..
Suggestions?
Title: Re: How to hide GUI during a dialog (using the pinned scumm template)?
Post by: nihilyst on Thu 16/08/2007 01:48:23
That's because the dialog scripts starts, when the current function ends. In your example, the GUI turns off, then on again, and after that the dialog starts.

You could possibly go into the General Settings and set "When interface disabled:" to "GUIs turn off".

cheers
nihilyst
Title: Re: How to hide GUI during a dialog (using the pinned scumm template)?
Post by: swaz on Thu 16/08/2007 02:04:58
There are always friendly people here! Thanks! :D
Title: Re: How to hide GUI during a dialog (using the pinned scumm template)?
Post by: strazer on Thu 16/08/2007 16:45:30
The Dialog.Start function is a delayed function, meaning it gets executed at the end of the script, not immediately. Hence, with your code you will have the GUI turned back on when the dialog is actually started.

What you can do is putting everything you want to happen after the dialog (i.e. turning the GUI back on) into a second, separate "Run script" action for the same event.