GUI title screen help

Started by Metalowy, Tue 20/01/2009 16:34:53

Previous topic - Next topic

Metalowy

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.

Ghost

#1
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:

Code: ags

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.

Metalowy

I have
Error (line 4): Undefined token 'gMenuGui'
error

I had this error before. Thats why i started this topic.

Khris

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.

Metalowy

#4
Ok it loaded, but with gameplay GUI [walk, talk, etc...]
gGui2.Visible = false didnt work (little improvisation ;))

Ultra Magnus

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.
I don't mean to sound bitter, cold, or cruel, but I am, so that's how it comes out.

I'm tired of pretending I'm not bitchin', a total frickin' rock star from Mars.

Metalowy

In the room script I have only what Ghost tell me.

Creator

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:

Code: ags

gIconbar.Visible = false;


Then to turn it back on type true instead of false.

Khris

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?

Metalowy

#9
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++??

TerranRich

AGS's scripting language, I believe, is its own version of C++. I like to call it "C!!!111"
Status: Trying to come up with some ideas...

monkey0506

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

SMF spam blocked by CleanTalk