Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: SinSin on Thu 14/04/2005 09:05:18

Title: GUI is driving me mad
Post by: SinSin on Thu 14/04/2005 09:05:18
i'm stuck im creating a game and im doing quite well but i cannot figure out how to create a gui for
a) my inventory
b) save, load, exit

i have got as far as creating the first bar that will pop up when my mouse is y=5 but when i click the menu button i created it wont do anything.!!!

Im thinking that it is probably hard creating the next bit could someone help please

confused game maker

SINSIN ???
Title: Re: GUI is driving me mad
Post by: magintz on Thu 14/04/2005 11:28:39
You actually have to script what the buttons do. In the GUI editor record all the button numbers (left click them and it will tell you button 1-x)

Next thing is to click the button that says something like script gui (I havent done in GUI work in a long time so bare with me).

Probably best to look at all the other GUI's as well, but you want something like if GUI == save/load

and if button pressed == 0 then run the script to save (something like SaveGame(0);) etc...

But I definatley suggest looking at the other gui.
Title: Re: GUI is driving me mad
Post by: . on Thu 14/04/2005 14:22:25
Simply RTFM

It is realy on manual
Title: Re: GUI is driving me mad
Post by: SinSin on Thu 14/04/2005 14:34:49
Quote from: Kristjan on Thu 14/04/2005 14:22:25
Simply RTFM

It is realy on manual

now now i will read it again cheers magintz
Title: Re: GUI is driving me mad
Post by: Darth Mandarb on Thu 14/04/2005 14:45:45
Creating a custom inventory GUI can be a little daunting ... I had some major problems with it when working on my first game.

Here is a thread I started for just this very question: Custom Inventory GUI (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=10946.0)
(it's in the Tech Archives - a great resource in there for future reference!)

As for the Save/Load GUI, your best bet (the way I learn the fastest) is to search the forums, find somebody else's code, and pick it apart.  Then it'll be much easier to make your own.

Use the forum's search function (in the top bar up there!) It's indespensible!

Good luck!
Title: Re: GUI is driving me mad
Post by: GarageGothic on Thu 14/04/2005 16:39:26
One thing that you should notice when doing your own inventory GUI is that the item height and width must be specified in script, as setting those properties for the inventory window in the GUI editor does nothing(?). I learned this the hard way.
Title: Re: GUI is driving me mad
Post by: SinSin on Fri 15/04/2005 13:11:38
Darth  DARTH help  im in a really big rut now

Ok my gui works fully now but the inventory throws up a runtime error

saying basically that one or more of my iventory graphics has been deleted what can i do
Title: Re: GUI is driving me mad
Post by: Darth Mandarb on Sat 16/04/2005 15:27:33
You need to find out which inventory item gives the error.

Does it give the run-time error after you pick up the item?  Or is it an item you start with?

Find out which inventory item is causing the problem, then maker sure (in AGS) that it has an image assigned to it.

Actually, if you just go into AGS and scroll through all your inventory items you should be able to see which one is causing the problem.  Just import the image, and assign it to that item.

That should do it, unless I'm missing something here :)
Title: Re: GUI is driving me mad
Post by: SinSin on Sun 17/04/2005 20:51:54
cheers darth