Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Arjunaz78 on Wed 28/09/2011 17:49:54

Title: GUI Start Menu Didn't Work [SOLVED]
Post by: Arjunaz78 on Wed 28/09/2011 17:49:54
I've create a custom GUI with image background like below,but i don't know if i missplaced the code or confuse to use the code normally that result as picture below,the GUI running but the button seem unvisible/non-clickable (see Load Game,New Game & X mark button) what's wrong?

i currently stuck too when need to put the 'new game' run scripts..i confuse where i must to put whether on room script or global script and don't know what the right syntax or code i must use to activate the function to create new game on starting room..besides the densming GUI tutorial on youtube doesn't help too much..

p.s - sorry if you confuse with my problem..because i can't speak perfect English :P

(http://img31.imageshack.us/img31/6015/klggui.th.png) (http://imageshack.us/photo/my-images/31/klggui.png/)

(http://img717.imageshack.us/img717/1865/klg2.th.png) (http://imageshack.us/photo/my-images/717/klg2.png/)

(http://img850.imageshack.us/img850/3274/klg3.th.png) (http://imageshack.us/photo/my-images/850/klg3.png/)

Title: Re: GUI Start Menu Didn't Work
Post by: pcj on Thu 29/09/2011 00:28:21
Are there any blocking scripts running?  GUI controls are disabled during blocking scripts.  All those Wait() commands in room_AfterFadeIn() would do it.

GUI scripts should be placed in the global script.
Title: Re: GUI Start Menu Didn't Work
Post by: Khris on Thu 29/09/2011 01:25:41
Please don't use imageshack, it's gotten horrible. imgur.com is way better and doesn't hold the direct link for ransom.

Also, if you post code, why not copy and paste it in between [code] tags? Much easier.

Without looking at your code, to start a New Game, just move the player character to the first room or intro room.
You can use a fullscreen GUI that pauses the game and simply close it.

To REstart the game, just call RestartGame();
Title: Re: GUI Start Menu Didn't Work
Post by: hedgefield on Fri 30/09/2011 17:16:12
Is gStartGame this main menu GUI you speak of? In that case, from what I can tell, right after you open the this GUI you trigger music and then a long sequence of blocking ShowText commands and Wait(180) commands. Probably this is preventing you from being able to click on anything - which seems to be supported by the Wait cursor that is visible in that first screenshot.

Try putting your menu GUI in a completely seperate room so there is no other code to interfere with it.
Title: Re: GUI Start Menu Didn't Work
Post by: pcj on Fri 30/09/2011 17:31:33
ShowTextCentered is a custom non-blocking function using Overlays.  It's just the Wait causing it.
Title: Re: GUI Start Menu Didn't Work
Post by: Arjunaz78 on Sat 01/10/2011 19:22:43
Quote from: LeKhris on Thu 29/09/2011 01:25:41
Please don't use imageshack, it's gotten horrible. imgur.com is way better and doesn't hold the direct link for ransom.

Also, if you post code, why not copy and paste it in between [code] tags? Much easier.

Without looking at your code, to start a New Game, just move the player character to the first room or intro room.
You can use a fullscreen GUI that pauses the game and simply close it.

To REstart the game, just call RestartGame();

Thanks for the suggestion LeKhris,i appreciate that,then from now on i stop using imageshack to upload it..besides imageshack will annoying with an ads popup.

Thanks again.
Title: Re: GUI Start Menu Didn't Work
Post by: monkey0506 on Sat 01/10/2011 22:00:57
Imageshack is fine. So long as you're not incompetent you can get the direct link just fine. :P

And Imgur is extremely overrated. If you have a slower internet connection it will take about 5-10 years...er...minutes to upload even the smallest of images.

[/spam]
Title: Re: GUI Start Menu Didn't Work
Post by: Khris on Sun 02/10/2011 11:51:31
What has incompetence got to do with it? Sure, you can dig through the source or search it for "Direct Link", but imgur doesn't require being signed in in order to not having to do that.

Simply put, it's better, period.

No idea where you get the overrated from. As soon as a better imagehost surfaces, we will recommend that. That's how it is and always has been.