Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Buckethead on Fri 03/09/2010 14:44:19

Title: GUI menu won't go away
Post by: Buckethead on Fri 03/09/2010 14:44:19
Hi,

I've got a weird issue here!

I can't for the love of god figure out why one of my GUI's keeps showing up in room 3.

I even tried putting gObjects.Viseble = false; in repeatedly_execute_always but that just makes the menu go away on occasion and then turns right on again.

The menu is not there all the time though. It only gets turned on after I leave room 5 (going to room 3);

I could use a little help please!

EDIT: I just tested on the problem also seems to happen when I let the player go to room 2 instead of room3. So It seems the problem lays somewhere in room 5 but I just can't get my head around what it could be.

Thanks in advance!
Title: Re: GUI menu won't go away
Post by: Khris on Fri 03/09/2010 14:54:05
Without looking at any code this is gonna be difficult to tackle.
Did you check all your rep_exes, including the rooms'?
Are you using any modules, templates?
Title: Re: GUI menu won't go away
Post by: Buckethead on Fri 03/09/2010 15:44:33
Thanks for pointing me in the right direction. It was the Countdown module keeping the GUI on to display the numbers.
Title: Re: GUI menu won't go away
Post by: monkey0506 on Fri 03/09/2010 16:22:19
The CountDown module keeps the OwningGUI of CountDown.ShowOnLabel turned on whenever the count down is actively running by default. If you want to temporarily pause it and hide the GUI, you can use:

CountDown.HideGUIWhilePaused = true;
CountDown.Pause();


I've also uploaded a new version with a bug fix (thanks for the PM notifying me). Going to update the thread now.
Title: Re: GUI menu won't go away
Post by: Buckethead on Fri 03/09/2010 17:57:13
oh right. But I wasn't pauzing so I thought I shouldn't use that. Anyway I solved it by setting CountDown.ShowOnLabel = null; together with turning off the gui.

It seems to work as it should.
Title: Re: GUI menu won't go away
Post by: monkey0506 on Sat 04/09/2010 04:37:36
That should also work fine of course. :P If you wanted I could add a bool "HideGUI" to simply set the ShowOnLabel.OwningGUI.Visible to false. That would save you one step. ::)