Change visibility of gui between rooms

Started by chip, Mon 22/02/2021 20:39:38

Previous topic - Next topic

chip

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
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

function room_FirstLoad()
{
gMain.Visible = true;

}




Crimson Wizard

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.

Khris

Also, the Thumbleweed template has a bunch of custom functions, in this case

Code: ags
  Verbs.HideGui();
  Verbs.ShowGui();

chip

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?


eri0o

#4
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

SMF spam blocked by CleanTalk