Author Topic: Change visibility of gui between rooms  (Read 116 times)

Change visibility of gui between rooms
« on: 22 Feb 2021, 20:39 »
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: Adventure Game Studio
  1. function game_start()
  2. {
  3.  
  4. gMain.Visible= false;
  5. }
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: Adventure Game Studio
  1. function room_FirstLoad()
  2. {
  3. gMain.Visible = true;
  4.  
  5. }
  6.  



Re: Change visibility of gui between rooms
« Reply #1 on: 22 Feb 2021, 20:51 »
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.

Re: Change visibility of gui between rooms
« Reply #2 on: 22 Feb 2021, 22:12 »
Also, the Thumbleweed template has a bunch of custom functions, in this case

Code: Adventure Game Studio
  1.   Verbs.HideGui();
  2.   Verbs.ShowGui();
Fail at Floaty Rog' now!  still having to deal with what games are going through

Re: Change visibility of gui between rooms
« Reply #3 on: 23 Feb 2021, 15:55 »
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

Re: Change visibility of gui between rooms
« Reply #4 on: 23 Feb 2021, 16:58 »
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
« Last Edit: 23 Feb 2021, 17:01 by eri0o »