Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Metalowy on Tue 20/01/2009 16:34:53

Title: GUI title screen help
Post by: Metalowy on Tue 20/01/2009 16:34:53
First of all, hello everybody.

I searched forum for help how to do a title screen by GUI, but I didnt find anything good.
So I must post a topic. What I must do after I have designed GUI menu?
http://www.youtube.com/watch?v=49mOM8HiabU

Plz, only clear answers.
Title: Re: GUI title screen help
Post by: on Tue 20/01/2009 19:11:52
Neat idea to show your problem via YouTube- that should be done more often!

I'll try to give you the basics, should you hit any problems, well, we'll elaborate.

Once you have your menu, create a room, make sure it is the player's start room, and then, in that room's after_enter function, make the menu GUI visible.

More precisely:


function room_AfterFadeIn()
{
  gMenuGui.Visible = true;
}


Usually such a "menu room" has the player invisible, which can be set in the room's property pane.
Title: Re: GUI title screen help
Post by: Metalowy on Tue 20/01/2009 20:06:36
I have
Error (line 4): Undefined token 'gMenuGui'
error

I had this error before. Thats why i started this topic.
Title: Re: GUI title screen help
Post by: Khris on Tue 20/01/2009 20:15:58
According to your video, the GUI is named "gGui1". So rename it or adjust the code line.

Plus, putting the line in "before fadein" / "room_Load()" is better because otherwise the game will fade in the first room's background and then switch on the GUI.
Title: Re: GUI title screen help
Post by: Metalowy on Tue 20/01/2009 20:23:32
Ok it loaded, but with gameplay GUI [walk, talk, etc...]
gGui2.Visible = false didnt work (little improvisation ;))
Title: Re: GUI title screen help
Post by: Ultra Magnus on Tue 20/01/2009 21:27:50
Can you post some of the code?
It'd be easier to help you if we can see what's there and what isn't.
Title: Re: GUI title screen help
Post by: Metalowy on Wed 21/01/2009 07:18:26
In the room script I have only what Ghost tell me.
Title: Re: GUI title screen help
Post by: Creator on Wed 21/01/2009 08:32:13
Quote from: Metalowy on Tue 20/01/2009 20:23:32
gGui2.Visible = false didnt work (little improvisation ;))

Change false to true.
Turn the Iconbar off (the walk, talk, interact GUI) off, type this into game_start in your GlobalScript:


gIconbar.Visible = false;


Then to turn it back on type true instead of false.
Title: Re: GUI title screen help
Post by: Khris on Wed 21/01/2009 10:03:48
I assume gGui2 is a gameplay GUI made by you? In the video it looks like you're using the empty game template, right?
You'll have to set the Visibility of the GUI in the properties pane.
When do you want it to appear?
Title: Re: GUI title screen help
Post by: Metalowy on Wed 21/01/2009 16:18:38
It worked as Creator said. Thx guys. I may post here something else if there will be some problems in future.

EDIT: I forgot to ask. It's C++??
Title: Re: GUI title screen help
Post by: TerranRich on Wed 21/01/2009 17:17:58
AGS's scripting language, I believe, is its own version of C++. I like to call it "C!!!111"
Title: Re: GUI title screen help
Post by: monkey0506 on Wed 21/01/2009 19:25:36
Actually Terran it's pronounced AGScript. It's a bastard child of ASP, BASIC, C, C++, C#, Java, JavaScript, PHP, Perl, Python, and of course, assembly. So when the programming languages (http://en.wikipedia.org/wiki/List_of_programming_languages) have an unholy demonic orgython, the spawn is what we all know and lovingly use every day in our most favouritest of all programs...American Gay Sex.


Wait. That's not right!