Main menu/computer

Started by red runner, Sat 12/01/2008 01:40:23

Previous topic - Next topic

red runner

I would like to know how to make a main menu, and how to make a computer terminal.
"Life's too short for all this nonsense.:
  -Joseph Brophy

NiksterG

Did you try the search feature? I'm sure plenty have asked that before.

Anyway, to answer your question, I think the simplest way to make a main menu is to draw a room with the background being what you want to menu to look like. Any buttons that the user can push should be hotspots that, when clicked on, lead to the appropriate place (intro, load, play, etc.)

I'm not sure what you mean by computer terminal. More detail please?
Check out my games! (Not all made with AGS)

red runner

In games like 7 Days a Skeptic, Alien Threat, and A Day in the Future, there were computer terminals the player could use. They would have clickable objects or text parsers.

I guess what I'm asking is how do you display a room without the player character, and only one option forthe mouse?

And yes, I did search. I did not find anything useful.
"Life's too short for all this nonsense.:
  -Joseph Brophy

OneDollar

There's an option in the room settings to hide the player character in that room.

If you're using the default control system with right mouse cycling modes, you can set the mouse mode to interact then disable the other modes upon entering the room, something like...
Code: ags

function room_Load()  //this is one of the default room functions, enters room before fade in
{
  mouse.Mode=eModeInteract;  //set mouse mode to interact (or you could use pointer or another mode)
  mouse.DisableMode(eModeLookat);  //disable the other mouse modes
  mouse.DisableMode(eModePickup);
  etc...
}


You could also change the mouse cursor
Code: ags

mouse.ChangeModeGraphic(eModeInteract, 0);  //change mouse cursor for interact to sprite slot 0
mouse.ChangeModeHotspot(eModeInteract, 0, 0);  //change mouse hotspot to x=0 and y=0


Then run your interactions with the computer terminal as either any click on object or interact with object. You'll have to enable the other mouse modes before the player leaves the room.
Code: ags

function hExitBtn_AnyClick()  //run when you click the exit hotspot on the terminal for example
{
  mouse.EnableMode(eModeLookat);
  mouse.EnableMode(eModePickup);
  etc...
}

If you want a text parser you'll need to make a new GUI that is only displayed when you enter the room. Take a look at the text parser entry in the manual. Any other GUIs you have might need to be enabled or disabled when you enter or exit the room.

red runner

Thank you. I'll try this out.
"Life's too short for all this nonsense.:
  -Joseph Brophy

SMF spam blocked by CleanTalk