Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: chip on Mon 22/02/2021 20:39:38

Title: Change visibility of gui between rooms
Post by: chip on Mon 22/02/2021 20:39:38
Hello folks

with the tumbleweed template I try to hide the gui from the first room to make this my mainmenu, where I dont want the verbs and inventory to appear

When I use
Code (ags) Select
function game_start()
{

gMain.Visible= false;
}
in GlobalScript, it works and hides the gui, but as I process to room2 where the game "starts"
I cant get the gui back to visible, how would I do that the best way?
I try this code in the room2 script but it does not work:
Code (ags) Select

function room_FirstLoad()
{
gMain.Visible = true;

}



Title: Re: Change visibility of gui between rooms
Post by: Crimson Wizard on Mon 22/02/2021 20:51:30
First of all, make sure you did not forget to connect function to corresponding room event, this is the most common mistake everyone does.

https://adventuregamestudio.github.io/ags-manual/images/acintro3_05.png

Easiest way to tell if your function runs at all is to put something like "Display("It runs");" there.
Title: Re: Change visibility of gui between rooms
Post by: Khris on Mon 22/02/2021 22:12:32
Also, the Thumbleweed template has a bunch of custom functions, in this case

Code (ags) Select
  Verbs.HideGui();
  Verbs.ShowGui();
Title: Re: Change visibility of gui between rooms
Post by: chip on Tue 23/02/2021 15:55:40
Thanks for your replies

It was in fact not linked. It is working now.  :grin:

Are there more custom functions for tumbleweed and is there somewhere a documentation?

Title: Re: Change visibility of gui between rooms
Post by: eri0o on Tue 23/02/2021 16:58:19
https://adventuregamestudio.github.io/ags-manual/Tumbleweed.html

If you press f1 AGS will load it's help, if you are in a recent version, then you should be able to find Tumbleweed when you search in it. In any case, the above is the more updated online help.

The original docs for it are here: https://github.com/dkrey/ags_tumbleweed/tree/master/doc