Hey just a quick question, is it possible to give my game a SamnMax style Inventory/control system? Ive seen games with the 'right click' function that allows you to cycle through actions, so i guess its more a question of the inventory.
Thanks in advance.
Do you mean the little cardboard box in the corner, that has the inventory and Look, Take, Use, etc in it? 'Cause that's quite easy. It's just a case of having a small GUI with a single button (the box) open up a bigger one (inside the box) with a row of buttons, for the functions, and an inventory window.
Just wanted to say that I think the samnmax style gui would fit perfectly with your game. I may have a template at my house's computer of sam and max, and ill see about uploading it later for you.
[Edit] Here it is, although, its only a tutorial, and apparently not a complete one, but you can yell at a certain Joseph DiPerla to complete it, cause I would, as well, like it.
Sam N Max GUI tutorial (Part I):Well, we all know that we can't have inventory backgrounds and it is very hard to do a Sam N Max Style inventory. Well, there is a way around it. This Tutorial will show you how to do it. This Tutorial is for Beginner's-Intermediate knowledge of AGS.
Here is the Step By Step Tutorial of how to achieve this:
Step One:Use your favorite Painting program and make two images, 1) A 320x200 size image that will be the inventory background. 2) A small image that will be used as a button. Maybe 35x23 size.
Step Two:Load Roomeditor up. Add the two new images created into AGS as new slots. And go into the GUI editor.
Step Three:Add a new GUI. This gui will always be visible. You can enter the coordinates in which the GUI will be displayed.
Step Four:Make sure the size of the GUI is 40x30 and the background image is 0.
Step Five:Add a button now. Edit the text name and erase all the text. Make sure the size of the button is 35x23.
Step Six:Add the 35x23 image that you imported to AGS as the button pic.
Step Seven:Your gonna add a new gui. Make this gui the size of 319x200. And make sure it only comes up on script command.
Step Eight:Make sure its background color is 0 and that the coordinates are 0,0. Now add a background picture and use the 320x200 background that you imported into AGS. Your game may have to be in hi-color in order to use the hi-color image(if the image is hi-color)
Step Nine:Add an Inventory object. Make sure the size of the Inventory screen is 319 by 190. Center the inventory object properly so that the top of the inventory is at the top of the screen.
Step Ten:Lets do some scripting now. Lets assume that the GUI that has the little 35x23 button is on GUI 1, and that the button is button 1. Lets assume the inventory GUI is gui2. Enter the following into the GUI script editor:
if (interface == 1) {
if (button == 1) {
InterfaceOn(2);
}
}
What did we do here? Well,Ã, Ã, if (interface == 1) {Ã, Ã, Ã, Ã, Ã, Ã, Ã, here we started an if statement. If is looking if interface 1 was selected thenÃ, Ã, if (button == 1) {Ã, Ã, Ã, Ã, Ã, Checks if button 1 was pushed on interface 1. If it was, thenÃ, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, InterfaceOn(2);Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, Ã, interface 2 will or gui 2 will be displayed.Ã, }Ã, Ã, } these two brackets are to close off the IF statement we started.
In Plain English: If Button 1 on interface 1 was pushed, then show me the inventory interface.
Thats it, this was the first part of the Sam and Max GUI style Tutorial. In the next tutorial I will show you how to customize some of the inventory to display how many items on a line and how many items to display total. I will also show you how to interact with the items and how to drag them out of the inventory box and use them in the game. That will be a bit more complex.
I hope you enjoy this tutorial. Asta Lasagna, don't get any on ya.
Tutorial created by Joseph DiPerla
Now, something that may be of interest to you over in the Tech Archive is the "Icon Based Dialog System (http://www.agsforums.com/yabb/index.php?topic=9528.0)" which should be the same as used in Sam and Max.
It would rock if you, your team, and Joseph could pull together a Sam n Max style Gui/Template. I'd love to see it, and love to use it, with due credit...